feat(dal,api): Удалены старые таблицы AppInWorks
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models
|
||||
{
|
||||
[Table("AppInWorkInWorkGroups")]
|
||||
[PrimaryKey(nameof(ApplicationsInWorkId), nameof(WorkGroupId))]
|
||||
public class AppInWorkInWorkGroup
|
||||
{
|
||||
public Guid ApplicationsInWorkId { get; set; }
|
||||
public Guid WorkGroupId { get; set; }
|
||||
|
||||
public ApplicationsInWork? ApplicationsInWork { get; set; }
|
||||
public WorkGroup? WorkGroup { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.Domain.Entities.Base;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models
|
||||
{
|
||||
[Table("Applications")]
|
||||
[Index(nameof(Name), nameof(ApplicationTypeId), IsUnique = true)]
|
||||
public class Application : IBaseEntity
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public DateTimeOffset DateCreated { get; set; }
|
||||
|
||||
public DateTimeOffset? DateModified { get; set; }
|
||||
|
||||
public required string Name { get; set; }
|
||||
|
||||
public Guid ApplicationTypeId { get; set; }
|
||||
|
||||
[ForeignKey(nameof(ApplicationTypeId))]
|
||||
public ApplicationType? ApplicationType { get; set; }
|
||||
|
||||
|
||||
public ICollection<ApplicationInHost> ApplicationsInHosts { get; set; } = new HashSet<ApplicationInHost>();
|
||||
|
||||
public ICollection<ApplicationsInWork> ApplicationsInWorks { get; set; } = new HashSet<ApplicationsInWork>();
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
using PARR.Domain.Entities.Base;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models
|
||||
{
|
||||
[Table("ApplicationsInHost")]
|
||||
public class ApplicationInHost : IBaseEntity
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public DateTimeOffset DateCreated { get; set; }
|
||||
public DateTimeOffset? DateModified { get; set; }
|
||||
|
||||
public Guid ApplicationId { get; set; }
|
||||
|
||||
[ForeignKey(nameof(ApplicationId))]
|
||||
public Application? Application { get; set; }
|
||||
|
||||
public Guid HostId { get; set; }
|
||||
|
||||
[ForeignKey(nameof(HostId))]
|
||||
public Host? Host { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
using PARR.Domain.Entities.Base;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models
|
||||
{
|
||||
[Table("ApplicationTypes")]
|
||||
public class ApplicationType : IBaseEntity
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public DateTimeOffset DateCreated { get; set; }
|
||||
public DateTimeOffset? DateModified { get; set; }
|
||||
public required string Name { get; set; }
|
||||
public string? Description { get; set; }
|
||||
|
||||
|
||||
public ICollection<Application> Applications { get; set; } = new HashSet<Application>();
|
||||
}
|
||||
}
|
||||
@@ -1,122 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.Domain.Entities.Base;
|
||||
using PARR.Domain.Settings;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models
|
||||
{
|
||||
[Table("ApplicationsInWorks")]
|
||||
[Index(nameof(WorkId), nameof(ApplicationId), IsUnique = true)]
|
||||
public class ApplicationsInWork : IBaseEntity
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public DateTimeOffset DateCreated { get; set; }
|
||||
|
||||
public DateTimeOffset? DateModified { get; set; }
|
||||
|
||||
public Guid WorkId { get; set; }
|
||||
|
||||
public Guid ApplicationId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// TemplateDuration в формате ЕСПП
|
||||
/// </summary>
|
||||
public required string TemplateDuration { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// TemplateDuration в формате TimeSpan
|
||||
/// </summary>
|
||||
public TimeSpan? TemplateDurationTimeSpan
|
||||
{
|
||||
get
|
||||
{
|
||||
try
|
||||
{
|
||||
//ЕСПП кривоногие, они почему-то таймспан пишут так "7 00:00:00", а правильно так: "7:00:00:00"
|
||||
var durationWithTimeSpanFormat = TemplateDuration.Replace(" ", ":");
|
||||
|
||||
return TimeSpan.Parse(durationWithTimeSpanFormat);
|
||||
}
|
||||
catch
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Краткое описание
|
||||
/// </summary>
|
||||
public required string ShortDescription { get; set; }
|
||||
|
||||
|
||||
private string _fullDescription = string.Empty;
|
||||
public required string FullDescription
|
||||
{
|
||||
get
|
||||
{
|
||||
//В полное описание подставляем префикс, для дальнейшего поиска наряда
|
||||
return $"{_fullDescription}\r\n{PrefixSettings.PrefixWithoutVariable}";
|
||||
}
|
||||
set
|
||||
{
|
||||
//удаляем префикс, если он есть
|
||||
//_fullDescription = value.Replace($"\r\n{PrefixSettings.PrefixWithoutVariable}", string.Empty);
|
||||
_fullDescription = value.Replace($"{PrefixSettings.PrefixWithoutVariable}", string.Empty).TrimEnd();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Решение
|
||||
/// </summary>
|
||||
public required string Solution { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Включить автораспределение
|
||||
/// </summary>
|
||||
public bool IsAutoDistributionEnabled { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Дата начала работ
|
||||
/// </summary>
|
||||
public DateTimeOffset ReferenceDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Выполняет агент
|
||||
/// </summary>
|
||||
public bool IsAgent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Какое-то имя которое мы передаем агенту, пока непонятно что это такое.
|
||||
/// </summary>
|
||||
public string? AgentName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Сколько времени ожидать выполнение скрипта агентом (секунд)
|
||||
/// </summary>
|
||||
public int? AgentTimeOutSec { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Скрипт для автоматического выполнения
|
||||
/// </summary>
|
||||
public string? AgentScript { get; set; }
|
||||
|
||||
//[ForeignKey(nameof(WorkId))]
|
||||
//public Work? Work { get; set; }
|
||||
|
||||
[ForeignKey(nameof(ApplicationId))]
|
||||
public Application? Application { get; set; }
|
||||
|
||||
// public ICollection<Template> Templates { get; set; } = new HashSet<Template>();
|
||||
|
||||
//public ICollection<EsppSchValue> EsppSchValues { get; set; } = new HashSet<EsppSchValue>();
|
||||
|
||||
public ICollection<AppInWorkInWorkGroup> WorkGroups { get; set; } = new HashSet<AppInWorkInWorkGroup>();
|
||||
|
||||
//public JobAutoControl? JobAutoControl { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
using PARR.DAL.Context;
|
||||
using PARR.DAL.Models.Job;
|
||||
using PARR.DAL.Models.Job;
|
||||
using PARR.Domain.Constants;
|
||||
using PARR.Domain.Entities.Base;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
@@ -9,7 +9,7 @@ namespace PARR.DAL.Models
|
||||
/// <summary>
|
||||
/// Период автоматического распеделения РР
|
||||
/// </summary>
|
||||
[Table("DistributionPeriods", Schema = DataContextSettings.Schedule)]
|
||||
[Table("DistributionPeriods", Schema = DatabaseSchemas.Schedule)]
|
||||
public class DistributionPeriod : IBaseEntity
|
||||
{
|
||||
[Key]
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
using PARR.DAL.Context;
|
||||
using PARR.Domain.Constants;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models
|
||||
{
|
||||
[Table("DistributionPeriodTypes", Schema = DataContextSettings.Schedule)]
|
||||
[Table("DistributionPeriodTypes", Schema = DatabaseSchemas.Schedule)]
|
||||
public class DistributionPeriodType
|
||||
{
|
||||
[Key]
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models
|
||||
{
|
||||
[Table("EkStatuses")]
|
||||
public class EkStatus
|
||||
{
|
||||
[Key]
|
||||
public int Code { get; set; }
|
||||
|
||||
[Required]
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
public ICollection<Host> Hosts { get; set; } = new HashSet<Host>();
|
||||
|
||||
//public ICollection<JobAutoControlInEkStatus> JobAutoControlInEkStatuses { get; set; } = new HashSet<JobAutoControlInEkStatus>();
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using PARR.DAL.Context;
|
||||
using PARR.Domain.Constants;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
@@ -7,7 +8,7 @@ namespace PARR.DAL.Models
|
||||
/// <summary>
|
||||
/// Расписание ЕСПП: типы повторений
|
||||
/// </summary>
|
||||
[Table("EsppSchTypes", Schema = DataContextSettings.Schedule)]
|
||||
[Table("EsppSchTypes", Schema = DatabaseSchemas.Schedule)]
|
||||
public class EsppSchType
|
||||
{
|
||||
[Key]
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.Domain.Constants;
|
||||
using PARR.Domain.Entities.Base;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
@@ -9,7 +10,7 @@ namespace PARR.DAL.Models
|
||||
/// <summary>
|
||||
/// Расписание ЕСПП: Конфигурация типов
|
||||
/// </summary>
|
||||
[Table("EsppSchTypeConfigs", Schema = DataContextSettings.Schedule)]
|
||||
[Table("EsppSchTypeConfigs", Schema = DatabaseSchemas.Schedule)]
|
||||
[Index(nameof(TypeScheduleId), nameof(TypeId), IsUnique = true)]
|
||||
public class EsppSchTypeConfig : IBaseEntity
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using PARR.DAL.Context;
|
||||
using PARR.Domain.Constants;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
@@ -7,7 +8,7 @@ namespace PARR.DAL.Models
|
||||
/// <summary>
|
||||
/// Расписание ЕСПП: Повторять задачу
|
||||
/// </summary>
|
||||
[Table("EsppSchTypeSchedules", Schema = DataContextSettings.Schedule)]
|
||||
[Table("EsppSchTypeSchedules", Schema = DatabaseSchemas.Schedule)]
|
||||
public class EsppSchTypeSchedule
|
||||
{
|
||||
[Key]
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using PARR.DAL.Context;
|
||||
using PARR.Domain.Constants;
|
||||
using PARR.Domain.Entities.Base;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
@@ -8,7 +9,7 @@ namespace PARR.DAL.Models
|
||||
/// <summary>
|
||||
/// Расписание ЕСПП: значения типов повторений
|
||||
/// </summary>
|
||||
[Table("EsppSchTypeValues", Schema = DataContextSettings.Schedule)]
|
||||
[Table("EsppSchTypeValues", Schema = DatabaseSchemas.Schedule)]
|
||||
public class EsppSchTypeValue : IBaseEntity
|
||||
{
|
||||
[Key]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.DAL.Models.Job;
|
||||
using PARR.Domain.Constants;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models
|
||||
@@ -8,7 +9,7 @@ namespace PARR.DAL.Models
|
||||
/// <summary>
|
||||
/// Расписание ЕСПП: значения заданий для ApplicationsInWorks
|
||||
/// </summary>
|
||||
[Table("EsppSchValues", Schema = DataContextSettings.Schedule)]
|
||||
[Table("EsppSchValues", Schema = DatabaseSchemas.Schedule)]
|
||||
//[Index(nameof(ApplicationsInWorkId), nameof(TypeValueId), nameof(TypeConfigId), IsUnique = true)]
|
||||
//[PrimaryKey(nameof(ApplicationsInWorkId), nameof(TypeValueId), nameof(TypeConfigId))]
|
||||
[PrimaryKey(nameof(JobGroupId), nameof(TypeValueId), nameof(TypeConfigId))]
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.Domain.Entities.Base;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models
|
||||
{
|
||||
[Table("Hosts")]
|
||||
[Index(nameof(IP))]
|
||||
[Index(nameof(Ek), IsUnique = true)]
|
||||
public class Host : IBaseEntity
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public DateTimeOffset DateCreated { get; set; }
|
||||
|
||||
public DateTimeOffset? DateModified { get; set; }
|
||||
|
||||
public required string Ek { get; set; }
|
||||
|
||||
public int EkStatusCode { get; set; }
|
||||
|
||||
public string? IP { get; set; }
|
||||
|
||||
//public string? RegionalEK { get; set; }
|
||||
//public string? LinkEK { get; set; }
|
||||
|
||||
//TODO: удалить поле Status, вместо него использовать EkStatusCode
|
||||
//public string? StatusStr { get; set; }
|
||||
|
||||
//public string? WorkGroup { get; set; }
|
||||
|
||||
public Guid? WorkGroupId { get; set; }
|
||||
|
||||
//TODO: удалить поле ResponseAreaStr
|
||||
//public string? ResponseAreaStr { get; set; }
|
||||
|
||||
public int ResponseAreaCode { get; set; }
|
||||
|
||||
public DateTimeOffset? LastLogon { get; set; }
|
||||
|
||||
|
||||
public ICollection<ApplicationInHost> ApplicationsInHosts { get; set; } = new HashSet<ApplicationInHost>();
|
||||
|
||||
//public ICollection<Template> Templates { get; set; } = new HashSet<Template>();
|
||||
|
||||
|
||||
[ForeignKey(nameof(EkStatusCode))]
|
||||
public EkStatus? EkStatus { get; set; }
|
||||
|
||||
[ForeignKey(nameof(ResponseAreaCode))]
|
||||
public ResponseArea? ResponseArea { get; set; }
|
||||
|
||||
[ForeignKey(nameof(WorkGroupId))]
|
||||
public WorkGroup? WorkGroup { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,13 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.Domain.Constants;
|
||||
using PARR.Domain.Entities.Base;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.Job
|
||||
{
|
||||
[Table("Jobs", Schema = DataContextSettings.Job)]
|
||||
[Table("Jobs", Schema = DatabaseSchemas.Job)]
|
||||
[Comment("Таблица видов работ")]
|
||||
public class Job : IBaseEntity
|
||||
{
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.Domain.Constants;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.Job
|
||||
{
|
||||
[Table("AutoControls", Schema = DataContextSettings.Job)]
|
||||
[Table("AutoControls", Schema = DatabaseSchemas.Job)]
|
||||
[Comment("Таблица управления автоконтролем для работ")]
|
||||
public class JobAutoControl
|
||||
{
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.DAL.Models.Unit;
|
||||
using PARR.Domain.Constants;
|
||||
using PARR.Domain.Entities.Base;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.Job
|
||||
{
|
||||
[Table("FieldFilters", Schema = DataContextSettings.Job)]
|
||||
[Table("FieldFilters", Schema = DatabaseSchemas.Job)]
|
||||
[Comment("Таблица описания критериев выборки аттрибутов ЭК")]
|
||||
public class JobFieldFilter : IBaseEntity
|
||||
{
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using PARR.DAL.Context;
|
||||
using PARR.DAL.Models.Schedule;
|
||||
using PARR.DAL.Models.Unit;
|
||||
using PARR.Domain.Constants;
|
||||
using PARR.Domain.Entities.Base;
|
||||
using PARR.Domain.Settings;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
@@ -9,7 +10,7 @@ using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.Job
|
||||
{
|
||||
[Table("Groups", Schema = DataContextSettings.Job)]
|
||||
[Table("Groups", Schema = DatabaseSchemas.Job)]
|
||||
[Comment("Таблица описания групп работ, для реализации зонтиков")]
|
||||
public class JobGroup : IBaseEntity
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.Domain.Constants;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
@@ -8,7 +9,7 @@ namespace PARR.DAL.Models.Job
|
||||
/// <summary>
|
||||
/// Настройки автораспределения для JobGroup
|
||||
/// </summary>
|
||||
[Table("GroupDistributionConfigs", Schema = DataContextSettings.Job)]
|
||||
[Table("GroupDistributionConfigs", Schema = DatabaseSchemas.Job)]
|
||||
[Comment("Настройки автораспределения для группы работ")]
|
||||
public class JobGroupDistributionConfig
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.Domain.Constants;
|
||||
using PARR.Domain.Entities.Base;
|
||||
using PARR.Domain.Enums;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
@@ -7,7 +8,7 @@ using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.Job
|
||||
{
|
||||
[Table("GroupTypes", Schema = DataContextSettings.Job)]
|
||||
[Table("GroupTypes", Schema = DatabaseSchemas.Job)]
|
||||
[Comment("Таблица типов групп работ")]
|
||||
public class JobGroupType : IBaseEntity
|
||||
{
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.DAL.Models.Unit;
|
||||
using PARR.Domain.Constants;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.Job
|
||||
{
|
||||
[Table("RelationshipFilters", Schema = DataContextSettings.Job)]
|
||||
[Table("RelationshipFilters", Schema = DatabaseSchemas.Job)]
|
||||
[Comment("Таблица фильтров связей ЭК")]
|
||||
[PrimaryKey(nameof(UnitFilterId), nameof(FieldId))]
|
||||
public class JobRelationshipFilter //: IBase
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.Domain.Constants;
|
||||
using PARR.Domain.Entities.Base;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.Job
|
||||
{
|
||||
[Table("UnitFilters", Schema = DataContextSettings.Job)]
|
||||
[Table("UnitFilters", Schema = DatabaseSchemas.Job)]
|
||||
[Comment("Таблица описания критериев выборки ЭК, описание полей в АСУ ЕСПП")]
|
||||
public class JobUnitFilter : IBaseEntity
|
||||
{
|
||||
|
||||
17
PARR.DAL/Models/Removed/AppInWorkInWorkGroup.cs
Normal file
17
PARR.DAL/Models/Removed/AppInWorkInWorkGroup.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.Removed
|
||||
{
|
||||
//[Table("AppInWorkInWorkGroups")]
|
||||
//[PrimaryKey(nameof(ApplicationsInWorkId), nameof(WorkGroupId))]
|
||||
//public class AppInWorkInWorkGroup
|
||||
//{
|
||||
// public Guid ApplicationsInWorkId { get; set; }
|
||||
// public Guid WorkGroupId { get; set; }
|
||||
|
||||
// public ApplicationsInWork? ApplicationsInWork { get; set; }
|
||||
// public WorkGroup? WorkGroup { get; set; }
|
||||
|
||||
//}
|
||||
}
|
||||
31
PARR.DAL/Models/Removed/Application.cs
Normal file
31
PARR.DAL/Models/Removed/Application.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.Domain.Entities.Base;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.Removed
|
||||
{
|
||||
//[Table("Applications")]
|
||||
//[Index(nameof(Name), nameof(ApplicationTypeId), IsUnique = true)]
|
||||
//public class Application : IBaseEntity
|
||||
//{
|
||||
// [Key]
|
||||
// public Guid Id { get; set; }
|
||||
|
||||
// public DateTimeOffset DateCreated { get; set; }
|
||||
|
||||
// public DateTimeOffset? DateModified { get; set; }
|
||||
|
||||
// public required string Name { get; set; }
|
||||
|
||||
// public Guid ApplicationTypeId { get; set; }
|
||||
|
||||
// [ForeignKey(nameof(ApplicationTypeId))]
|
||||
// public ApplicationType? ApplicationType { get; set; }
|
||||
|
||||
|
||||
// public ICollection<ApplicationInHost> ApplicationsInHosts { get; set; } = new HashSet<ApplicationInHost>();
|
||||
|
||||
// public ICollection<ApplicationsInWork> ApplicationsInWorks { get; set; } = new HashSet<ApplicationsInWork>();
|
||||
//}
|
||||
}
|
||||
23
PARR.DAL/Models/Removed/ApplicationInHost.cs
Normal file
23
PARR.DAL/Models/Removed/ApplicationInHost.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using PARR.Domain.Entities.Base;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.Removed
|
||||
{
|
||||
//[Table("ApplicationsInHost")]
|
||||
//public class ApplicationInHost : IBaseEntity
|
||||
//{
|
||||
// public Guid Id { get; set; }
|
||||
// public DateTimeOffset DateCreated { get; set; }
|
||||
// public DateTimeOffset? DateModified { get; set; }
|
||||
|
||||
// public Guid ApplicationId { get; set; }
|
||||
|
||||
// [ForeignKey(nameof(ApplicationId))]
|
||||
// public Application? Application { get; set; }
|
||||
|
||||
// public Guid HostId { get; set; }
|
||||
|
||||
// [ForeignKey(nameof(HostId))]
|
||||
// public Host? Host { get; set; }
|
||||
//}
|
||||
}
|
||||
18
PARR.DAL/Models/Removed/ApplicationType.cs
Normal file
18
PARR.DAL/Models/Removed/ApplicationType.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using PARR.Domain.Entities.Base;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.Removed
|
||||
{
|
||||
//[Table("ApplicationTypes")]
|
||||
//public class ApplicationType : IBaseEntity
|
||||
//{
|
||||
// public Guid Id { get; set; }
|
||||
// public DateTimeOffset DateCreated { get; set; }
|
||||
// public DateTimeOffset? DateModified { get; set; }
|
||||
// public required string Name { get; set; }
|
||||
// public string? Description { get; set; }
|
||||
|
||||
|
||||
// public ICollection<Application> Applications { get; set; } = new HashSet<Application>();
|
||||
//}
|
||||
}
|
||||
122
PARR.DAL/Models/Removed/ApplicationsInWork.cs
Normal file
122
PARR.DAL/Models/Removed/ApplicationsInWork.cs
Normal file
@@ -0,0 +1,122 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.Domain.Entities.Base;
|
||||
using PARR.Domain.Settings;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.Removed
|
||||
{
|
||||
//[Table("ApplicationsInWorks")]
|
||||
//[Index(nameof(WorkId), nameof(ApplicationId), IsUnique = true)]
|
||||
//public class ApplicationsInWork : IBaseEntity
|
||||
//{
|
||||
// [Key]
|
||||
// public Guid Id { get; set; }
|
||||
|
||||
// public DateTimeOffset DateCreated { get; set; }
|
||||
|
||||
// public DateTimeOffset? DateModified { get; set; }
|
||||
|
||||
// public Guid WorkId { get; set; }
|
||||
|
||||
// public Guid ApplicationId { get; set; }
|
||||
|
||||
// /// <summary>
|
||||
// /// TemplateDuration в формате ЕСПП
|
||||
// /// </summary>
|
||||
// public required string TemplateDuration { get; set; }
|
||||
|
||||
// /// <summary>
|
||||
// /// TemplateDuration в формате TimeSpan
|
||||
// /// </summary>
|
||||
// public TimeSpan? TemplateDurationTimeSpan
|
||||
// {
|
||||
// get
|
||||
// {
|
||||
// try
|
||||
// {
|
||||
// //ЕСПП кривоногие, они почему-то таймспан пишут так "7 00:00:00", а правильно так: "7:00:00:00"
|
||||
// var durationWithTimeSpanFormat = TemplateDuration.Replace(" ", ":");
|
||||
|
||||
// return TimeSpan.Parse(durationWithTimeSpanFormat);
|
||||
// }
|
||||
// catch
|
||||
// {
|
||||
// return null;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// /// <summary>
|
||||
// /// Краткое описание
|
||||
// /// </summary>
|
||||
// public required string ShortDescription { get; set; }
|
||||
|
||||
|
||||
// private string _fullDescription = string.Empty;
|
||||
// public required string FullDescription
|
||||
// {
|
||||
// get
|
||||
// {
|
||||
// //В полное описание подставляем префикс, для дальнейшего поиска наряда
|
||||
// return $"{_fullDescription}\r\n{PrefixSettings.PrefixWithoutVariable}";
|
||||
// }
|
||||
// set
|
||||
// {
|
||||
// //удаляем префикс, если он есть
|
||||
// //_fullDescription = value.Replace($"\r\n{PrefixSettings.PrefixWithoutVariable}", string.Empty);
|
||||
// _fullDescription = value.Replace($"{PrefixSettings.PrefixWithoutVariable}", string.Empty).TrimEnd();
|
||||
// }
|
||||
// }
|
||||
|
||||
// /// <summary>
|
||||
// /// Решение
|
||||
// /// </summary>
|
||||
// public required string Solution { get; set; }
|
||||
|
||||
|
||||
// /// <summary>
|
||||
// /// Включить автораспределение
|
||||
// /// </summary>
|
||||
// public bool IsAutoDistributionEnabled { get; set; }
|
||||
|
||||
// /// <summary>
|
||||
// /// Дата начала работ
|
||||
// /// </summary>
|
||||
// public DateTimeOffset ReferenceDate { get; set; }
|
||||
|
||||
// /// <summary>
|
||||
// /// Выполняет агент
|
||||
// /// </summary>
|
||||
// public bool IsAgent { get; set; }
|
||||
|
||||
// /// <summary>
|
||||
// /// Какое-то имя которое мы передаем агенту, пока непонятно что это такое.
|
||||
// /// </summary>
|
||||
// public string? AgentName { get; set; }
|
||||
|
||||
// /// <summary>
|
||||
// /// Сколько времени ожидать выполнение скрипта агентом (секунд)
|
||||
// /// </summary>
|
||||
// public int? AgentTimeOutSec { get; set; }
|
||||
|
||||
// /// <summary>
|
||||
// /// Скрипт для автоматического выполнения
|
||||
// /// </summary>
|
||||
// public string? AgentScript { get; set; }
|
||||
|
||||
// //[ForeignKey(nameof(WorkId))]
|
||||
// //public Work? Work { get; set; }
|
||||
|
||||
// [ForeignKey(nameof(ApplicationId))]
|
||||
// public Application? Application { get; set; }
|
||||
|
||||
// // public ICollection<Template> Templates { get; set; } = new HashSet<Template>();
|
||||
|
||||
// //public ICollection<EsppSchValue> EsppSchValues { get; set; } = new HashSet<EsppSchValue>();
|
||||
|
||||
// public ICollection<AppInWorkInWorkGroup> WorkGroups { get; set; } = new HashSet<AppInWorkInWorkGroup>();
|
||||
|
||||
// //public JobAutoControl? JobAutoControl { get; set; }
|
||||
//}
|
||||
}
|
||||
19
PARR.DAL/Models/Removed/EkStatus.cs
Normal file
19
PARR.DAL/Models/Removed/EkStatus.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.Removed
|
||||
{
|
||||
//[Table("EkStatuses")]
|
||||
//public class EkStatus
|
||||
//{
|
||||
// [Key]
|
||||
// public int Code { get; set; }
|
||||
|
||||
// [Required]
|
||||
// public string Name { get; set; } = string.Empty;
|
||||
|
||||
// public ICollection<Host> Hosts { get; set; } = new HashSet<Host>();
|
||||
|
||||
// //public ICollection<JobAutoControlInEkStatus> JobAutoControlInEkStatuses { get; set; } = new HashSet<JobAutoControlInEkStatus>();
|
||||
//}
|
||||
}
|
||||
58
PARR.DAL/Models/Removed/Host.cs
Normal file
58
PARR.DAL/Models/Removed/Host.cs
Normal file
@@ -0,0 +1,58 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.Domain.Entities.Base;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.Removed
|
||||
{
|
||||
//[Table("Hosts")]
|
||||
//[Index(nameof(IP))]
|
||||
//[Index(nameof(Ek), IsUnique = true)]
|
||||
//public class Host : IBaseEntity
|
||||
//{
|
||||
// [Key]
|
||||
// public Guid Id { get; set; }
|
||||
|
||||
// public DateTimeOffset DateCreated { get; set; }
|
||||
|
||||
// public DateTimeOffset? DateModified { get; set; }
|
||||
|
||||
// public required string Ek { get; set; }
|
||||
|
||||
// public int EkStatusCode { get; set; }
|
||||
|
||||
// public string? IP { get; set; }
|
||||
|
||||
// //public string? RegionalEK { get; set; }
|
||||
// //public string? LinkEK { get; set; }
|
||||
|
||||
// //TODO: удалить поле Status, вместо него использовать EkStatusCode
|
||||
// //public string? StatusStr { get; set; }
|
||||
|
||||
// //public string? WorkGroup { get; set; }
|
||||
|
||||
// public Guid? WorkGroupId { get; set; }
|
||||
|
||||
// //TODO: удалить поле ResponseAreaStr
|
||||
// //public string? ResponseAreaStr { get; set; }
|
||||
|
||||
// public int ResponseAreaCode { get; set; }
|
||||
|
||||
// public DateTimeOffset? LastLogon { get; set; }
|
||||
|
||||
|
||||
// public ICollection<ApplicationInHost> ApplicationsInHosts { get; set; } = new HashSet<ApplicationInHost>();
|
||||
|
||||
// //public ICollection<Template> Templates { get; set; } = new HashSet<Template>();
|
||||
|
||||
|
||||
// [ForeignKey(nameof(EkStatusCode))]
|
||||
// public EkStatus? EkStatus { get; set; }
|
||||
|
||||
// [ForeignKey(nameof(ResponseAreaCode))]
|
||||
// public ResponseArea? ResponseArea { get; set; }
|
||||
|
||||
// [ForeignKey(nameof(WorkGroupId))]
|
||||
// public WorkGroup? WorkGroup { get; set; }
|
||||
//}
|
||||
}
|
||||
19
PARR.DAL/Models/Removed/ResponseArea.cs
Normal file
19
PARR.DAL/Models/Removed/ResponseArea.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.Removed
|
||||
{
|
||||
//[Table("ResponseAreas")]
|
||||
//public class ResponseArea
|
||||
//{
|
||||
// [Key]
|
||||
// public int Code { get; set; }
|
||||
|
||||
// [Required]
|
||||
// public string Name { get; set; } = string.Empty;
|
||||
|
||||
// public ICollection<Host> Hosts { get; set; } = new HashSet<Host>();
|
||||
|
||||
// public ICollection<WorkGroup> WorkGroups { get; set; } = new HashSet<WorkGroup>();
|
||||
//}
|
||||
}
|
||||
29
PARR.DAL/Models/Removed/WorkGroup.cs
Normal file
29
PARR.DAL/Models/Removed/WorkGroup.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using PARR.Domain.Entities.Base;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.Removed
|
||||
{
|
||||
//[Table("WorkGroups")]
|
||||
//public class WorkGroup : IBaseEntity
|
||||
//{
|
||||
// [Key]
|
||||
// public Guid Id { get; set; }
|
||||
|
||||
// public DateTimeOffset DateCreated { get; set; }
|
||||
|
||||
// [NotMapped]
|
||||
// public DateTimeOffset? DateModified { get; set; }
|
||||
|
||||
// public required string Name { get; set; }
|
||||
|
||||
// public int ResponseAreaCode { get; set; }
|
||||
|
||||
// public ICollection<Host> Hosts { get; set; } = new HashSet<Host>();
|
||||
|
||||
// public ICollection<AppInWorkInWorkGroup> AppInWorks { get; set; } = new HashSet<AppInWorkInWorkGroup>();
|
||||
|
||||
// [ForeignKey(nameof(ResponseAreaCode))]
|
||||
// public ResponseArea? ResponseArea { get; set; }
|
||||
//}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models
|
||||
{
|
||||
[Table("ResponseAreas")]
|
||||
public class ResponseArea
|
||||
{
|
||||
[Key]
|
||||
public int Code { get; set; }
|
||||
|
||||
[Required]
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
public ICollection<Host> Hosts { get; set; } = new HashSet<Host>();
|
||||
|
||||
public ICollection<WorkGroup> WorkGroups { get; set; } = new HashSet<WorkGroup>();
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.DAL.Models.Job;
|
||||
using PARR.Domain.Constants;
|
||||
using PARR.Domain.Entities.Base;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
@@ -10,7 +11,7 @@ namespace PARR.DAL.Models.Schedule
|
||||
/// <summary>
|
||||
/// Расписание регламентной работы - Тип исключения
|
||||
/// </summary>
|
||||
[Table("ExcludeTypes", Schema = DataContextSettings.Schedule)]
|
||||
[Table("ExcludeTypes", Schema = DatabaseSchemas.Schedule)]
|
||||
[Comment("Расписание регламентной работы - Тип исключения")]
|
||||
public class ScheduleExcludeType : IBaseEntity
|
||||
{
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.DAL.Models.Job;
|
||||
using PARR.Domain.Constants;
|
||||
using PARR.Domain.Entities.Base;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
@@ -10,7 +11,7 @@ namespace PARR.DAL.Models.Schedule
|
||||
/// <summary>
|
||||
/// Расписание регламентной работы, исключение - Календарь
|
||||
/// </summary>
|
||||
[Table("ExcludeTypeCalendars", Schema = DataContextSettings.Schedule)]
|
||||
[Table("ExcludeTypeCalendars", Schema = DatabaseSchemas.Schedule)]
|
||||
[Comment("Расписание регламентной работы, исключение - Календарь")]
|
||||
public class ScheduleExcludeTypeCalendar : IBaseEntity
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.Domain.Constants;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
@@ -8,7 +9,7 @@ namespace PARR.DAL.Models.Schedule
|
||||
/// <summary>
|
||||
/// Расписание в ЕСПП. Смещение часового пояса относительно МСК для зоны ответственности рабочей группы
|
||||
/// </summary>
|
||||
[Table("ResponseAreaTimeOffsets", Schema = DataContextSettings.Schedule)]
|
||||
[Table("ResponseAreaTimeOffsets", Schema = DatabaseSchemas.Schedule)]
|
||||
[Comment("Расписание в ЕСПП. Смещение часового пояса относительно МСК для зоны ответственности рабочей группы")]
|
||||
public class ScheduleResponseAreaTimeOffset
|
||||
{
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.Domain.Constants;
|
||||
using PARR.Domain.Entities.Base;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.Unit
|
||||
{
|
||||
[Table("Units", Schema = DataContextSettings.Unit)]
|
||||
[Table("Units", Schema = DatabaseSchemas.Unit)]
|
||||
[Comment("Таблица с ЭК")]
|
||||
[Index(nameof(Name), IsUnique = true)]
|
||||
public class Unit : IBaseEntity
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.DAL.Models.Job;
|
||||
using PARR.Domain.Constants;
|
||||
using PARR.Domain.Entities.Base;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
@@ -10,7 +11,7 @@ namespace PARR.DAL.Models.Unit
|
||||
/// <summary>
|
||||
/// Справочник полей ЭК (компонентный состав, ответствтвенные, любые поля)
|
||||
/// </summary>
|
||||
[Table("Fields", Schema = DataContextSettings.Unit)]
|
||||
[Table("Fields", Schema = DatabaseSchemas.Unit)]
|
||||
[Comment("Справочник полей ЭК")]
|
||||
[Index(nameof(AihitName))]
|
||||
[Index(nameof(EsppName))]
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.Domain.Constants;
|
||||
using PARR.Domain.Entities.Base;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.Unit
|
||||
{
|
||||
[Table("FieldInFieldValues", Schema = DataContextSettings.Unit)]
|
||||
[Table("FieldInFieldValues", Schema = DatabaseSchemas.Unit)]
|
||||
[Comment("Значения полей ЭК")]
|
||||
[PrimaryKey(nameof(FieldId), nameof(FieldValueId))]
|
||||
public class UnitFieldInUnitFieldValue : IBaseEntityDateCreated
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.Domain.Constants;
|
||||
using PARR.Domain.Entities.Base;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.Unit
|
||||
{
|
||||
[Table("FieldValues", Schema = DataContextSettings.Unit)]
|
||||
[Table("FieldValues", Schema = DatabaseSchemas.Unit)]
|
||||
[Comment("Значения полей ЭК")]
|
||||
[Index(nameof(Value), IsUnique = true)]
|
||||
public class UnitFieldValue : IBaseEntity
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.Domain.Constants;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.Unit
|
||||
@@ -8,7 +9,7 @@ namespace PARR.DAL.Models.Unit
|
||||
/// Связь Unit in Field
|
||||
/// </summary>
|
||||
///
|
||||
[Table("UnitInFields", Schema = DataContextSettings.Unit)]
|
||||
[Table("UnitInFields", Schema = DatabaseSchemas.Unit)]
|
||||
[Comment("Справочник полей ЭК")]
|
||||
[PrimaryKey(nameof(UnitId), nameof(FieldId))]
|
||||
public class UnitInField
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.Domain.Constants;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.Unit
|
||||
@@ -7,7 +8,7 @@ namespace PARR.DAL.Models.Unit
|
||||
/// <summary>
|
||||
/// Связи иерархии между ЭК
|
||||
/// </summary>
|
||||
[Table("UnitInUnits", Schema = DataContextSettings.Unit)]
|
||||
[Table("UnitInUnits", Schema = DatabaseSchemas.Unit)]
|
||||
[Comment("Таблица связей иерархии между ЭК")]
|
||||
[PrimaryKey(nameof(ParentUnitId), nameof(ChildUnitId))]
|
||||
public class UnitInUnit
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.Domain.Constants;
|
||||
using PARR.Domain.Entities.Base;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.Unit
|
||||
{
|
||||
|
||||
[Table("UnitInValues", Schema = DataContextSettings.Unit)]
|
||||
[Table("UnitInValues", Schema = DatabaseSchemas.Unit)]
|
||||
[Comment("Таблица связи ЭК с полями и со значениями")]
|
||||
[PrimaryKey(nameof(UnitId), nameof(FieldId), nameof(ValueId))]
|
||||
[Index(nameof(FieldId), nameof(ValueId))]
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.Domain.Constants;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
@@ -8,7 +9,7 @@ namespace PARR.DAL.Models.Unit
|
||||
/// <summary>
|
||||
/// Список ЭК КИИ, которые учавствуют в групповых работах. Создавалась как временная
|
||||
/// </summary>
|
||||
[Table("KiiUnits", Schema = DataContextSettings.Unit)]
|
||||
[Table("KiiUnits", Schema = DatabaseSchemas.Unit)]
|
||||
[Comment("Таблица - Список ЭК КИИ, которые учавствуют в групповых работах. Создавалась как временная")]
|
||||
public class UnitKiiUnit
|
||||
{
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.Domain.Constants;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.Unit
|
||||
{
|
||||
[Table("RegionalEkPtkGroups", Schema = DataContextSettings.Unit)]
|
||||
[Table("RegionalEkPtkGroups", Schema = DatabaseSchemas.Unit)]
|
||||
[Comment("Таблица - региональные группы ПТК")]
|
||||
public class UnitRegionalEkPtkGroup
|
||||
{
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.Domain.Constants;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models
|
||||
{
|
||||
[Table("UnitsInTemplates", Schema = DataContextSettings.Job)]
|
||||
[Table("UnitsInTemplates", Schema = DatabaseSchemas.Job)]
|
||||
[Comment("Таблица связи ЭК в шаблонах")]
|
||||
public class UnitsInTemplate
|
||||
{
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.Domain.Constants;
|
||||
using PARR.Domain.Entities.Base;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models
|
||||
{
|
||||
[Table("WeekendDays", Schema = DataContextSettings.Schedule)]
|
||||
[Table("WeekendDays", Schema = DatabaseSchemas.Schedule)]
|
||||
[Index(nameof(Date), IsUnique = true)]
|
||||
public class WeekendDay : IBaseEntity
|
||||
{
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
using PARR.Domain.Entities.Base;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models
|
||||
{
|
||||
[Table("WorkGroups")]
|
||||
public class WorkGroup : IBaseEntity
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public DateTimeOffset DateCreated { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public DateTimeOffset? DateModified { get; set; }
|
||||
|
||||
public required string Name { get; set; }
|
||||
|
||||
public int ResponseAreaCode { get; set; }
|
||||
|
||||
public ICollection<Host> Hosts { get; set; } = new HashSet<Host>();
|
||||
|
||||
public ICollection<AppInWorkInWorkGroup> AppInWorks { get; set; } = new HashSet<AppInWorkInWorkGroup>();
|
||||
|
||||
[ForeignKey(nameof(ResponseAreaCode))]
|
||||
public ResponseArea? ResponseArea { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user