using Marco.Pms.Model.Entitlements; using Marco.Pms.Model.Roles; using Marco.Pms.Model.Utilities; using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; using System.ComponentModel.DataAnnotations.Schema; namespace Marco.Pms.Model.Employees { public class Employee : TenantRelation { public Guid Id { get; set; } public string FirstName { get; set; } = string.Empty; 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 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 bool HasApplicationAccess { get; set; } = false; public bool IsSystem { get; set; } = false; public Guid JobRoleId { get; set; } [ForeignKey("JobRoleId")] [ValidateNever] public JobRole? JobRole { get; set; } } }