54 lines
1.9 KiB
C#

using Marco.Pms.Model.Entitlements;
using Marco.Pms.Model.OrganizationModel;
using Marco.Pms.Model.Roles;
using Marco.Pms.Model.TenantModels;
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
using System.ComponentModel.DataAnnotations.Schema;
namespace Marco.Pms.Model.Employees
{
public class Employee
{
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 IsPrimary { get; set; } = false;
public bool IsSystem { get; set; } = false;
public Guid JobRoleId { get; set; }
[ForeignKey("JobRoleId")]
[ValidateNever]
public JobRole? JobRole { get; set; }
public Guid OrganizationId { get; set; } = Guid.Parse("4e3a6d31-c640-40f7-8d67-6c109fcdb9ea");
[ValidateNever]
[ForeignKey("OrganizationId")]
public Organization? Organization { get; set; }
public Guid? TenantId { get; set; }
[ValidateNever]
[ForeignKey("TenantId")]
public Tenant? Tenant { get; set; }
}
}