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; } // /// // /// TemplateDuration в формате ЕСПП // /// // public required string TemplateDuration { get; set; } // /// // /// TemplateDuration в формате TimeSpan // /// // public TimeSpan? TemplateDurationTimeSpan // { // get // { // try // { // //ЕСПП кривоногие, они почему-то таймспан пишут так "7 00:00:00", а правильно так: "7:00:00:00" // var durationWithTimeSpanFormat = TemplateDuration.Replace(" ", ":"); // return TimeSpan.Parse(durationWithTimeSpanFormat); // } // catch // { // return null; // } // } // } // /// // /// Краткое описание // /// // 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(); // } // } // /// // /// Решение // /// // public required string Solution { get; set; } // /// // /// Включить автораспределение // /// // public bool IsAutoDistributionEnabled { get; set; } // /// // /// Дата начала работ // /// // public DateTimeOffset ReferenceDate { get; set; } // /// // /// Выполняет агент // /// // public bool IsAgent { get; set; } // /// // /// Какое-то имя которое мы передаем агенту, пока непонятно что это такое. // /// // public string? AgentName { get; set; } // /// // /// Сколько времени ожидать выполнение скрипта агентом (секунд) // /// // public int? AgentTimeOutSec { get; set; } // /// // /// Скрипт для автоматического выполнения // /// // public string? AgentScript { get; set; } // //[ForeignKey(nameof(WorkId))] // //public Work? Work { get; set; } // [ForeignKey(nameof(ApplicationId))] // public Application? Application { get; set; } // // public ICollection