feat: Из dal перенесены все модели в Domain. Из dal переименованы service в repository, вынесены в Core.
This commit is contained in:
25
PARR.Domain/Entities/Schedule/EsppSchType.cs
Normal file
25
PARR.Domain/Entities/Schedule/EsppSchType.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using PARR.Domain.Constants;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.Domain.Entities.Schedule
|
||||
{
|
||||
/// <summary>
|
||||
/// Расписание ЕСПП: типы повторений
|
||||
/// </summary>
|
||||
[Table("EsppSchTypes", Schema = DatabaseSchemas.Schedule)]
|
||||
public class EsppSchType
|
||||
{
|
||||
[Key]
|
||||
public int Id { get; set; }
|
||||
|
||||
public required string Name { get; set; }
|
||||
|
||||
public required string Description { get; set; }
|
||||
|
||||
|
||||
public ICollection<EsppSchTypeValue> EsppSchTypeValues { get; set; } = new HashSet<EsppSchTypeValue>();
|
||||
|
||||
public ICollection<EsppSchTypeConfig> EsppSchTypeConfigs { get; set; } = new HashSet<EsppSchTypeConfig>();
|
||||
}
|
||||
}
|
||||
38
PARR.Domain/Entities/Schedule/EsppSchTypeConfig.cs
Normal file
38
PARR.Domain/Entities/Schedule/EsppSchTypeConfig.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.Domain.Constants;
|
||||
using PARR.Domain.Entities.Base;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.Domain.Entities.Schedule
|
||||
{
|
||||
/// <summary>
|
||||
/// Расписание ЕСПП: Конфигурация типов
|
||||
/// </summary>
|
||||
[Table("EsppSchTypeConfigs", Schema = DatabaseSchemas.Schedule)]
|
||||
[Index(nameof(TypeScheduleId), nameof(TypeId), IsUnique = true)]
|
||||
public class EsppSchTypeConfig : IBaseEntity
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public DateTimeOffset DateCreated { get; set; }
|
||||
|
||||
public DateTimeOffset? DateModified { get; set; }
|
||||
|
||||
public int TypeScheduleId { get; set; }
|
||||
|
||||
public int TypeId { get; set; }
|
||||
|
||||
public int Order { get; set; }
|
||||
|
||||
[ForeignKey(nameof(TypeId))]
|
||||
public EsppSchType? EsppSchType { get; set; }
|
||||
|
||||
[ForeignKey(nameof(TypeScheduleId))]
|
||||
public EsppSchTypeSchedule? EsppSchTypeSchedule { get; set; }
|
||||
|
||||
public ICollection<EsppSchValue> EsppSchValues { get; set; } = new HashSet<EsppSchValue>();
|
||||
|
||||
}
|
||||
}
|
||||
22
PARR.Domain/Entities/Schedule/EsppSchTypeSchedule.cs
Normal file
22
PARR.Domain/Entities/Schedule/EsppSchTypeSchedule.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using PARR.Domain.Constants;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.Domain.Entities.Schedule
|
||||
{
|
||||
/// <summary>
|
||||
/// Расписание ЕСПП: Повторять задачу
|
||||
/// </summary>
|
||||
[Table("EsppSchTypeSchedules", Schema = DatabaseSchemas.Schedule)]
|
||||
public class EsppSchTypeSchedule
|
||||
{
|
||||
[Key]
|
||||
public int Id { get; set; }
|
||||
|
||||
public required string Name { get; set; }
|
||||
|
||||
public required string Description { get; set; }
|
||||
|
||||
public ICollection<EsppSchTypeConfig> EsppSchTypeConfigs { get; set; } = new HashSet<EsppSchTypeConfig>();
|
||||
}
|
||||
}
|
||||
55
PARR.Domain/Entities/Schedule/EsppSchTypeValue.cs
Normal file
55
PARR.Domain/Entities/Schedule/EsppSchTypeValue.cs
Normal file
@@ -0,0 +1,55 @@
|
||||
using PARR.Domain.Constants;
|
||||
using PARR.Domain.Entities.Base;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.Domain.Entities.Schedule
|
||||
{
|
||||
/// <summary>
|
||||
/// Расписание ЕСПП: значения типов повторений
|
||||
/// </summary>
|
||||
[Table("EsppSchTypeValues", Schema = DatabaseSchemas.Schedule)]
|
||||
public class EsppSchTypeValue : IBaseEntity
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public DateTimeOffset DateCreated { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public DateTimeOffset? DateModified { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Значение в ЕСПП, при создании/изменении расписания
|
||||
/// </summary>
|
||||
public required string Value { get; set; }
|
||||
|
||||
public int TypeId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Значение ЕСПП при отображении представления, используется при экспорте
|
||||
/// </summary>
|
||||
public required string EsppExportValue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Сортировка в интерфейсе ПАРР (для удобста должна совпадать с ЕСПП)
|
||||
/// </summary>
|
||||
public int Order { get; set; }
|
||||
|
||||
|
||||
///// <summary>
|
||||
///// Если есть связь с периодом, то есть функция автораспределения
|
||||
///// </summary>
|
||||
//public Guid? DistributionPeriodId { get; set; }
|
||||
|
||||
|
||||
//[ForeignKey(nameof(DistributionPeriodId))]
|
||||
//public DistributionPeriod? DistributionPeriod { get; set; }
|
||||
|
||||
|
||||
[ForeignKey(nameof(TypeId))]
|
||||
public EsppSchType? EsppSchType { get; set; }
|
||||
|
||||
public ICollection<EsppSchValue> EsppSchValues { get; set; } = new HashSet<EsppSchValue>();
|
||||
}
|
||||
}
|
||||
38
PARR.Domain/Entities/Schedule/EsppSchValue.cs
Normal file
38
PARR.Domain/Entities/Schedule/EsppSchValue.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.Domain.Constants;
|
||||
using PARR.Domain.Entities.Job;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.Domain.Entities.Schedule
|
||||
{
|
||||
/// <summary>
|
||||
/// Расписание ЕСПП: значения заданий для ApplicationsInWorks
|
||||
/// </summary>
|
||||
[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))]
|
||||
public class EsppSchValue
|
||||
{
|
||||
//public Guid ApplicationsInWorkId { get; set; }
|
||||
|
||||
public Guid TypeValueId { get; set; }
|
||||
|
||||
public Guid TypeConfigId { get; set; }
|
||||
|
||||
public Guid JobGroupId { get; set; }
|
||||
|
||||
|
||||
//[ForeignKey(nameof(ApplicationsInWorkId))]
|
||||
//public ApplicationsInWork? ApplicationsInWork { get; set; }
|
||||
|
||||
[ForeignKey(nameof(TypeValueId))]
|
||||
public EsppSchTypeValue? EsppSchTypeValue { get; set; }
|
||||
|
||||
[ForeignKey(nameof(TypeConfigId))]
|
||||
public EsppSchTypeConfig? EsppSchTypeConfig { get; set; }
|
||||
|
||||
[ForeignKey(nameof(JobGroupId))]
|
||||
public JobGroup? JobGroup { get; set; }
|
||||
}
|
||||
}
|
||||
39
PARR.Domain/Entities/Schedule/ScheduleExcludeType.cs
Normal file
39
PARR.Domain/Entities/Schedule/ScheduleExcludeType.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.Domain.Constants;
|
||||
using PARR.Domain.Entities.Base;
|
||||
using PARR.Domain.Entities.Job;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.Domain.Entities.Schedule
|
||||
{
|
||||
/// <summary>
|
||||
/// Расписание регламентной работы - Тип исключения
|
||||
/// </summary>
|
||||
[Table("ExcludeTypes", Schema = DatabaseSchemas.Schedule)]
|
||||
[Comment("Расписание регламентной работы - Тип исключения")]
|
||||
public class ScheduleExcludeType : IBaseEntity
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public DateTimeOffset DateCreated { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public DateTimeOffset? DateModified { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Название в ПАРР
|
||||
/// </summary>
|
||||
public required string Title { get; set; }
|
||||
|
||||
public required string EsppName { get; set; }
|
||||
|
||||
public required string EsppValue { get; set; }
|
||||
|
||||
public required string Code { get; set; }
|
||||
|
||||
|
||||
public ICollection<JobGroup> JobGroups { get; set; } = new HashSet<JobGroup>();
|
||||
}
|
||||
}
|
||||
39
PARR.Domain/Entities/Schedule/ScheduleExcludeTypeCalendar.cs
Normal file
39
PARR.Domain/Entities/Schedule/ScheduleExcludeTypeCalendar.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.Domain.Constants;
|
||||
using PARR.Domain.Entities.Base;
|
||||
using PARR.Domain.Entities.Job;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.Domain.Entities.Schedule
|
||||
{
|
||||
/// <summary>
|
||||
/// Расписание регламентной работы, исключение - Календарь
|
||||
/// </summary>
|
||||
[Table("ExcludeTypeCalendars", Schema = DatabaseSchemas.Schedule)]
|
||||
[Comment("Расписание регламентной работы, исключение - Календарь")]
|
||||
public class ScheduleExcludeTypeCalendar : IBaseEntity
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public DateTimeOffset DateCreated { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public DateTimeOffset? DateModified { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Название в ПАРР
|
||||
/// </summary>
|
||||
public required string Title { get; set; }
|
||||
|
||||
public required string EsppName { get; set; }
|
||||
|
||||
public required string EsppValue { get; set; }
|
||||
|
||||
public required string Code { get; set; }
|
||||
|
||||
|
||||
public ICollection<JobGroup> JobGroups { get; set; } = new HashSet<JobGroup>();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.Domain.Constants;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.Domain.Entities.Schedule
|
||||
{
|
||||
/// <summary>
|
||||
/// Расписание в ЕСПП. Смещение часового пояса относительно МСК для зоны ответственности рабочей группы
|
||||
/// </summary>
|
||||
[Table("ResponseAreaTimeOffsets", Schema = DatabaseSchemas.Schedule)]
|
||||
[Comment("Расписание в ЕСПП. Смещение часового пояса относительно МСК для зоны ответственности рабочей группы")]
|
||||
public class ScheduleResponseAreaTimeOffset
|
||||
{
|
||||
[Key]
|
||||
public required string ResponseArea { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// ЕСПП значение
|
||||
/// </summary>
|
||||
public required string EsppValue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Смещение относительно UTC
|
||||
/// </summary>
|
||||
public required TimeSpan UtcTimeOffset { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user