feat(dal): заготовка для хранения истории
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.Constants;
|
||||
using PARR.DAL.Models.Base;
|
||||
using PARR.DAL.Models.Base.History;
|
||||
using PARR.DAL.Models.Base.History.Base;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
@@ -7,7 +10,7 @@ namespace PARR.DAL.Models
|
||||
{
|
||||
[Table("Templates")]
|
||||
[Index(nameof(Name), IsUnique = true)]
|
||||
public class Template : IBase, ITemplateBase
|
||||
public class Template : IBase, ITemplateGeneralProps, IHistoryInitiator, IMyHistory<TemplateHistory>
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; }
|
||||
@@ -41,12 +44,19 @@ namespace PARR.DAL.Models
|
||||
|
||||
public DateTimeOffset? LastRun { get; set; }
|
||||
|
||||
|
||||
public DateTimeOffset NextRun { get; set; }
|
||||
|
||||
|
||||
public Guid ApplicationInWorkId { get; set; }
|
||||
|
||||
|
||||
#region Initiator
|
||||
public string? InitiatorIp { get; set; }
|
||||
|
||||
public ParrComponentsEnum? InitiatorParrComponentId { get; set; }
|
||||
|
||||
public string? InitiatorComment { get; set; }
|
||||
#endregion
|
||||
|
||||
[ForeignKey(nameof(ApplicationInWorkId))]
|
||||
public ApplicationsInWork? ApplicationsInWork { get; set; }
|
||||
|
||||
@@ -62,6 +72,8 @@ namespace PARR.DAL.Models
|
||||
|
||||
public ICollection<Order> Orders { get; set; } = new HashSet<Order>();
|
||||
|
||||
//public ICollection<TemplateHistory> TemplateHistories { get; set; } = new HashSet<TemplateHistory>();
|
||||
|
||||
|
||||
public ICollection<TemplateHistory> TemplateHistories { get; set; } = new HashSet<TemplateHistory>();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user