Добавлен префикс таблицам первой структуры базы

This commit is contained in:
Mikhail Kuznetsov
2023-08-10 10:14:41 +10:00
parent f3538fdd5d
commit 39b1333969
38 changed files with 157 additions and 450 deletions

View File

@@ -8,16 +8,16 @@ namespace PARR.DAL.Context
{
public DataContext(DbContextOptions<DataContext> options) : base(options) { }
public DbSet<JobType> JobTypes { get; set; }
public DbSet<JobCategory> JobCategories { get; set; }
public DbSet<JobMode> JobModes { get; set; }
public DbSet<JobStatus> JobStatuses { get; set; }
public DbSet<Host> Hosts { get; set; }
public DbSet<Job> Jobs { get; set; }
public DbSet<JobJournal> JobJournals { get; set; }
public DbSet<Application> Applications { get; set; }
public DbSet<ApplicationType> ApplicationTypes { get; set; }
public DbSet<ApplicationInHost> ApplicationsInHosts { get; set; }
public DbSet<V1_JobType> JobTypes { get; set; }
public DbSet<V1_JobCategory> JobCategories { get; set; }
public DbSet<V1_JobMode> JobModes { get; set; }
public DbSet<V1_JobStatus> JobStatuses { get; set; }
public DbSet<V1_Host> Hosts { get; set; }
public DbSet<V1_Job> Jobs { get; set; }
public DbSet<V1_JobJournal> JobJournals { get; set; }
public DbSet<V1_Application> Applications { get; set; }
public DbSet<V1_ApplicationType> ApplicationTypes { get; set; }
public DbSet<V1_ApplicationInHost> ApplicationsInHosts { get; set; }
//public DbSet<Scheduler> Schedulers { get; set; }
//todo init application type+check migrations
@@ -28,7 +28,7 @@ namespace PARR.DAL.Context
var dateCreated = new DateTimeOffset(2023, 05, 01, 0, 0, 0, new TimeSpan(0));
modelBuilder.Entity<JobMode>(f =>
modelBuilder.Entity<V1_JobMode>(f =>
{
f.HasData(
new() { Id = new Guid("FBA4202C-5BAD-49C4-B076-D1CA6E1FB158"), DateCreated = dateCreated, DateModified = null, Name = JobModeEnum.auto.ToString() },
@@ -36,7 +36,7 @@ namespace PARR.DAL.Context
);
});
modelBuilder.Entity<JobStatus>(f =>
modelBuilder.Entity<V1_JobStatus>(f =>
{
f.HasData(
new() { Id = new Guid("EDEF6DC3-ADAD-4C77-8AD1-63BB9052355A"), DateCreated = dateCreated, DateModified = null, Name = JobStatusEnum.started.ToString(), Description = "Задание запущено" },
@@ -45,7 +45,7 @@ namespace PARR.DAL.Context
});
modelBuilder.Entity<ApplicationType>(f =>
modelBuilder.Entity<V1_ApplicationType>(f =>
{
f.HasData(
new() { Id = new Guid("32c28386-6f13-4f7b-8508-be165b7fabdb"), DateCreated = dateCreated, DateModified = null, Name = ApplicationTypesEnum.APP.ToString(), Description = "Поле СП xml АИХ ИТ" },