using System.ComponentModel.DataAnnotations; namespace WebAPI.Models { public enum LayerType { import, processed, administration, } public class Layer { #region Properties [Key] public Guid Id { get; set; } [Required] public int Number { get; set; } [Required] public string? Source { get; set; } [Required] public string Name { get; set; } [Required] public LayerType Type { get; set; } [Required] public DateTime CreatedAt { get; set; } [Required] public DateTime ModifiedAt { get; set; } [Required] public bool IsDeleted { get; set; } #endregion #region Relations public ICollection? Records { get; set; } public ICollection? Sources { get; set; } [Required] public Guid CreatedById { get; set; } public User? CreatedBy { get; set; } [Required] public Guid ModifiedById { get; set; } public User? ModifiedBy { get; set; } public Guid? ParentId { get; set; } public Layer? Parent { get; set; } #endregion } }