31 lines
798 B
C#
31 lines
798 B
C#
using Microsoft.EntityFrameworkCore;
|
|
using PARR.DAL.Models.Base;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace PARR.DAL.Models
|
|
{
|
|
[Table("Works")]
|
|
[Index(nameof(EsppId), IsUnique = true)]
|
|
public class Work : IBase
|
|
{
|
|
[Key]
|
|
public Guid Id { get; set; }
|
|
|
|
public DateTimeOffset DateCreated { get; set; }
|
|
|
|
public DateTimeOffset? DateModified { get; set; }
|
|
|
|
public required string Name { get; set; }
|
|
|
|
public int EsppId { get; set; }
|
|
|
|
public Guid TnkId { get; set; }
|
|
|
|
[ForeignKey(nameof(TnkId))]
|
|
public Tnk? Tnk { get; set; }
|
|
|
|
public ICollection<ApplicationsInWork> ApplicationsInWorks { get; set; } = new HashSet<ApplicationsInWork>();
|
|
}
|
|
}
|