Developer 02 8d88148b98 feat(core): Core-Bibliotheken auf 2.0.0.0 aktualisiert und IUnique implementiert
- `IUnique`-Schnittstelle in allen Entitäten implementiert.
- Interface für DbContext erstellt und DbSet-Eigenschaften in den Konstruktoren über Repositories injiziert.
2024-09-20 00:25:57 +02:00

58 lines
1.5 KiB
C#

using DigitalData.Core.Abstractions;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace DigitalData.UserManager.Domain.Entities
{
[Table("TBDD_USER_MODULES", Schema = "dbo")]
public class ModuleOfUser : IUnique<int>
{
[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? 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
}
}