-
Notifications
You must be signed in to change notification settings - Fork 254
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'ACEmulator:master' into getcellcrash
- Loading branch information
Showing
108 changed files
with
6,360 additions
and
5,431 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.9.280 | ||
0.9.281 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,15 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
|
||
#nullable disable | ||
namespace ACE.Database.Models.Auth; | ||
|
||
namespace ACE.Database.Models.Auth | ||
public partial class Accesslevel | ||
{ | ||
public partial class Accesslevel | ||
{ | ||
public Accesslevel() | ||
{ | ||
Account = new HashSet<Account>(); | ||
} | ||
public uint Level { get; set; } | ||
|
||
public uint Level { get; set; } | ||
public string Name { get; set; } | ||
public string Prefix { get; set; } | ||
public string Name { get; set; } | ||
|
||
public virtual ICollection<Account> Account { get; set; } | ||
} | ||
public string Prefix { get; set; } | ||
|
||
public virtual ICollection<Account> Account { get; set; } = new List<Account>(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,45 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
|
||
#nullable disable | ||
namespace ACE.Database.Models.Auth; | ||
|
||
namespace ACE.Database.Models.Auth | ||
public partial class Account | ||
{ | ||
public partial class Account | ||
{ | ||
public uint AccountId { get; set; } | ||
public string AccountName { get; set; } | ||
public string PasswordHash { get; set; } | ||
public string PasswordSalt { get; set; } | ||
public uint AccessLevel { get; set; } | ||
public string EmailAddress { get; set; } | ||
public DateTime CreateTime { get; set; } | ||
public byte[] CreateIP { get; set; } | ||
public DateTime? LastLoginTime { get; set; } | ||
public byte[] LastLoginIP { get; set; } | ||
public uint TotalTimesLoggedIn { get; set; } | ||
public DateTime? BannedTime { get; set; } | ||
public uint? BannedByAccountId { get; set; } | ||
public DateTime? BanExpireTime { get; set; } | ||
public string BanReason { get; set; } | ||
|
||
public virtual Accesslevel AccessLevelNavigation { get; set; } | ||
} | ||
public uint AccountId { get; set; } | ||
|
||
public string AccountName { get; set; } | ||
|
||
/// <summary> | ||
/// base64 encoded version of the hashed passwords. 88 characters are needed to base64 encode SHA512 output. | ||
/// </summary> | ||
public string PasswordHash { get; set; } | ||
|
||
/// <summary> | ||
/// This is no longer used, except to indicate if bcrypt is being employed for migration purposes. Previously: base64 encoded version of the password salt. 512 byte salts (88 characters when base64 encoded) are recommend for SHA512. | ||
/// </summary> | ||
public string PasswordSalt { get; set; } | ||
|
||
public uint AccessLevel { get; set; } | ||
|
||
public string EmailAddress { get; set; } | ||
|
||
public DateTime CreateTime { get; set; } | ||
|
||
public byte[] CreateIP { get; set; } | ||
|
||
public DateTime? LastLoginTime { get; set; } | ||
|
||
public byte[] LastLoginIP { get; set; } | ||
|
||
public uint TotalTimesLoggedIn { get; set; } | ||
|
||
public DateTime? BannedTime { get; set; } | ||
|
||
public uint? BannedByAccountId { get; set; } | ||
|
||
public DateTime? BanExpireTime { get; set; } | ||
|
||
public string BanReason { get; set; } | ||
|
||
public virtual Accesslevel AccessLevelNavigation { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,148 +1,130 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using Microsoft.EntityFrameworkCore; | ||
using Microsoft.EntityFrameworkCore.Metadata; | ||
using Pomelo.EntityFrameworkCore.MySql.Scaffolding.Internal; | ||
|
||
#nullable disable | ||
namespace ACE.Database.Models.Auth; | ||
|
||
namespace ACE.Database.Models.Auth | ||
public partial class AuthDbContext : DbContext | ||
{ | ||
public partial class AuthDbContext : DbContext | ||
public AuthDbContext() | ||
{ | ||
public AuthDbContext() | ||
{ | ||
} | ||
|
||
public AuthDbContext(DbContextOptions<AuthDbContext> options) | ||
: base(options) | ||
{ | ||
} | ||
|
||
public virtual DbSet<Accesslevel> Accesslevel { get; set; } | ||
public virtual DbSet<Account> Account { get; set; } | ||
} | ||
|
||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) | ||
{ | ||
if (!optionsBuilder.IsConfigured) | ||
{ | ||
var config = Common.ConfigManager.Config.MySql.Authentication; | ||
public AuthDbContext(DbContextOptions<AuthDbContext> options) | ||
: base(options) | ||
{ | ||
} | ||
|
||
var connectionString = $"server={config.Host};port={config.Port};user={config.Username};password={config.Password};database={config.Database};{config.ConnectionOptions}"; | ||
public virtual DbSet<Accesslevel> Accesslevel { get; set; } | ||
|
||
optionsBuilder.UseMySql(connectionString, ServerVersion.AutoDetect(connectionString), builder => | ||
{ | ||
builder.EnableRetryOnFailure(10); | ||
}); | ||
} | ||
} | ||
public virtual DbSet<Account> Account { get; set; } | ||
|
||
protected override void OnModelCreating(ModelBuilder modelBuilder) | ||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) | ||
{ | ||
if (!optionsBuilder.IsConfigured) | ||
{ | ||
modelBuilder.HasCharSet("utf8") | ||
.UseCollation("utf8_general_ci"); | ||
|
||
modelBuilder.Entity<Accesslevel>(entity => | ||
{ | ||
entity.HasKey(e => e.Level) | ||
.HasName("PRIMARY"); | ||
|
||
entity.ToTable("accesslevel"); | ||
|
||
entity.HasIndex(e => e.Level, "level") | ||
.IsUnique(); | ||
|
||
entity.Property(e => e.Level) | ||
.ValueGeneratedNever() | ||
.HasColumnName("level"); | ||
var config = Common.ConfigManager.Config.MySql.Authentication; | ||
|
||
entity.Property(e => e.Name) | ||
.IsRequired() | ||
.HasMaxLength(45) | ||
.HasColumnName("name"); | ||
var connectionString = $"server={config.Host};port={config.Port};user={config.Username};password={config.Password};database={config.Database};{config.ConnectionOptions}"; | ||
|
||
entity.Property(e => e.Prefix) | ||
.HasMaxLength(45) | ||
.HasColumnName("prefix") | ||
.HasDefaultValueSql("''"); | ||
}); | ||
|
||
modelBuilder.Entity<Account>(entity => | ||
optionsBuilder.UseMySql(connectionString, ServerVersion.AutoDetect(connectionString), builder => | ||
{ | ||
entity.ToTable("account"); | ||
|
||
entity.HasIndex(e => e.AccessLevel, "accesslevel_idx"); | ||
|
||
entity.HasIndex(e => e.AccountName, "accountName_uidx") | ||
.IsUnique(); | ||
|
||
entity.Property(e => e.AccountId).HasColumnName("accountId"); | ||
|
||
entity.Property(e => e.AccessLevel).HasColumnName("accessLevel"); | ||
|
||
entity.Property(e => e.AccountName) | ||
.IsRequired() | ||
.HasMaxLength(50) | ||
.HasColumnName("accountName"); | ||
|
||
entity.Property(e => e.BanExpireTime) | ||
.HasColumnType("datetime") | ||
.HasColumnName("ban_Expire_Time"); | ||
|
||
entity.Property(e => e.BanReason) | ||
.HasMaxLength(1000) | ||
.HasColumnName("ban_Reason"); | ||
|
||
entity.Property(e => e.BannedByAccountId).HasColumnName("banned_By_Account_Id"); | ||
|
||
entity.Property(e => e.BannedTime) | ||
.HasColumnType("datetime") | ||
.HasColumnName("banned_Time"); | ||
|
||
entity.Property(e => e.CreateIP) | ||
.HasMaxLength(16) | ||
.HasColumnName("create_I_P"); | ||
|
||
entity.Property(e => e.CreateTime) | ||
.HasColumnType("datetime") | ||
.HasColumnName("create_Time") | ||
.HasDefaultValueSql("CURRENT_TIMESTAMP"); | ||
|
||
entity.Property(e => e.EmailAddress) | ||
.HasMaxLength(320) | ||
.HasColumnName("email_Address"); | ||
|
||
entity.Property(e => e.LastLoginIP) | ||
.HasMaxLength(16) | ||
.HasColumnName("last_Login_I_P"); | ||
|
||
entity.Property(e => e.LastLoginTime) | ||
.HasColumnType("datetime") | ||
.HasColumnName("last_Login_Time"); | ||
|
||
entity.Property(e => e.PasswordHash) | ||
.IsRequired() | ||
.HasMaxLength(88) | ||
.HasColumnName("passwordHash") | ||
.HasComment("base64 encoded version of the hashed passwords. 88 characters are needed to base64 encode SHA512 output."); | ||
|
||
entity.Property(e => e.PasswordSalt) | ||
.IsRequired() | ||
.HasMaxLength(88) | ||
.HasColumnName("passwordSalt") | ||
.HasDefaultValueSql("'use bcrypt'") | ||
.HasComment("This is no longer used, except to indicate if bcrypt is being employed for migration purposes. Previously: base64 encoded version of the password salt. 512 byte salts (88 characters when base64 encoded) are recommend for SHA512."); | ||
|
||
entity.Property(e => e.TotalTimesLoggedIn).HasColumnName("total_Times_Logged_In"); | ||
|
||
entity.HasOne(d => d.AccessLevelNavigation) | ||
.WithMany(p => p.Account) | ||
.HasForeignKey(d => d.AccessLevel) | ||
.OnDelete(DeleteBehavior.ClientSetNull) | ||
.HasConstraintName("fk_accesslevel"); | ||
builder.EnableRetryOnFailure(10); | ||
}); | ||
|
||
OnModelCreatingPartial(modelBuilder); | ||
} | ||
} | ||
|
||
partial void OnModelCreatingPartial(ModelBuilder modelBuilder); | ||
protected override void OnModelCreating(ModelBuilder modelBuilder) | ||
{ | ||
modelBuilder | ||
.UseCollation("utf8_general_ci") | ||
.HasCharSet("utf8mb3"); | ||
|
||
modelBuilder.Entity<Accesslevel>(entity => | ||
{ | ||
entity.HasKey(e => e.Level).HasName("PRIMARY"); | ||
|
||
entity.ToTable("accesslevel"); | ||
|
||
entity.HasIndex(e => e.Level, "level").IsUnique(); | ||
|
||
entity.Property(e => e.Level) | ||
.ValueGeneratedNever() | ||
.HasColumnName("level"); | ||
entity.Property(e => e.Name) | ||
.IsRequired() | ||
.HasMaxLength(45) | ||
.HasColumnName("name"); | ||
entity.Property(e => e.Prefix) | ||
.HasMaxLength(45) | ||
.HasDefaultValueSql("''") | ||
.HasColumnName("prefix"); | ||
}); | ||
|
||
modelBuilder.Entity<Account>(entity => | ||
{ | ||
entity.HasKey(e => e.AccountId).HasName("PRIMARY"); | ||
|
||
entity.ToTable("account"); | ||
|
||
entity.HasIndex(e => e.AccessLevel, "accesslevel_idx"); | ||
|
||
entity.HasIndex(e => e.AccountName, "accountName_uidx").IsUnique(); | ||
|
||
entity.Property(e => e.AccountId).HasColumnName("accountId"); | ||
entity.Property(e => e.AccessLevel).HasColumnName("accessLevel"); | ||
entity.Property(e => e.AccountName) | ||
.IsRequired() | ||
.HasMaxLength(50) | ||
.HasColumnName("accountName"); | ||
entity.Property(e => e.BanExpireTime) | ||
.HasColumnType("datetime") | ||
.HasColumnName("ban_Expire_Time"); | ||
entity.Property(e => e.BanReason) | ||
.HasMaxLength(1000) | ||
.HasColumnName("ban_Reason"); | ||
entity.Property(e => e.BannedByAccountId).HasColumnName("banned_By_Account_Id"); | ||
entity.Property(e => e.BannedTime) | ||
.HasColumnType("datetime") | ||
.HasColumnName("banned_Time"); | ||
entity.Property(e => e.CreateIP) | ||
.HasMaxLength(16) | ||
.HasColumnName("create_I_P"); | ||
entity.Property(e => e.CreateTime) | ||
.HasDefaultValueSql("CURRENT_TIMESTAMP") | ||
.HasColumnType("datetime") | ||
.HasColumnName("create_Time"); | ||
entity.Property(e => e.EmailAddress) | ||
.HasMaxLength(320) | ||
.HasColumnName("email_Address"); | ||
entity.Property(e => e.LastLoginIP) | ||
.HasMaxLength(16) | ||
.HasColumnName("last_Login_I_P"); | ||
entity.Property(e => e.LastLoginTime) | ||
.HasColumnType("datetime") | ||
.HasColumnName("last_Login_Time"); | ||
entity.Property(e => e.PasswordHash) | ||
.IsRequired() | ||
.HasMaxLength(88) | ||
.HasComment("base64 encoded version of the hashed passwords. 88 characters are needed to base64 encode SHA512 output.") | ||
.HasColumnName("passwordHash"); | ||
entity.Property(e => e.PasswordSalt) | ||
.IsRequired() | ||
.HasMaxLength(88) | ||
.HasDefaultValueSql("'use bcrypt'") | ||
.HasComment("This is no longer used, except to indicate if bcrypt is being employed for migration purposes. Previously: base64 encoded version of the password salt. 512 byte salts (88 characters when base64 encoded) are recommend for SHA512.") | ||
.HasColumnName("passwordSalt"); | ||
entity.Property(e => e.TotalTimesLoggedIn).HasColumnName("total_Times_Logged_In"); | ||
|
||
entity.HasOne(d => d.AccessLevelNavigation).WithMany(p => p.Account) | ||
.HasForeignKey(d => d.AccessLevel) | ||
.OnDelete(DeleteBehavior.ClientSetNull) | ||
.HasConstraintName("fk_accesslevel"); | ||
}); | ||
|
||
OnModelCreatingPartial(modelBuilder); | ||
} | ||
|
||
partial void OnModelCreatingPartial(ModelBuilder modelBuilder); | ||
} |
Oops, something went wrong.