using BMA.EHR.Application.Common.Interfaces; using BMA.EHR.Domain.Models.Commands.Core; using BMA.EHR.Domain.Models.Documents; using BMA.EHR.Domain.Models.HR; using BMA.EHR.Domain.Models.Insignias; using BMA.EHR.Domain.Models.MetaData; using BMA.EHR.Domain.Models.Notifications; using BMA.EHR.Domain.Models.OrganizationEmployee; using BMA.EHR.Domain.Models.Organizations; using BMA.EHR.Domain.Models.Organizations.Report2; using BMA.EHR.Domain.Models.Placement; using BMA.EHR.Domain.Models.Probation; using BMA.EHR.Domain.Models.Retirement; using Microsoft.EntityFrameworkCore; namespace BMA.EHR.Infrastructure.Persistence { public class ApplicationDBContext : DbContext, IApplicationDBContext { #region " From Existing Database " #region " Meta Data " public DbSet Prefixes { get; set; } public DbSet BloodGroups { get; set; } public DbSet Genders { get; set; } public DbSet PhysicalStatuses { get; set; } public DbSet Religions { get; set; } public DbSet EducationLevels { get; set; } public DbSet PositionPaths { get; set; } public DbSet PositionTypes { get; set; } public DbSet PositionEmployeePositions { get; set; } public DbSet PositionEmployeePositionSides { get; set; } public DbSet PositionEmployeeGroups { get; set; } public DbSet PositionEmployeeLines { get; set; } public DbSet PositionEmployeeLevels { get; set; } public DbSet PositionEmployeeStatuses { get; set; } public DbSet PositionLines { get; set; } public DbSet PositionExecutives { get; set; } public DbSet PositionStatuss { get; set; } public DbSet PositionLevels { get; set; } public DbSet Relationships { get; set; } public DbSet Positions { get; set; } public DbSet PositionPathSides { get; set; } public DbSet PositionExecutiveSides { get; set; } public DbSet InsigniaTypes { get; set; } public DbSet Insignias { get; set; } public DbSet Provinces { get; set; } public DbSet Districts { get; set; } public DbSet SubDistricts { get; set; } public DbSet Holidays { get; set; } public DbSet OrganizationTypes { get; set; } public DbSet OrganizationLevels { get; set; } public DbSet OrganizationOrganizations { get; set; } public DbSet OrganizationShortNames { get; set; } public DbSet OrganizationStatuses { get; set; } public DbSet OrganizationAgencys { get; set; } public DbSet OrganizationGovernmentAgencys { get; set; } public DbSet OrganizationTelExternals { get; set; } public DbSet OrganizationTelInternals { get; set; } public DbSet OrganizationFaxs { get; set; } public DbSet RoyalHierarchys { get; set; } public DbSet RoyalTypes { get; set; } public DbSet Royals { get; set; } #endregion #region " Documents " public DbSet Documents { get; set; } #endregion #region " Organizations " public DbSet AvailablePositionLevels { get; set; } public DbSet PositionMasters { get; set; } public DbSet Organizations { get; set; } public DbSet PositionNumbers { get; set; } public DbSet OrganizationPositions { get; set; } public DbSet ProfilePositions { get; set; } public DbSet Report2s { get; set; } public DbSet Report2Histories { get; set; } public DbSet Report2DetailHistories { get; set; } public DbSet OrganizationPublishHistories { get; set; } #endregion #region " HR " public DbSet Profiles { get; set; } public DbSet ProfileEducations { get; set; } public DbSet ProfileEducationHistorys { get; set; } public DbSet ProfileHonors { get; set; } public DbSet ProfileHonorHistorys { get; set; } public DbSet ProfileAssessments { get; set; } public DbSet ProfileAssessmentHistorys { get; set; } public DbSet ProfileDisciplines { get; set; } public DbSet ProfileDisciplineHistorys { get; set; } public DbSet ProfileCertificates { get; set; } public DbSet ProfileCertificateHistorys { get; set; } public DbSet ProfileTrainings { get; set; } public DbSet ProfileTrainingHistorys { get; set; } public DbSet ProfileInsignias { get; set; } public DbSet ProfileInsigniaHistorys { get; set; } public DbSet ProfileSalaries { get; set; } public DbSet ProfileSalaryHistories { get; set; } public DbSet ProfileSalaryOrganizations { get; set; } public DbSet ProfileSalaryPositions { get; set; } public DbSet ProfileSalaryPositionsNumbers { get; set; } public DbSet ProfileHistory { get; set; } public DbSet ProfileCoupleHistory { get; set; } public DbSet ProfileFatherHistory { get; set; } public DbSet ProfileMotherHistory { get; set; } public DbSet ProfileFamilyHistory { get; set; } public DbSet ProfileGovernmentHistory { get; set; } public DbSet ProfileLeaves { get; set; } public DbSet ProfileLeaveHistorys { get; set; } public DbSet ProfileSalaryPositionLevels { get; set; } public DbSet ProfileSalaryPositionTypes { get; set; } public DbSet ProfileChildrens { get; set; } public DbSet ProfileChildrenHistories { get; set; } public DbSet ProfilePapers { get; set; } public DbSet ProfileCurrentAddressHistories { get; set; } public DbSet ProfileRegistrationAddressHistories { get; set; } public DbSet ProfileAddressHistories { get; set; } public DbSet ProfileOthers { get; set; } public DbSet ProfileOtherHistorys { get; set; } public DbSet ProfileAbilitys { get; set; } public DbSet ProfileAbilityHistorys { get; set; } public DbSet ProfileDutys { get; set; } public DbSet ProfileDutyHistorys { get; set; } public DbSet ProfileNopaids { get; set; } public DbSet ProfileNopaidHistorys { get; set; } public DbSet ProfileAvatarHistories { get; set; } public DbSet ProfileOrganizations { get; set; } public DbSet ProfileChangeNames { get; set; } public DbSet ProfileChangeNameHistorys { get; set; } public DbSet TypeLeaves { get; set; } public DbSet LimitLeaves { get; set; } public DbSet LimitTypeLeaves { get; set; } public DbSet ProfileEmployments { get; set; } public DbSet ProfileEmploymentHistorys { get; set; } public DbSet ProfileLeaveSummary { get; set; } #endregion #endregion #region " Placements " public DbSet Placements { get; set; } public DbSet PlacementCertificates { get; set; } public DbSet PlacementEducations { get; set; } public DbSet PlacementIsProperties { get; set; } public DbSet PlacementProfiles { get; set; } public DbSet PlacementProfileDocs { get; set; } public DbSet PlacementTypes { get; set; } public DbSet PlacementTransfers { get; set; } public DbSet PlacementReceives { get; set; } public DbSet PlacementRelocations { get; set; } public DbSet PlacementAppointments { get; set; } public DbSet PlacementAppointmentEmployee { get; set; } public DbSet PlacementTransferDocs { get; set; } public DbSet PlacementReceiveDocs { get; set; } public DbSet PlacementRelocationDocs { get; set; } public DbSet PlacementAppointmentDocs { get; set; } public DbSet PlacementOfficers { get; set; } public DbSet PlacementRepatriations { get; set; } #endregion #region " OrganizationEmployee " public DbSet OrganizationEmployees { get; set; } public DbSet OrganizationEmployeeProfiles { get; set; } public DbSet OrganizationPositionEmployeeLevels { get; set; } public DbSet OrganizationPositionEmployeePositionSides { get; set; } #endregion #region " Command " public DbSet CommandStatuses { get; set; } public DbSet CommandTypes { get; set; } public DbSet CommandDocuments { get; set; } public DbSet DeploymentChannels { get; set; } public DbSet Commands { get; set; } public DbSet CommandDeployments { get; set; } public DbSet CommandReceivers { get; set; } #endregion #region " Message Queue " public DbSet MessageQueues { get; set; } public DbSet Inboxes { get; set; } public DbSet Notifications { get; set; } #endregion #region " Insignia " public DbSet InsigniaPeriods { get; set; } public DbSet InsigniaRequests { get; set; } public DbSet InsigniaEmployees { get; set; } public DbSet InsigniaRequestProfiles { get; set; } public DbSet InsigniaManages { get; set; } public DbSet InsigniaNoteProfiles { get; set; } public DbSet InsigniaNotes { get; set; } public DbSet InsigniaNoteDocs { get; set; } public DbSet InsigniaManageOrganiations { get; set; } public DbSet InsigniaManageProfiles { get; set; } public DbSet InsigniaReclaimProfiles { get; set; } #endregion #region " Retirement " public DbSet RetirementPeriodHistorys { get; set; } public DbSet RetirementPeriods { get; set; } public DbSet RetirementProfiles { get; set; } public DbSet RetirementRawProfiles { get; set; } public DbSet RetirementDeceaseds { get; set; } public DbSet RetirementDeceasedNotis { get; set; } public DbSet RetirementResigns { get; set; } public DbSet RetirementResignApprovers { get; set; } public DbSet RetirementResignCancelApprovers { get; set; } public DbSet RetirementResignEmployeeApprovers { get; set; } public DbSet RetirementResignEmployeeCancelApprovers { get; set; } public DbSet RetirementResignCancels { get; set; } public DbSet RetirementResignDocs { get; set; } public DbSet RetirementResignDebtDocs { get; set; } public DbSet RetirementResignEmployees { get; set; } public DbSet RetirementResignEmployeeCancels { get; set; } public DbSet RetirementResignEmployeeDocs { get; set; } public DbSet RetirementResignEmployeeDebtDocs { get; set; } public DbSet RetirementOuts { get; set; } public DbSet RetirementDischarges { get; set; } public DbSet RetirementExpulsions { get; set; } public DbSet RetirementOthers { get; set; } public DbSet RetirementOtherDocs { get; set; } public DbSet RetirementEmployeeQuestions { get; set; } public DbSet RetirementQuestions { get; set; } public DbSet RetirementQuestionnaireQuestions { get; set; } #endregion #region " Probation " public DbSet CronjobNotiProbations { get; set; } #endregion public ApplicationDBContext(DbContextOptions options) : base(options) { } public Task SaveChangesAsync() { return base.SaveChangesAsync(); } public void Attatch(T entity) where T : class { Attach(entity); } } }