Add Profile Table

This commit is contained in:
Suphonchai Phoonsawat 2023-06-26 15:18:39 +07:00
parent aa691fe65f
commit 68dab7a727
69 changed files with 18537 additions and 84 deletions

View file

@ -1,12 +1,10 @@
using BMA.EHR.Application.Common.Interfaces; using BMA.EHR.Application.Common.Interfaces;
using BMA.EHR.Domain.Models.Documents;
using BMA.EHR.Domain.Models.MetaData; using BMA.EHR.Domain.Models.MetaData;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using System.Security.AccessControl;
namespace BMA.EHR.Application.Repositories namespace BMA.EHR.Application.Repositories
{ {
public class PrefixRepository : GenericRepository<Guid, Document> public class PrefixRepository : GenericRepository<Guid, Prefix>
{ {
private readonly IApplicationDBContext _dbContext; private readonly IApplicationDBContext _dbContext;
private readonly IHttpContextAccessor _httpContextAccessor; private readonly IHttpContextAccessor _httpContextAccessor;

View file

@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
namespace BMA.EHR.Organization.Service.Models namespace BMA.EHR.Domain.Models.Base
{ {
public class EntityLinkBase public class EntityLinkBase
{ {

View file

@ -1,7 +1,7 @@
using BMA.EHR.Domain.Models.Base; using BMA.EHR.Domain.Models.Base;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
namespace BMA.EHR.Profile.Service.Models.HR namespace BMA.EHR.Domain.Models.HR
{ {
public class LimitLeave : EntityBase public class LimitLeave : EntityBase
{ {

View file

@ -2,7 +2,7 @@
using BMA.EHR.Domain.Models.Base; using BMA.EHR.Domain.Models.Base;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
namespace BMA.EHR.Profile.Service.Models.HR namespace BMA.EHR.Domain.Models.HR
{ {
public class LimitTypeLeave : EntityBase public class LimitTypeLeave : EntityBase
{ {

View file

@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore;
using BMA.EHR.Domain.Models.Base; using BMA.EHR.Domain.Models.Base;
using BMA.EHR.Domain.Models.Documents; using BMA.EHR.Domain.Models.Documents;
namespace BMA.EHR.Profile.Service.Models.HR namespace BMA.EHR.Domain.Models.HR
{ {
public class Profile : EntityBase public class Profile : EntityBase
{ {

View file

@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations;
using BMA.EHR.Domain.Models.Base; using BMA.EHR.Domain.Models.Base;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
namespace BMA.EHR.Profile.Service.Models.HR namespace BMA.EHR.Domain.Models.HR
{ {
public class ProfileAbility : EntityBase public class ProfileAbility : EntityBase
{ {

View file

@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations;
using BMA.EHR.Domain.Models.Base; using BMA.EHR.Domain.Models.Base;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
namespace BMA.EHR.Profile.Service.Models.HR namespace BMA.EHR.Domain.Models.HR
{ {
public class ProfileAbilityHistory : EntityBase public class ProfileAbilityHistory : EntityBase
{ {

View file

@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations;
using BMA.EHR.Domain.Models.Base; using BMA.EHR.Domain.Models.Base;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
namespace BMA.EHR.Profile.Service.Models.HR namespace BMA.EHR.Domain.Models.HR
{ {
public class ProfileAddressHistory : EntityBase public class ProfileAddressHistory : EntityBase
{ {

View file

@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations;
using BMA.EHR.Domain.Models.Base; using BMA.EHR.Domain.Models.Base;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
namespace BMA.EHR.Profile.Service.Models.HR namespace BMA.EHR.Domain.Models.HR
{ {
public class ProfileAssessment : EntityBase public class ProfileAssessment : EntityBase
{ {

View file

@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations;
using BMA.EHR.Domain.Models.Base; using BMA.EHR.Domain.Models.Base;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
namespace BMA.EHR.Profile.Service.Models.HR namespace BMA.EHR.Domain.Models.HR
{ {
public class ProfileAssessmentHistory : EntityBase public class ProfileAssessmentHistory : EntityBase
{ {

View file

@ -2,7 +2,7 @@
using BMA.EHR.Domain.Models.Documents; using BMA.EHR.Domain.Models.Documents;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
namespace BMA.EHR.Profile.Service.Models.HR namespace BMA.EHR.Domain.Models.HR
{ {
public class ProfileAvatarHistory : EntityBase public class ProfileAvatarHistory : EntityBase
{ {

View file

@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations;
using BMA.EHR.Domain.Models.Base; using BMA.EHR.Domain.Models.Base;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
namespace BMA.EHR.Profile.Service.Models.HR namespace BMA.EHR.Domain.Models.HR
{ {
public class ProfileCertificate : EntityBase public class ProfileCertificate : EntityBase
{ {

View file

@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations;
using BMA.EHR.Domain.Models.Base; using BMA.EHR.Domain.Models.Base;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
namespace BMA.EHR.Profile.Service.Models.HR namespace BMA.EHR.Domain.Models.HR
{ {
public class ProfileCertificateHistory : EntityBase public class ProfileCertificateHistory : EntityBase
{ {

View file

@ -3,7 +3,7 @@ using BMA.EHR.Domain.Models.Documents;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
namespace BMA.EHR.Profile.Service.Models.HR namespace BMA.EHR.Domain.Models.HR
{ {
public class ProfileChangeName : EntityBase public class ProfileChangeName : EntityBase
{ {

View file

@ -3,7 +3,7 @@ using BMA.EHR.Domain.Models.Documents;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
namespace BMA.EHR.Profile.Service.Models.HR namespace BMA.EHR.Domain.Models.HR
{ {
public class ProfileChangeNameHistory : EntityBase public class ProfileChangeNameHistory : EntityBase
{ {

View file

@ -2,7 +2,7 @@
using BMA.EHR.Domain.Models.Base; using BMA.EHR.Domain.Models.Base;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
namespace BMA.EHR.Profile.Service.Models.HR namespace BMA.EHR.Domain.Models.HR
{ {
public class ProfileChildren : EntityBase public class ProfileChildren : EntityBase
{ {

View file

@ -2,7 +2,7 @@
using BMA.EHR.Domain.Models.Base; using BMA.EHR.Domain.Models.Base;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
namespace BMA.EHR.Profile.Service.Models.HR namespace BMA.EHR.Domain.Models.HR
{ {
public class ProfileChildrenHistory : EntityBase public class ProfileChildrenHistory : EntityBase
{ {

View file

@ -2,7 +2,7 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
namespace BMA.EHR.Profile.Service.Models.HR namespace BMA.EHR.Domain.Models.HR
{ {
public class ProfileCoupleHistory public class ProfileCoupleHistory
{ {

View file

@ -2,7 +2,7 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
namespace BMA.EHR.Profile.Service.Models.HR namespace BMA.EHR.Domain.Models.HR
{ {
public class ProfileCurrentAddressHistory public class ProfileCurrentAddressHistory
{ {

View file

@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations.Schema;
using BMA.EHR.Domain.Models.Base; using BMA.EHR.Domain.Models.Base;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
namespace BMA.EHR.Profile.Service.Models.HR namespace BMA.EHR.Domain.Models.HR
{ {
public class ProfileDiscipline : EntityBase public class ProfileDiscipline : EntityBase
{ {

View file

@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations.Schema;
using BMA.EHR.Domain.Models.Base; using BMA.EHR.Domain.Models.Base;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
namespace BMA.EHR.Profile.Service.Models.HR namespace BMA.EHR.Domain.Models.HR
{ {
public class ProfileDisciplineHistory : EntityBase public class ProfileDisciplineHistory : EntityBase
{ {

View file

@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations;
using BMA.EHR.Domain.Models.Base; using BMA.EHR.Domain.Models.Base;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
namespace BMA.EHR.Profile.Service.Models.HR namespace BMA.EHR.Domain.Models.HR
{ {
public class ProfileDuty : EntityBase public class ProfileDuty : EntityBase
{ {

View file

@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations;
using BMA.EHR.Domain.Models.Base; using BMA.EHR.Domain.Models.Base;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
namespace BMA.EHR.Profile.Service.Models.HR namespace BMA.EHR.Domain.Models.HR
{ {
public class ProfileDutyHistory : EntityBase public class ProfileDutyHistory : EntityBase
{ {

View file

@ -2,7 +2,7 @@
using BMA.EHR.Domain.Models.Base; using BMA.EHR.Domain.Models.Base;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
namespace BMA.EHR.Profile.Service.Models.HR namespace BMA.EHR.Domain.Models.HR
{ {
public class ProfileEducation : EntityBase public class ProfileEducation : EntityBase
{ {

View file

@ -2,7 +2,7 @@
using BMA.EHR.Domain.Models.Base; using BMA.EHR.Domain.Models.Base;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
namespace BMA.EHR.Profile.Service.Models.HR namespace BMA.EHR.Domain.Models.HR
{ {
public class ProfileEducationHistory : EntityBase public class ProfileEducationHistory : EntityBase
{ {

View file

@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations;
using BMA.EHR.Domain.Models.Base; using BMA.EHR.Domain.Models.Base;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
namespace BMA.EHR.Profile.Service.Models.HR namespace BMA.EHR.Domain.Models.HR
{ {
public class ProfileFamilyHistory : EntityBase public class ProfileFamilyHistory : EntityBase
{ {

View file

@ -2,7 +2,7 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
namespace BMA.EHR.Profile.Service.Models.HR namespace BMA.EHR.Domain.Models.HR
{ {
public class ProfileFatherHistory public class ProfileFatherHistory
{ {

View file

@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations;
using BMA.EHR.Domain.Models.Base; using BMA.EHR.Domain.Models.Base;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
namespace BMA.EHR.Profile.Service.Models.HR namespace BMA.EHR.Domain.Models.HR
{ {
public class ProfileGovernmentHistory : EntityBase public class ProfileGovernmentHistory : EntityBase
{ {

View file

@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using BMA.EHR.Domain.Models.Base; using BMA.EHR.Domain.Models.Base;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
namespace BMA.EHR.Profile.Service.Models.HR namespace BMA.EHR.Domain.Models.HR
{ {
public class ProfileHistory : EntityBase public class ProfileHistory : EntityBase
{ {

View file

@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations;
using BMA.EHR.Domain.Models.Base; using BMA.EHR.Domain.Models.Base;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
namespace BMA.EHR.Profile.Service.Models.HR namespace BMA.EHR.Domain.Models.HR
{ {
public class ProfileHonor : EntityBase public class ProfileHonor : EntityBase
{ {

View file

@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations;
using BMA.EHR.Domain.Models.Base; using BMA.EHR.Domain.Models.Base;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
namespace BMA.EHR.Profile.Service.Models.HR namespace BMA.EHR.Domain.Models.HR
{ {
public class ProfileHonorHistory : EntityBase public class ProfileHonorHistory : EntityBase
{ {

View file

@ -2,7 +2,7 @@
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using BMA.EHR.Domain.Models.Base; using BMA.EHR.Domain.Models.Base;
namespace BMA.EHR.Profile.Service.Models.HR namespace BMA.EHR.Domain.Models.HR
{ {
public class ProfileInsignia : EntityBase public class ProfileInsignia : EntityBase
{ {

View file

@ -2,7 +2,7 @@
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using BMA.EHR.Domain.Models.Base; using BMA.EHR.Domain.Models.Base;
namespace BMA.EHR.Profile.Service.Models.HR namespace BMA.EHR.Domain.Models.HR
{ {
public class ProfileInsigniaHistory : EntityBase public class ProfileInsigniaHistory : EntityBase
{ {

View file

@ -2,7 +2,7 @@
using BMA.EHR.Domain.Models.Base; using BMA.EHR.Domain.Models.Base;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
namespace BMA.EHR.Profile.Service.Models.HR namespace BMA.EHR.Domain.Models.HR
{ {
public class ProfileLeave : EntityBase public class ProfileLeave : EntityBase
{ {

View file

@ -2,7 +2,7 @@
using BMA.EHR.Domain.Models.Base; using BMA.EHR.Domain.Models.Base;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
namespace BMA.EHR.Profile.Service.Models.HR namespace BMA.EHR.Domain.Models.HR
{ {
public class ProfileLeaveHistory : EntityBase public class ProfileLeaveHistory : EntityBase
{ {

View file

@ -2,7 +2,7 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
namespace BMA.EHR.Profile.Service.Models.HR namespace BMA.EHR.Domain.Models.HR
{ {
public class ProfileMotherHistory public class ProfileMotherHistory
{ {

View file

@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations;
using BMA.EHR.Domain.Models.Base; using BMA.EHR.Domain.Models.Base;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
namespace BMA.EHR.Profile.Service.Models.HR namespace BMA.EHR.Domain.Models.HR
{ {
public class ProfileNopaid : EntityBase public class ProfileNopaid : EntityBase
{ {

View file

@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations;
using BMA.EHR.Domain.Models.Base; using BMA.EHR.Domain.Models.Base;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
namespace BMA.EHR.Profile.Service.Models.HR namespace BMA.EHR.Domain.Models.HR
{ {
public class ProfileNopaidHistory : EntityBase public class ProfileNopaidHistory : EntityBase
{ {

View file

@ -1,7 +1,7 @@
using BMA.EHR.Domain.Models.Base; using BMA.EHR.Domain.Models.Base;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
namespace BMA.EHR.Profile.Service.Models.HR namespace BMA.EHR.Domain.Models.HR
{ {
public class ProfileOrganization : EntityBase public class ProfileOrganization : EntityBase
{ {

View file

@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations.Schema;
using BMA.EHR.Domain.Models.Base; using BMA.EHR.Domain.Models.Base;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
namespace BMA.EHR.Profile.Service.Models.HR namespace BMA.EHR.Domain.Models.HR
{ {
public class ProfileOther : EntityBase public class ProfileOther : EntityBase
{ {

View file

@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using BMA.EHR.Domain.Models.Base; using BMA.EHR.Domain.Models.Base;
namespace BMA.EHR.Profile.Service.Models.HR namespace BMA.EHR.Domain.Models.HR
{ {
public class ProfileOtherHistory : EntityBase public class ProfileOtherHistory : EntityBase
{ {

View file

@ -3,7 +3,7 @@ using BMA.EHR.Domain.Models.Documents;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
namespace BMA.EHR.Profile.Service.Models.HR namespace BMA.EHR.Domain.Models.HR
{ {
public class ProfilePaper : EntityBase public class ProfilePaper : EntityBase
{ {

View file

@ -2,7 +2,7 @@
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
namespace BMA.EHR.Profile.Service.Models.HR namespace BMA.EHR.Domain.Models.HR
{ {
public class ProfileRegistrationAddressHistory public class ProfileRegistrationAddressHistory
{ {

View file

@ -1,7 +1,7 @@
using BMA.EHR.Domain.Models.Base; using BMA.EHR.Domain.Models.Base;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
namespace BMA.EHR.Profile.Service.Models.HR namespace BMA.EHR.Domain.Models.HR
{ {
public class ProfileSalary : EntityBase public class ProfileSalary : EntityBase
{ {

View file

@ -1,7 +1,7 @@
using BMA.EHR.Domain.Models.Base; using BMA.EHR.Domain.Models.Base;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
namespace BMA.EHR.Profile.Service.Models.HR namespace BMA.EHR.Domain.Models.HR
{ {
public class ProfileSalaryHistory : EntityBase public class ProfileSalaryHistory : EntityBase
{ {

View file

@ -1,9 +1,8 @@
using BMA.EHR.Profile.Service.Models; using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace BMA.EHR.Profile.Service.Models.HR namespace BMA.EHR.Domain.Models.HR
{ {
public class ProfileSalaryOrganization public class ProfileSalaryOrganization
{ {

View file

@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace BMA.EHR.Profile.Service.Models.HR namespace BMA.EHR.Domain.Models.HR
{ {
public class ProfileSalaryPosition public class ProfileSalaryPosition
{ {

View file

@ -2,7 +2,7 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace BMA.EHR.Profile.Service.Models.HR namespace BMA.EHR.Domain.Models.HR
{ {
public class ProfileSalaryPositionLevel public class ProfileSalaryPositionLevel
{ {

View file

@ -1,9 +1,8 @@
using BMA.EHR.Profile.Service.Models; using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace BMA.EHR.Profile.Service.Models.HR namespace BMA.EHR.Domain.Models.HR
{ {
public class ProfileSalaryPositionNumber public class ProfileSalaryPositionNumber
{ {

View file

@ -2,7 +2,7 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace BMA.EHR.Profile.Service.Models.HR namespace BMA.EHR.Domain.Models.HR
{ {
public class ProfileSalaryPositionType public class ProfileSalaryPositionType
{ {

View file

@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using BMA.EHR.Domain.Models.Base; using BMA.EHR.Domain.Models.Base;
namespace BMA.EHR.Profile.Service.Models.HR namespace BMA.EHR.Domain.Models.HR
{ {
public class ProfileTraining : EntityBase public class ProfileTraining : EntityBase
{ {

View file

@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using BMA.EHR.Domain.Models.Base; using BMA.EHR.Domain.Models.Base;
namespace BMA.EHR.Profile.Service.Models.HR namespace BMA.EHR.Domain.Models.HR
{ {
public class ProfileTrainingHistory : EntityBase public class ProfileTrainingHistory : EntityBase
{ {

View file

@ -2,7 +2,7 @@
using BMA.EHR.Domain.Models.Base; using BMA.EHR.Domain.Models.Base;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
namespace BMA.EHR.Profile.Service.Models.HR namespace BMA.EHR.Domain.Models.HR
{ {
public class TypeLeave : EntityBase public class TypeLeave : EntityBase
{ {

View file

@ -1,15 +0,0 @@
using BMA.EHR.Domain.Models.Base;
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations.Schema;
namespace BMA.EHR.Organization.Service.Models
{
public class OrganizationPublishHistoryEntity : EntityBase
{
[Column(Order = 1), Comment("รายละเอียดการแก้ไข")]
public string Detail { get; set; } = string.Empty;
[Column(Order = 2), Comment("เก็บ Object ที่มีการอัพเดตในระบบ")]
public string ObjectValue { get; set; } = string.Empty;
}
}

View file

@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace BMA.EHR.Organization.Service.Models namespace BMA.EHR.Domain.Models.Organizations
{ {
public class AvailablePositionLevelEntity : EntityBase public class AvailablePositionLevelEntity : EntityBase
{ {

View file

@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using BMA.EHR.Domain.Models.Base; using BMA.EHR.Domain.Models.Base;
namespace BMA.EHR.Organization.Service.Models namespace BMA.EHR.Domain.Models.Organizations
{ {
public class OrganizationEntity : EntityBase public class OrganizationEntity : EntityBase
{ {

View file

@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace BMA.EHR.Organization.Service.Models namespace BMA.EHR.Domain.Models.Organizations
{ {
public class OrganizationPositionEntity : EntityBase public class OrganizationPositionEntity : EntityBase
{ {

View file

@ -0,0 +1,15 @@
using BMA.EHR.Domain.Models.Base;
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations.Schema;
namespace BMA.EHR.Domain.Models.Organizations
{
public class OrganizationPublishHistoryEntity : EntityBase
{
[Column(Order = 1), Comment("รายละเอียดการแก้ไข")]
public string Detail { get; set; } = string.Empty;
[Column(Order = 2), Comment("เก็บ Object ที่มีการอัพเดตในระบบ")]
public string ObjectValue { get; set; } = string.Empty;
}
}

View file

@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using BMA.EHR.Domain.Models.Base; using BMA.EHR.Domain.Models.Base;
namespace BMA.EHR.Organization.Service.Models namespace BMA.EHR.Domain.Models.Organizations
{ {
public class PositionMasterEntity : EntityBase public class PositionMasterEntity : EntityBase
{ {

View file

@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using BMA.EHR.Domain.Models.Base; using BMA.EHR.Domain.Models.Base;
namespace BMA.EHR.Organization.Service.Models namespace BMA.EHR.Domain.Models.Organizations
{ {
public class PositionMasterHistoryEntity : EntityBase public class PositionMasterHistoryEntity : EntityBase
{ {

View file

@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using BMA.EHR.Domain.Models.Base; using BMA.EHR.Domain.Models.Base;
namespace BMA.EHR.Organization.Service.Models namespace BMA.EHR.Domain.Models.Organizations
{ {
public class PositionNumberEntity : EntityBase public class PositionNumberEntity : EntityBase
{ {

View file

@ -1,6 +1,6 @@
using BMA.EHR.Domain.Models.Base; using BMA.EHR.Domain.Models.Base;
namespace BMA.EHR.Organization.Service.Models namespace BMA.EHR.Domain.Models.Organizations
{ {
/// <summary> /// <summary>
/// Link Profile กับ OrganizationPosition /// Link Profile กับ OrganizationPosition

View file

@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using BMA.EHR.Domain.Models.Base; using BMA.EHR.Domain.Models.Base;
namespace BMA.EHR.Organization.Service.Models.Report2 namespace BMA.EHR.Domain.Models.Organizations.Report2
{ {
public class Report2 : EntityBase public class Report2 : EntityBase
{ {

View file

@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using BMA.EHR.Domain.Models.Base; using BMA.EHR.Domain.Models.Base;
namespace BMA.EHR.Organization.Service.Models.Report2 namespace BMA.EHR.Domain.Models.Organizations.Report2
{ {
public class Report2DetailHistory : EntityBase public class Report2DetailHistory : EntityBase
{ {

View file

@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using BMA.EHR.Domain.Models.Base; using BMA.EHR.Domain.Models.Base;
namespace BMA.EHR.Organization.Service.Models.Report2 namespace BMA.EHR.Domain.Models.Organizations.Report2
{ {
public class Report2History : EntityBase public class Report2History : EntityBase
{ {

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,22 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace BMA.EHR.Infrastructure.Migrations
{
/// <inheritdoc />
public partial class AddExistDbtoProject : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
}
}
}

View file

@ -1,6 +1,9 @@
using BMA.EHR.Application.Common.Interfaces; using BMA.EHR.Application.Common.Interfaces;
using BMA.EHR.Domain.Models.Documents; using BMA.EHR.Domain.Models.Documents;
using BMA.EHR.Domain.Models.HR;
using BMA.EHR.Domain.Models.MetaData; using BMA.EHR.Domain.Models.MetaData;
using BMA.EHR.Domain.Models.Organizations;
using BMA.EHR.Domain.Models.Organizations.Report2;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
namespace BMA.EHR.Infrastructure.Persistence namespace BMA.EHR.Infrastructure.Persistence
@ -101,6 +104,136 @@ namespace BMA.EHR.Infrastructure.Persistence
#endregion #endregion
#region " Organizations "
public DbSet<AvailablePositionLevelEntity> AvailablePositionLevels { get; set; }
public DbSet<PositionMasterEntity> PositionMasters { get; set; }
public DbSet<OrganizationEntity> Organizations { get; set; }
public DbSet<PositionNumberEntity> PositionNumbers { get; set; }
public DbSet<OrganizationPositionEntity> OrganizationPositions { get; set; }
public DbSet<ProfilePosition> ProfilePositions { get; set; }
public DbSet<Report2> Report2s { get; set; }
public DbSet<Report2History> Report2Histories { get; set; }
public DbSet<Report2DetailHistory> Report2DetailHistories { get; set; }
public DbSet<OrganizationPublishHistoryEntity> OrganizationPublishHistories { get; set; }
#endregion
#region " HR "
public DbSet<Profile> Profiles { get; set; }
public DbSet<ProfileEducation> ProfileEducations { get; set; }
public DbSet<ProfileEducationHistory> ProfileEducationHistorys { get; set; }
public DbSet<ProfileHonor> ProfileHonors { get; set; }
public DbSet<ProfileHonorHistory> ProfileHonorHistorys { get; set; }
public DbSet<ProfileAssessment> ProfileAssessments { get; set; }
public DbSet<ProfileAssessmentHistory> ProfileAssessmentHistorys { get; set; }
public DbSet<ProfileDiscipline> ProfileDisciplines { get; set; }
public DbSet<ProfileDisciplineHistory> ProfileDisciplineHistorys { get; set; }
public DbSet<ProfileCertificate> ProfileCertificates { get; set; }
public DbSet<ProfileCertificateHistory> ProfileCertificateHistorys { get; set; }
public DbSet<ProfileTraining> ProfileTrainings { get; set; }
public DbSet<ProfileTrainingHistory> ProfileTrainingHistorys { get; set; }
public DbSet<ProfileInsignia> ProfileInsignias { get; set; }
public DbSet<ProfileInsigniaHistory> ProfileInsigniaHistorys { get; set; }
public DbSet<ProfileSalary> ProfileSalaries { get; set; }
public DbSet<ProfileSalaryHistory> ProfileSalaryHistories { get; set; }
public DbSet<ProfileSalaryOrganization> ProfileSalaryOrganizations { get; set; }
public DbSet<ProfileSalaryPosition> ProfileSalaryPositions { get; set; }
public DbSet<ProfileSalaryPositionNumber> ProfileSalaryPositionsNumbers { get; set; }
public DbSet<ProfileHistory> ProfileHistory { get; set; }
public DbSet<ProfileCoupleHistory> ProfileCoupleHistory { get; set; }
public DbSet<ProfileFatherHistory> ProfileFatherHistory { get; set; }
public DbSet<ProfileMotherHistory> ProfileMotherHistory { get; set; }
public DbSet<ProfileFamilyHistory> ProfileFamilyHistory { get; set; }
public DbSet<ProfileGovernmentHistory> ProfileGovernmentHistory { get; set; }
public DbSet<ProfileLeave> ProfileLeaves { get; set; }
public DbSet<ProfileLeaveHistory> ProfileLeaveHistorys { get; set; }
public DbSet<ProfileSalaryPositionLevel> ProfileSalaryPositionLevels { get; set; }
public DbSet<ProfileSalaryPositionType> ProfileSalaryPositionTypes { get; set; }
public DbSet<ProfileChildren> ProfileChildrens { get; set; }
public DbSet<ProfileChildrenHistory> ProfileChildrenHistories { get; set; }
public DbSet<ProfilePaper> ProfilePapers { get; set; }
public DbSet<ProfileCurrentAddressHistory> ProfileCurrentAddressHistories { get; set; }
public DbSet<ProfileRegistrationAddressHistory> ProfileRegistrationAddressHistories { get; set; }
public DbSet<ProfileAddressHistory> ProfileAddressHistories { get; set; }
public DbSet<ProfileOther> ProfileOthers { get; set; }
public DbSet<ProfileOtherHistory> ProfileOtherHistorys { get; set; }
public DbSet<ProfileAbility> ProfileAbilitys { get; set; }
public DbSet<ProfileAbilityHistory> ProfileAbilityHistorys { get; set; }
public DbSet<ProfileDuty> ProfileDutys { get; set; }
public DbSet<ProfileDutyHistory> ProfileDutyHistorys { get; set; }
public DbSet<ProfileNopaid> ProfileNopaids { get; set; }
public DbSet<ProfileNopaidHistory> ProfileNopaidHistorys { get; set; }
public DbSet<ProfileAvatarHistory> ProfileAvatarHistories { get; set; }
public DbSet<ProfileOrganization> ProfileOrganizations { get; set; }
public DbSet<ProfileChangeName> ProfileChangeNames { get; set; }
public DbSet<ProfileChangeNameHistory> ProfileChangeNameHistorys { get; set; }
public DbSet<TypeLeave> TypeLeaves { get; set; }
public DbSet<LimitLeave> LimitLeaves { get; set; }
public DbSet<LimitTypeLeave> LimitTypeLeaves { get; set; }
#endregion
#endregion #endregion
public ApplicationDBContext(DbContextOptions<ApplicationDBContext> options) : base(options) public ApplicationDBContext(DbContextOptions<ApplicationDBContext> options) : base(options)