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

43 lines
1017 B
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 IsActive { get; set; }
public int StatusCode { get; set; }
[ForeignKey(nameof(StatusCode))]
public StatusTemplate? StatusTemplate { 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; }
}
}