51 lines
1.4 KiB
C#
51 lines
1.4 KiB
C#
using System.ComponentModel.DataAnnotations.Schema;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel;
|
|
|
|
namespace DigitalData.UserManager.Domain.Entities
|
|
{
|
|
[Table("TBDD_USER_REPRESENTATION", Schema = "dbo")]
|
|
public class UserRep
|
|
{
|
|
[Column("GUID")]
|
|
[Key]
|
|
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
|
public int Id { get; set; }
|
|
|
|
[Required]
|
|
[Column("USER_ID")]
|
|
public int UserId { get; set; }
|
|
|
|
[Column("REPR_GROUP")]
|
|
public int? RepGroupId { get; set; }
|
|
|
|
[Required]
|
|
[Column("RIGHT_GROUP")]
|
|
public int RightGroupId { get; set; }
|
|
|
|
[Required]
|
|
[StringLength(50)]
|
|
[DefaultValue("DEFAULT")]
|
|
[Column("ADDED_WHO")]
|
|
public string AddedWho { get; set; }
|
|
|
|
[StringLength(50)]
|
|
[Column("CHANGED_WHO")]
|
|
public string? ChangedWho { get; set; }
|
|
|
|
[Column("REPR_USER")]
|
|
public int? RepUserId { get; set; }
|
|
|
|
[ForeignKey("UserId")]
|
|
public virtual User? User { get; set; }
|
|
|
|
[ForeignKey("RepGroupId")]
|
|
public virtual Group? RepGroup { get; set; }
|
|
|
|
[ForeignKey("RightGroupId")]
|
|
public virtual Group? RightGroup { get; set; }
|
|
|
|
[ForeignKey("RepUserId")]
|
|
public virtual User? RepUser { get; set; }
|
|
}
|
|
} |