feat: Из dal перенесены все модели в Domain. Из dal переименованы service в repository, вынесены в Core.
This commit is contained in:
17
PARR.Domain/Entities/Removed/AppInWorkInWorkGroup.cs
Normal file
17
PARR.Domain/Entities/Removed/AppInWorkInWorkGroup.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.Domain.Entities.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.Domain/Entities/Removed/Application.cs
Normal file
31
PARR.Domain/Entities/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.Domain.Entities.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.Domain/Entities/Removed/ApplicationInHost.cs
Normal file
23
PARR.Domain/Entities/Removed/ApplicationInHost.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using PARR.Domain.Entities.Base;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.Domain.Entities.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.Domain/Entities/Removed/ApplicationType.cs
Normal file
18
PARR.Domain/Entities/Removed/ApplicationType.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using PARR.Domain.Entities.Base;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.Domain.Entities.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.Domain/Entities/Removed/ApplicationsInWork.cs
Normal file
122
PARR.Domain/Entities/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.Domain.Entities.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.Domain/Entities/Removed/EkStatus.cs
Normal file
19
PARR.Domain/Entities/Removed/EkStatus.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.Domain.Entities.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.Domain/Entities/Removed/Host.cs
Normal file
58
PARR.Domain/Entities/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.Domain.Entities.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.Domain/Entities/Removed/ResponseArea.cs
Normal file
19
PARR.Domain/Entities/Removed/ResponseArea.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.Domain.Entities.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.Domain/Entities/Removed/WorkGroup.cs
Normal file
29
PARR.Domain/Entities/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.Domain.Entities.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; }
|
||||
//}
|
||||
}
|
||||
Reference in New Issue
Block a user