DamageAssessment_Backend/DamageAssesmentApi/DamageAssesment.Api.UsersAccess/Db/User.cs

32 lines
742 B
C#

using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text.Json.Serialization;
namespace DamageAssesment.Api.UsersAccess.Db
{
public class User
{
[Key]
public int Id { get; set; }
[ForeignKey("Employee")]
public int EmployeeId { get; set; }
[Required]
[StringLength(50)]
public string EmployeeCode { get; set; }
[ForeignKey("Role")]
[Required]
public int RoleId { get; set; }
[Required]
public bool IsActive { get; set; } = true;
[Required]
public DateTime CreateDate { get; set; } = DateTime.Now;
public DateTime? UpdateDate { get; set; }
}
}