mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-10 07:13:58 -05:00
removed event controller, and added status to api controller
get time passed returns weeks after 90 days and months after 365
This commit is contained in:
@ -20,6 +20,9 @@ namespace SharedLibraryCore.Database
|
||||
public DbSet<EFMeta> EFMeta { get; set; }
|
||||
public DbSet<EFChangeHistory> EFChangeHistory { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// this only works if there's one connection string
|
||||
/// </summary>
|
||||
private static string _ConnectionString;
|
||||
|
||||
public DatabaseContext(DbContextOptions<DatabaseContext> opt) : base(opt) { }
|
||||
@ -29,10 +32,6 @@ namespace SharedLibraryCore.Database
|
||||
_ConnectionString = connStr;
|
||||
}
|
||||
|
||||
public DatabaseContext()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||
{
|
||||
if (string.IsNullOrEmpty(_ConnectionString))
|
||||
@ -55,7 +54,6 @@ namespace SharedLibraryCore.Database
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
// make network id unique
|
||||
@ -96,6 +94,7 @@ namespace SharedLibraryCore.Database
|
||||
modelBuilder.Entity<EFAliasLink>().ToTable("EFAliasLinks");
|
||||
modelBuilder.Entity<EFPenalty>().ToTable("EFPenalties");
|
||||
|
||||
// adapted from
|
||||
// https://aleemkhan.wordpress.com/2013/02/28/dynamically-adding-dbset-properties-in-dbcontext-for-entity-framework-code-first/
|
||||
#if !DEBUG
|
||||
foreach (string dllPath in Directory.GetFiles($"{Utilities.OperatingDirectory}Plugins"))
|
||||
|
Reference in New Issue
Block a user