using System.ComponentModel.DataAnnotations.Schema; using Marco.Pms.Model.Entitlements; using Marco.Pms.Model.Utilities; using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; namespace Marco.Pms.Model.Employees { public class Employee : TenantRelation { public Guid Id { get; set; } public string? FirstName { get; set; } public string? LastName { get; set; } public string? MiddleName { get; set; } public string? Email { get; set; } public string? Gender { get; set; } public DateTime? BirthDate { get; set; } public DateTime? JoiningDate { get; set; } public string? PermanentAddress { get; set; } public string? CurrentAddress { get; set; } public string? PhoneNumber { get; set; } public string? EmergencyPhoneNumber { get; set; } public string? EmergencyContactPerson { get; set; } public string? AadharNumber { get; set; } public string? PanNumber { get; set; } public byte[]? Photo { get; set; } // To store the captured photo public string? ApplicationUserId { get; set; } [ForeignKey("ApplicationUserId")] [ValidateNever] public ApplicationUser? ApplicationUser { get; set; } public bool IsActive { get; set; } = true; public Guid RoleId { get; set; } //[ForeignKey(nameof(RoleId))] //public EmployeeRole EmployeeRole { get; set; } public Guid? JobRoleId { get; set; } [ForeignKey("JobRoleId")] [ValidateNever] public JobRole? JobRole { get; set; } } }