Files
parr_api/PARR.DAL/Models/Template.cs

45 lines
1.2 KiB
C#
Raw Normal View History

using Microsoft.EntityFrameworkCore;
using PARR.DAL.Models.Base;
2023-09-01 12:40:41 +10:00
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace PARR.DAL.Models
{
[Table("Templates")]
[Index(nameof(Name), IsUnique = true)]
2023-09-01 12:40:41 +10:00
public class Template : IBase
{
[Key]
public Guid Id { get; set; }
2023-09-01 12:40:41 +10:00
public DateTimeOffset DateCreated { get; set; }
2023-09-01 12:40:41 +10:00
public DateTimeOffset? DateModified { get; set; }
2023-09-15 16:32:46 +10:00
public required string Name { get; set; }
public bool IsActiveTemplate { get; set; }
public bool IsActiveSchedule { get; set; }
/// <summary>
/// Номер расписания еспп
/// </summary>
public string? ScheduleEsppId { 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>();
2023-09-01 12:40:41 +10:00
}
}