ย้ายมาออกรายงานผ่านระบบ

This commit is contained in:
Suphonchai Phoonsawat 2023-05-10 20:11:47 +07:00
parent 4987f7c5ad
commit b817b781d2
144 changed files with 5573 additions and 63 deletions

View file

@ -0,0 +1,15 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
namespace BMA.EHR.MetaData.Service.Models
{
public class BloodGroup : EntityBase
{
[Required, MaxLength(2), Column(Order = 1), Comment("ชื่อหมู่โลหิต")]
public string Name { get; set; } = string.Empty;
[Column(Order = 2), Comment("สถานะการใช้งาน")]
public bool IsActive { get; set; } = true;
}
}

View file

@ -0,0 +1,20 @@
using Microsoft.EntityFrameworkCore;
using Org.BouncyCastle.Asn1.X509;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
namespace BMA.EHR.MetaData.Service.Models
{
public class District : EntityBase
{
[Required, MaxLength(150), Column(Order = 1), Comment("เขต/อำเภอ")]
public string Name { get; set; } = string.Empty;
[Column(Order = 2), Comment("สถานะการใช้งาน")]
public bool IsActive { get; set; } = true;
public virtual List<SubDistrict> SubDistricts { get; set; } = new();
public virtual Province? Province { get; set; }
}
}

View file

@ -0,0 +1,15 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
namespace BMA.EHR.MetaData.Service.Models
{
public class EducationLevel : EntityBase
{
[Required, MaxLength(100), Column(Order = 1), Comment("ระดับการศึกษา")]
public string Name { get; set; } = string.Empty;
[Column(Order = 2), Comment("สถานะการใช้งาน")]
public bool IsActive { get; set; } = true;
}
}

View file

