67 lines
2.0 KiB
C#
67 lines
2.0 KiB
C#
using Microsoft.EntityFrameworkCore;
|
|
using PARR.DAL.Models.Base;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace PARR.DAL.Models
|
|
{
|
|
[Table("Templates")]
|
|
[Index(nameof(Name), IsUnique = true)]
|
|
public class Template : IBase
|
|
{
|
|
[Key]
|
|
public Guid Id { get; set; }
|
|
|
|
public DateTimeOffset DateCreated { get; set; }
|
|
|
|
public DateTimeOffset? DateModified { get; set; }
|
|
|
|
public required string Name { get; set; }
|
|
|
|
public bool IsActiveTemplate { get; set; }
|
|
|
|
public bool IsActiveSchedule { get; set; }
|
|
|
|
/// <summary>
|
|
/// Номер расписания еспп
|
|
/// </summary>
|
|
public string? ScheduleEsppId { get; set; }
|
|
|
|
|
|
///// <summary>
|
|
///// Следующая дата срабатываения генерации наряда
|
|
///// </summary>
|
|
//public DateTimeOffset NextScheduleStart { get; set; }
|
|
|
|
///// <summary>
|
|
///// Следующа дата выполнения скрипта агентом. Может быть нулл если шаблон не автоматический (не выполняется скриптом)
|
|
///// </summary>
|
|
//public DateTimeOffset? NextScriptStart { get; set; }
|
|
|
|
|
|
public DateTimeOffset? LastRun { get; set; }
|
|
|
|
|
|
public DateTimeOffset NextRun { get; set; }
|
|
|
|
|
|
public Guid ApplicationInWorkId { get; set; }
|
|
|
|
[ForeignKey(nameof(ApplicationInWorkId))]
|
|
public ApplicationsInWork? ApplicationsInWork { get; set; }
|
|
|
|
|
|
public Guid HostId { get; set; }
|
|
|
|
[ForeignKey(nameof(HostId))]
|
|
public Host? Host { get; set; }
|
|
|
|
public ICollection<RobotConfiguration> RobotConfigurations { get; set; } = new HashSet<RobotConfiguration>();
|
|
|
|
public ICollection<AgentHistory> AgentHistories { get; set; } = new HashSet<AgentHistory>();
|
|
|
|
public ICollection<Order> Orders { get; set; } = new HashSet<Order>();
|
|
|
|
}
|
|
}
|