2024-03-07 11:15:47 +01:00

56 lines
1.4 KiB
C#

using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace DigitalData.UserManager.Domain.Entities
{
[Table("TBDD_USER_MODULES", Schema = "dbo")]
public class ModuleOfUser
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Guid { 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? Comment { get; set; }
[Column("ADDED_WHO")]
[StringLength(50)]
public string? AddedWho { get; set; } = "DEFAULT";
[Column("CHANGED_WHO")]
[StringLength(50)]
public string? ChangedWho { get; set; }
[ForeignKey("UserId")]
public virtual User? User { get; set; }
[ForeignKey("ModuleId")]
public virtual Module? 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
}
}