@ -0,0 +1,32 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text.Json.Serialization;
namespace BMA.EHR.MetaData.Service.Models
{
public class EntityBase
{
[Key, Column(Order = 0), Comment("PrimaryKey")]
[JsonPropertyName("id")]
public Guid Id { get; set; }
[Required, Column(Order = 100), Comment("สร้างข้อมูลเมื่อ")]
public DateTime CreatedAt { get; set; } = DateTime.Now;
[Column(Order = 101), Comment("User Id ที่สร้างข้อมูล"), MaxLength(40)]
public string CreatedUserId { get; set; } = string.Empty;
[Column(Order = 102), Comment("แก้ไขข้อมูลล่าสุดเมื่อ")]
public DateTime? LastUpdatedAt { get; set; }
[Column(Order = 103), Comment("User Id ที่แก้ไขข้อมูลล่าสุด"), MaxLength(40)]
public string LastUpdateUserId { get; set; } = string.Empty;
[Column(Order = 104), Comment("ชื่อ User ที่สร้างข้อมูล"), MaxLength(200)]
public string CreatedFullName { get; set; } = string.Empty;
[Column(Order = 105), Comment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"), MaxLength(200)]
public string LastUpdateFullName { get; set; } = string.Empty;
}
}

15
Models/MetaData/Gendor.cs Normal file
View file

@ -0,0 +1,15 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
namespace BMA.EHR.MetaData.Service.Models
{
public class Gender : EntityBase
{
[Required, MaxLength(20), Column(Order = 1), Comment("เพศ")]
public string Name { get; set; } = string.Empty;
[Column(Order = 2), Comment("สถานะการใช้งาน")]
public bool IsActive { get; set; } = true;
}
}

View file

@ -0,0 +1,27 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace BMA.EHR.MetaData.Service.Models
{
public class Holiday : EntityBase
{
[Required, Column(Order = 1), Comment("ประจำปี")]
public int Year { get; set; } = 0;
[Required, Column(Order = 2), Comment("วันหยุด")]
public DateTime HolidayDate { get; set; } = DateTime.Now.Date;
[Required, Column(Order = 3), Comment("วันหยุด(Original)")]
public DateTime OriginalDate { get; set; } = DateTime.Now.Date;
[Required, MaxLength(250), Column(Order = 4), Comment("ชื่อวันหยุด")]
public string Name { get; set; } = string.Empty;
[Required, Column(Order = 5), Comment("เป็นวันหยุดพิเศษหรือไม่")]
public bool IsSpecial { get; set; } = true;
[Required, Column(Order = 6), Comment("ประเภทของวันหยุดสำหรับ ทำงาน 5 วัน=`NORMAL`,ทำงาน 6 วัน=`6DAYS`")]
public string Category { get; set; } = "NORMAL";
}
}

View file

@ -0,0 +1,23 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
namespace BMA.EHR.MetaData.Service.Models
{
public class Insignia: EntityBase
{
[Required, MaxLength(50), Column(Order = 1), Comment("ชื่อเครื่องราชย์")]
public string Name { get; set; } = string.Empty;
[Required, MaxLength(10), Column(Order = 2), Comment("ชื่อย่อเครื่องราชย์")]
public string ShortName { get; set; } = string.Empty;
[Column(Order = 3), Comment("สถานะการใช้งาน")]
public bool IsActive { get; set; } = true;
[Column(Order = 4), Comment("ลำดับชั้นของเครื่องราชย์ เอาไว้ตรวจสอบเวลาขอว่าต้องได้ชั้นที่สูงกว่าที่เคยได้รับแล้วเท่านั้น")]
public int Level { get; set; } = 0;
public virtual InsigniaType? InsigniaType { get; set; }
}
}

View file

@ -0,0 +1,16 @@
using Microsoft.EntityFrameworkCore;
using Org.BouncyCastle.Asn1.X509;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
namespace BMA.EHR.MetaData.Service.Models
{
public class InsigniaType : EntityBase
{
[Required, MaxLength(50), Column(Order = 1), Comment("ชื่อประเภทเครื่องราชย์")]
public string Name { get; set; } = string.Empty;
[Column(Order = 2), Comment("สถานะการใช้งาน")]
public bool IsActive { get; set; } = true;
}
}

View file

@ -0,0 +1,15 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace BMA.EHR.MetaData.Service.Models
{
public class OrganizationAgency : EntityBase
{
[Required, MaxLength(100), Column(Order = 1), Comment("ข้อมูลโครงสร้างหน่วยงานชื่อ หน่วยงานต้นสังกัด")]
public string Name { get; set; } = string.Empty;
[Column(Order = 2), Comment("สถานะการใช้งาน")]
public bool IsActive { get; set; } = true;
}
}

View file

@ -0,0 +1,15 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace BMA.EHR.MetaData.Service.Models
{
public class OrganizationFax : EntityBase
{
[Required, MaxLength(100), Column(Order = 1), Comment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์โทรสาร")]
public string Name { get; set; } = string.Empty;
[Column(Order = 2), Comment("สถานะการใช้งาน")]
public bool IsActive { get; set; } = true;
}
}

View file

@ -0,0 +1,15 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace BMA.EHR.MetaData.Service.Models
{
public class OrganizationGovernmentAgency : EntityBase
{
[Required, MaxLength(100), Column(Order = 1), Comment("ข้อมูลโครงสร้างหน่วยงานชื่อ ส่วนราชการต้นสังกัด")]
public string Name { get; set; } = string.Empty;
[Column(Order = 2), Comment("สถานะการใช้งาน")]
public bool IsActive { get; set; } = true;
}
}

View file

@ -0,0 +1,15 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace BMA.EHR.MetaData.Service.Models
{
public class OrganizationLevel : EntityBase
{
[Required, MaxLength(100), Column(Order = 1), Comment("ข้อมูลโครงสร้างหน่วยงานชื่อ ระดับ")]
public string Name { get; set; } = string.Empty;
[Column(Order = 2), Comment("สถานะการใช้งาน")]
public bool IsActive { get; set; } = true;
}
}

View file

@ -0,0 +1,15 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace BMA.EHR.MetaData.Service.Models
{
public class OrganizationOrganization : EntityBase
{
[Required, MaxLength(100), Column(Order = 1), Comment("ข้อมูลโครงสร้างหน่วยงานชื่อ หน่วยงาน")]
public string Name { get; set; } = string.Empty;
[Column(Order = 2), Comment("สถานะการใช้งาน")]
public bool IsActive { get; set; } = true;
}
}

View file

@ -0,0 +1,19 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace BMA.EHR.MetaData.Service.Models
{
public class OrganizationShortName : EntityBase
{
[Required, MaxLength(100), Column(Order = 1), Comment("ข้อมูลโครงสร้างหน่วยงานชื่อ รหัสหน่วยงาน")]
public string AgencyCode { get; set; } = string.Empty;
[Required, MaxLength(100), Column(Order = 2), Comment("ข้อมูลโครงสร้างหน่วยงานชื่อ รหัสส่วนราชการ")]
public string GovernmentCode { get; set; } = string.Empty;
[Required, MaxLength(100), Column(Order = 3), Comment("ข้อมูลโครงสร้างหน่วยงานชื่อ ตัวย่อหน่วยงาน")]
public string Name { get; set; } = string.Empty;
[Column(Order = 4), Comment("สถานะการใช้งาน")]
public bool IsActive { get; set; } = true;
}
}

View file

@ -0,0 +1,15 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace BMA.EHR.MetaData.Service.Models
{
public class OrganizationStatus : EntityBase
{
[Required, MaxLength(100), Column(Order = 1), Comment("ข้อมูลโครงสร้างหน่วยงานชื่อ สถานะ")]
public string Name { get; set; } = string.Empty;
[Column(Order = 2), Comment("สถานะการใช้งาน")]
public bool IsActive { get; set; } = true;
}
}

View file

@ -0,0 +1,15 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace BMA.EHR.MetaData.Service.Models
{
public class OrganizationTelExternal : EntityBase
{
[Required, MaxLength(100), Column(Order = 1), Comment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์ติดต่อภายนอก")]
public string Name { get; set; } = string.Empty;
[Column(Order = 2), Comment("สถานะการใช้งาน")]
public bool IsActive { get; set; } = true;
}
}

View file

@ -0,0 +1,15 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace BMA.EHR.MetaData.Service.Models
{
public class OrganizationTelInternal : EntityBase
{
[Required, MaxLength(100), Column(Order = 1), Comment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์ติดต่อภายใน")]
public string Name { get; set; } = string.Empty;
[Column(Order = 2), Comment("สถานะการใช้งาน")]
public bool IsActive { get; set; } = true;
}
}

View file

@ -0,0 +1,15 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace BMA.EHR.MetaData.Service.Models
{
public class OrganizationType : EntityBase
{
[Required, MaxLength(100), Column(Order = 1), Comment("ข้อมูลโครงสร้างหน่วยงานชื่อ ประเภท")]
public string Name { get; set; } = string.Empty;
[Column(Order = 2), Comment("สถานะการใช้งาน")]
public bool IsActive { get; set; } = true;
}
}

View file

@ -0,0 +1,16 @@
using Microsoft.EntityFrameworkCore;
using Org.BouncyCastle.Asn1.X509;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
namespace BMA.EHR.MetaData.Service.Models
{
public class PhysicalStatus : EntityBase
{
[Required, MaxLength(100), Column(Order = 1), Comment("สถานภาพทางกาย")]
public string Name { get; set; } = string.Empty;
[Column(Order = 2), Comment("สถานะการใช้งาน")]
public bool IsActive { get; set; } = true;
}
}

View file

@ -0,0 +1,36 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace BMA.EHR.MetaData.Service.Models
{
public class Position : EntityBase
{
[Required, MaxLength(300), Column(Order = 1), Comment("ชื่อตำแหน่งในสายงาน")]
public string Name { get; set; } = string.Empty;
[MaxLength(300), Column(Order = 2), Comment("ด้านของสายงาน")]
public virtual PositionPathSide? PathSide { get; set; }
[MaxLength(300), Column(Order = 3), Comment("ชื่อตำแหน่งทางการบริหาร")]
public string ExecutiveName { get; set; } = string.Empty;
[MaxLength(300), Column(Order = 4), Comment("ด้านทางการบริหาร")]
public virtual PositionExecutiveSide? ExecutiveSide { get; set; }
[Column(Order = 5), Comment("สายงาน")]
public virtual PositionPath? PositionPath { get; set; }
[Column(Order = 6), Comment("ตำแหน่งประเภท")]
public virtual PositionType? PositionType { get; set; }
[Column(Order = 7), Comment("ระดับ")]
public virtual PositionLevel? PositionLevel { get; set; }
[Column(Order = 8),Comment("ตำแหน่งสำหรับข้าราชการหรือลูกจ้าง officer/employee")]
public string PositionCategory { get; set; } = string.Empty;
[Column(Order = 9), Comment("สถานะการใช้งาน")]
public bool IsActive { get; set; } = true;
}
}

View file

@ -0,0 +1,15 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace BMA.EHR.MetaData.Service.Models
{
public class PositionEmployeeGroup : EntityBase
{
[Required, MaxLength(100), Column(Order = 1), Comment("ชื่อกลุ่มงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ")]
public string Name { get; set; } = string.Empty;
[Column(Order = 2), Comment("สถานะการใช้งาน")]
public bool IsActive { get; set; } = true;
}
}

View file

@ -0,0 +1,15 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace BMA.EHR.MetaData.Service.Models
{
public class PositionEmployeeLevel : EntityBase
{
[Required, MaxLength(100), Column(Order = 1), Comment("ชื่อระดับชั้นงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ")]
public string Name { get; set; } = string.Empty;
[Column(Order = 2), Comment("สถานะการใช้งาน")]
public bool IsActive { get; set; } = true;
}
}

View file

@ -0,0 +1,15 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace BMA.EHR.MetaData.Service.Models
{
public class PositionEmployeeLine : EntityBase
{
[Required, MaxLength(100), Column(Order = 1), Comment("ชื่อสายงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ")]
public string Name { get; set; } = string.Empty;
[Column(Order = 2), Comment("สถานะการใช้งาน")]
public bool IsActive { get; set; } = true;
}
}

View file

@ -0,0 +1,15 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace BMA.EHR.MetaData.Service.Models
{
public class PositionEmployeePosition : EntityBase
{
[Required, MaxLength(100), Column(Order = 1), Comment("ชื่อตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ")]
public string Name { get; set; } = string.Empty;
[Column(Order = 2), Comment("สถานะการใช้งาน")]
public bool IsActive { get; set; } = true;
}
}

View file

@ -0,0 +1,15 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace BMA.EHR.MetaData.Service.Models
{
public class PositionEmployeePositionSide : EntityBase
{
[Required, MaxLength(100), Column(Order = 1), Comment("ชื่อด้านของตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ")]
public string Name { get; set; } = string.Empty;
[Column(Order = 2), Comment("สถานะการใช้งาน")]
public bool IsActive { get; set; } = true;
}
}

View file

@ -0,0 +1,15 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace BMA.EHR.MetaData.Service.Models
{
public class PositionEmployeeStatus : EntityBase
{
[Required, MaxLength(100), Column(Order = 1), Comment("ชื่อสถานะของตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ")]
public string Name { get; set; } = string.Empty;
[Column(Order = 2), Comment("สถานะการใช้งาน")]
public bool IsActive { get; set; } = true;
}
}

View file

@ -0,0 +1,15 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace BMA.EHR.MetaData.Service.Models
{
public class PositionExecutive : EntityBase
{
[Required, MaxLength(100), Column(Order = 1), Comment("ชื่อตำแหน่งทางการบริหารของข้อมูลตำแหน่งของข้าราชการ")]
public string Name { get; set; } = string.Empty;
[Column(Order = 2), Comment("สถานะการใช้งาน")]
public bool IsActive { get; set; } = true;
}
}

View file

@ -0,0 +1,16 @@
using Microsoft.EntityFrameworkCore;
using Org.BouncyCastle.Asn1.X509;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
namespace BMA.EHR.MetaData.Service.Models
{
public class PositionExecutiveSide : EntityBase
{
[Required, MaxLength(100), Column(Order = 1), Comment("ชื่อด้านทางการบริหาร")]
public string Name { get; set; } = string.Empty;
[Column(Order = 2), Comment("สถานะการใช้งาน")]
public bool IsActive { get; set; } = true;
}
}

View file

@ -0,0 +1,18 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
namespace BMA.EHR.MetaData.Service.Models
{
public class PositionLevel : EntityBase
{
[Required, MaxLength(100), Column(Order = 1), Comment("ชื่อระดับตำแหน่ง")]
public string Name { get; set; } = string.Empty;
[Required, MaxLength(100), Column(Order = 2), Comment("ชื่อย่อระดับตำแหน่ง")]
public string ShortName { get; set; } = string.Empty;
[Column(Order = 3), Comment("สถานะการใช้งาน")]
public bool IsActive { get; set; } = true;
}
}

View file

@ -0,0 +1,15 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace BMA.EHR.MetaData.Service.Models
{
public class PositionLine : EntityBase
{
[Required, MaxLength(100), Column(Order = 1), Comment("ชื่อสายงานของข้อมูลตำแหน่งของข้าราชการ")]
public string Name { get; set; } = string.Empty;
[Column(Order = 2), Comment("สถานะการใช้งาน")]
public bool IsActive { get; set; } = true;
}
}

View file

@ -0,0 +1,15 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace BMA.EHR.MetaData.Service.Models
{
public class PositionPath : EntityBase
{
[Required, MaxLength(100), Column(Order = 1), Comment("ชื่อสายงาน")]
public string Name { get; set; } = string.Empty;
[Column(Order = 2), Comment("สถานะการใช้งาน")]
public bool IsActive { get; set; } = true;
}
}

View file

@ -0,0 +1,16 @@
using Microsoft.EntityFrameworkCore;
using Org.BouncyCastle.Asn1.X509;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
namespace BMA.EHR.MetaData.Service.Models
{
public class PositionPathSide : EntityBase
{
[Required, MaxLength(100), Column(Order = 1), Comment("ชื่อด้านของสายงาน")]
public string Name { get; set; } = string.Empty;
[Column(Order = 2), Comment("สถานะการใช้งาน")]
public bool IsActive { get; set; } = true;
}
}

View file

@ -0,0 +1,15 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace BMA.EHR.MetaData.Service.Models
{
public class PositionStatus : EntityBase
{
[Required, MaxLength(100), Column(Order = 1), Comment("ชื่อสถานะของตำแหน่งของข้อมูลตำแหน่งของข้าราชการ")]
public string Name { get; set; } = string.Empty;
[Column(Order = 2), Comment("สถานะการใช้งาน")]
public bool IsActive { get; set; } = true;
}
}

View file

@ -0,0 +1,15 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace BMA.EHR.MetaData.Service.Models
{
public class PositionType : EntityBase
{
[Required, MaxLength(100), Column(Order = 1), Comment("ชื่อประเภทตำแหน่ง")]
public string Name { get; set; } = string.Empty;
[Column(Order = 2), Comment("สถานะการใช้งาน")]
public bool IsActive { get; set; } = true;
}
}

15
Models/MetaData/Prefix.cs Normal file
View file

@ -0,0 +1,15 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace BMA.EHR.MetaData.Service.Models
{
public class Prefix : EntityBase
{
[Required, MaxLength(50), Column(Order = 2), Comment("รายละเอียดคำนำหน้า")]
public string Name { get; set; } = string.Empty;
[Column(Order = 3), Comment("สถานะการใช้งาน")]
public bool IsActive { get; set; } = true;
}
}

View file

@ -0,0 +1,17 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace BMA.EHR.MetaData.Service.Models
{
public class Province : EntityBase
{
[Required, MaxLength(150), Column(Order = 1), Comment("จังหวัด")]
public string Name { get; set; } = string.Empty;
[Column(Order = 2), Comment("สถานะการใช้งาน")]
public bool IsActive { get; set; } = true;
public virtual List<District> Districts { get; set; } = new();
}
}

View file

@ -0,0 +1,14 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
namespace BMA.EHR.MetaData.Service.Models;
public class Relationship: EntityBase
{
[Required, MaxLength(50), Column(Order = 1), Comment("ชื่อความสัมพันธ์")]
public string Name { get; set; } = string.Empty;
[Column(Order = 2), Comment("สถานะการใช้งาน")]
public bool IsActive { get; set; } = true;
}

View file

@ -0,0 +1,16 @@
using Microsoft.EntityFrameworkCore;
using Org.BouncyCastle.Asn1.X509;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
namespace BMA.EHR.MetaData.Service.Models
{
public class Religion : EntityBase
{
[Required, MaxLength(100), Column(Order = 1), Comment("ศาสนา")]
public string Name { get; set; } = string.Empty;
[Column(Order = 2), Comment("สถานะการใช้งาน")]
public bool IsActive { get; set; } = true;
}
}

18
Models/MetaData/Royal.cs Normal file
View file

@ -0,0 +1,18 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
namespace BMA.EHR.MetaData.Service.Models
{
public class Royal : EntityBase
{
[Required, MaxLength(100), Column(Order = 1), Comment("ชื่อประเภทข้อมูลเหรียญตรา")]
public string Name { get; set; } = string.Empty;
[Required, MaxLength(10), Column(Order = 2), Comment("ชื่อย่อเหรียญตรา")]
public string ShortName { get; set; } = string.Empty;
[Column(Order = 3), Comment("สถานะการใช้งาน")]
public bool IsActive { get; set; } = true;
}
}

View file

@ -0,0 +1,15 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
namespace BMA.EHR.MetaData.Service.Models
{
public class RoyalHierarchy : EntityBase
{
[Required, MaxLength(100), Column(Order = 1), Comment("ชื่อลำดับชั้นข้อมูลเครื่องราชฯ")]
public string Name { get; set; } = string.Empty;
[Column(Order = 2), Comment("สถานะการใช้งาน")]
public bool IsActive { get; set; } = true;
}
}

View file

@ -0,0 +1,15 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
namespace BMA.EHR.MetaData.Service.Models
{
public class RoyalType : EntityBase
{
[Required, MaxLength(100), Column(Order = 1), Comment("ชื่อประเภทข้อมูลเครื่องราชฯ")]
public string Name { get; set; } = string.Empty;
[Column(Order = 2), Comment("สถานะการใช้งาน")]
public bool IsActive { get; set; } = true;
}
}

View file

@ -0,0 +1,21 @@
using Microsoft.EntityFrameworkCore;
using Org.BouncyCastle.Asn1.X509;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
namespace BMA.EHR.MetaData.Service.Models
{
public class SubDistrict : EntityBase
{
[Required, MaxLength(150), Column(Order = 1), Comment("เขต/อำเภอ")]
public string Name { get; set; } = string.Empty;
[Required, MaxLength(10), Column(Order = 2), Comment("รหัสไปรษณีย์")]
public string ZipCode { get; set; } = string.Empty;
[Column(Order = 3), Comment("สถานะการใช้งาน")]
public bool IsActive { get; set; } = true;
public virtual District? District { get; set; }
}
}