Обновление моделей Templates, Works, Hosts, Settings
This commit is contained in:
@@ -4,6 +4,7 @@ using PARR.DAL.Models;
|
||||
using PARR.DAL.Models.AIHIT;
|
||||
using PARR.DAL.Models.V1;
|
||||
using System.ComponentModel;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace PARR.DAL.Context
|
||||
{
|
||||
@@ -29,7 +30,7 @@ namespace PARR.DAL.Context
|
||||
public DbSet<ApplicationType> ApplicationTypes { get; set; }
|
||||
public DbSet<ApplicationInHost> ApplicationsInHosts { get; set; }
|
||||
|
||||
public DbSet<Setting> Settings { get; set; }
|
||||
public DbSet<Models.AIHIT.Setting> Settings { get; set; }
|
||||
public DbSet<RawDataEK> RawDataEKs { get; set; }
|
||||
public DbSet<Template> Templates { get; set; }
|
||||
public DbSet<StatusTemplate> StatusTemplates { get; set; }
|
||||
@@ -41,6 +42,7 @@ namespace PARR.DAL.Context
|
||||
|
||||
public DbSet<ApplicationsInWork> ApplicationsInWorks { get; set; }
|
||||
|
||||
public DbSet<Models.Setting> Setting { get; set; }
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
@@ -95,6 +97,15 @@ namespace PARR.DAL.Context
|
||||
);
|
||||
});
|
||||
|
||||
modelBuilder.Entity<Models.Setting>(f =>
|
||||
{
|
||||
f.HasData(
|
||||
new { Name = SettingsEnum.Initiator.ToString(), Description = "Инициатор регламентной работы, указывается при создании шаблона в ЕСПП.", Type = SettingsTypesEnum.String.ToString(), Value = "" },
|
||||
new { Name = SettingsEnum.ClosingCode.ToString(), Description = "Код закрытия регламентной работы, указывается при создании шаблона в ЕСПП.", Type = SettingsTypesEnum.String.ToString(), Value = "выполнен" },
|
||||
new { Name = SettingsEnum.Category.ToString(), Description = "Категория создаваемого объекта в ЕСПП", Type = SettingsTypesEnum.String.ToString(), Value = "регламентная работа" }
|
||||
);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user