using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; namespace DigitalData.UserManager.Domain.Entities { [Table("TBDD_USER_MODULES", Schema = "dbo")] public class ModuleOfUser { [Column("GUID")] [Key] [DatabaseGenerated(DatabaseGeneratedOption.Identity)] public int Id { get; set; } [Column("USER_ID")] [Required] public int UserId { get; set; } [Column("MODULE_ID")] [Required] public int ModuleId { get; set; } [Column("COMMENT")] [StringLength(200)] public string #if NET7_0_OR_GREATER ? #endif Comment { get; set; } [Column("ADDED_WHO")] [StringLength(50)] public string #if NET7_0_OR_GREATER ? #endif AddedWho { get; set; } = "DEFAULT"; [Column("CHANGED_WHO")] [StringLength(50)] public string #if NET7_0_OR_GREATER ? #endif ChangedWho { get; set; } [ForeignKey("UserId")] public virtual User #if NET7_0_OR_GREATER ? #endif User { get; set; } [ForeignKey("ModuleId")] public virtual Module #if NET7_0_OR_GREATER ? #endif Module { get; set; } #region IGNORED COLUMNS //public bool IsAdmin { get; set; } //public bool Right1 { get; set; } //public bool Right2 { get; set; } //public bool Right3 { get; set; } //public bool Right4 { get; set; } //public DateTime? AddedWhen { get; set; } //public DateTime? ChangedWhen { get; set; } #endregion } }