hrms-api-exam/Migrations/20230324115135_Update table Candidate add occupation nation of family2.Designer.cs
2023-03-25 01:09:03 +07:00

1193 lines
51 KiB
C#

// <auto-generated />
using System;
using BMA.EHR.Recurit.Exam.Service.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace BMA.EHR.Recurit.Exam.Service.Migrations
{
[DbContext(typeof(ApplicationDbContext))]
[Migration("20230324115135_Update table Candidate add occupation nation of family2")]
partial class UpdatetableCandidateaddoccupationnationoffamily2
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "7.0.4")
.HasAnnotation("Relational:MaxIdentifierLength", 64);
modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Candidate", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime?>("CitizenDate")
.HasColumnType("datetime(6)")
.HasComment("วันที่ออกบัตร");
b.Property<Guid?>("CitizenDistrictId")
.HasColumnType("char(36)");
b.Property<string>("CitizenId")
.HasMaxLength(20)
.HasColumnType("varchar(20)")
.HasComment("เลขประจำตัวประชาชน");
b.Property<Guid?>("CitizenProvinceId")
.HasColumnType("char(36)");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<string>("CurrentAddress")
.HasColumnType("longtext")
.HasComment("ที่อยู่ปัจจุบัน");
b.Property<Guid?>("CurrentDistrictId")
.HasColumnType("char(36)");
b.Property<Guid?>("CurrentProvinceId")
.HasColumnType("char(36)");
b.Property<Guid?>("CurrentSubDistrictId")
.HasColumnType("char(36)");
b.Property<string>("CurrentZipCode")
.HasMaxLength(10)
.HasColumnType("varchar(10)")
.HasComment("รหัสไปรษณีย์ที่อยู่ปัจจุบัน");
b.Property<DateTime?>("DateOfBirth")
.HasMaxLength(40)
.HasColumnType("datetime(6)")
.HasComment("วันเกิด");
b.Property<string>("Email")
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasComment("อีเมล");
b.Property<string>("FatherFirstName")
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasComment("ชื่อจริงบิดา");
b.Property<string>("FatherLastName")
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasComment("นามสกุลบิดา");
b.Property<string>("FatherNationality")
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasComment("สัญชาติบิดา");
b.Property<string>("FatherOccupation")
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasComment("อาชีพบิดา");
b.Property<Guid?>("FatherPrefixId")
.HasColumnType("char(36)");
b.Property<string>("FirstName")
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasColumnOrder(1)
.HasComment("ชื่อจริง");
b.Property<string>("Knowledge")
.HasColumnType("longtext")
.HasComment("ความสามารถพิเศษ");
b.Property<string>("LastName")
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasColumnOrder(2)
.HasComment("นามสกุล");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<bool?>("Marry")
.HasColumnType("tinyint(1)")
.HasComment("คู่สมรส");
b.Property<string>("MarryFirstName")
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasComment("ชื่อจริงคู่สมรส");
b.Property<string>("MarryLastName")
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasComment("นามสกุลคู่สมรส");
b.Property<string>("MarryNationality")
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasComment("สัญชาติคู่สมรส");
b.Property<string>("MarryOccupation")
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasComment("อาชีพคู่สมรส");
b.Property<Guid?>("MarryPrefixId")
.HasColumnType("char(36)");
b.Property<string>("MobilePhone")
.HasMaxLength(20)
.HasColumnType("varchar(20)")
.HasComment("โทรศัพท์มือถือ");
b.Property<string>("MotherFirstName")
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasComment("ชื่อจริงมารดา");
b.Property<string>("MotherLastName")
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasComment("นามสกุลมารดา");
b.Property<string>("MotherNationality")
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasComment("สัญชาติมารดา");
b.Property<string>("MotherOccupation")
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasComment("อาชีพมารดา");
b.Property<Guid?>("MotherPrefixId")
.HasColumnType("char(36)");
b.Property<string>("Nationality")
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(3)
.HasComment("สัญชาติ");
b.Property<string>("OccupationCompany")
.HasColumnType("longtext")
.HasComment("สำนัก/บริษัท บริษัท");
b.Property<string>("OccupationDepartment")
.HasColumnType("longtext")
.HasComment("กอง/ฝ่าย บริษัท");
b.Property<string>("OccupationEmail")
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasComment("อีเมล บริษัท");
b.Property<string>("OccupationTelephone")
.HasMaxLength(20)
.HasColumnType("varchar(20)")
.HasComment("โทรศัพท์ บริษัท");
b.Property<string>("OccupationType")
.HasColumnType("longtext")
.HasComment("ประเภทอาชีพที่ทำงานมาก่อน");
b.Property<Guid>("PeriodExamId")
.HasColumnType("char(36)");
b.Property<Guid?>("PrefixId")
.HasColumnType("char(36)");
b.Property<string>("RegistAddress")
.HasColumnType("longtext")
.HasComment("ที่อยู่ตามทะเบียนบ้าน");
b.Property<Guid?>("RegistDistrictId")
.HasColumnType("char(36)");
b.Property<Guid?>("RegistProvinceId")
.HasColumnType("char(36)");
b.Property<bool?>("RegistSame")
.HasColumnType("tinyint(1)")
.HasComment("ที่อยู่ปัจจุบันเหมือนที่อยู่ตามทะเบียนบ้าน");
b.Property<Guid?>("RegistSubDistrictId")
.HasColumnType("char(36)");
b.Property<string>("RegistZipCode")
.HasMaxLength(10)
.HasColumnType("varchar(10)")
.HasComment("รหัสไปรษณีย์ที่อยู่ตามทะเบียนบ้าน");
b.Property<Guid?>("RelationshipId")
.HasColumnType("char(36)");
b.Property<string>("Telephone")
.HasMaxLength(20)
.HasColumnType("varchar(20)")
.HasComment("โทรศัพท์");
b.Property<string>("UserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasComment("User Id ผู้สมัคร");
b.Property<string>("status")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("varchar(20)")
.HasComment("สถานะผู้สมัคร");
b.HasKey("Id");
b.HasIndex("CitizenDistrictId");
b.HasIndex("CitizenProvinceId");
b.HasIndex("CurrentDistrictId");
b.HasIndex("CurrentProvinceId");
b.HasIndex("CurrentSubDistrictId");
b.HasIndex("FatherPrefixId");
b.HasIndex("MarryPrefixId");
b.HasIndex("MotherPrefixId");
b.HasIndex("PeriodExamId");
b.HasIndex("PrefixId");
b.HasIndex("RegistDistrictId");
b.HasIndex("RegistProvinceId");
b.HasIndex("RegistSubDistrictId");
b.HasIndex("RelationshipId");
b.ToTable("Candidates");
});
modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Career", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<Guid>("CandidateId")
.HasColumnType("char(36)");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<DateTime>("DurationEnd")
.HasColumnType("datetime(6)")
.HasColumnOrder(2)
.HasComment("ระยะเวลาสิ้นสุด");
b.Property<DateTime>("DurationStart")
.HasColumnType("datetime(6)")
.HasColumnOrder(1)
.HasComment("ระยะเวลาเริ่ม");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("longtext")
.HasColumnOrder(3)
.HasComment("สถานที่ทำงาน/ฝึกงาน");
b.Property<string>("Position")
.IsRequired()
.HasColumnType("longtext")
.HasColumnOrder(4)
.HasComment("ตำแหน่ง/ลักษณะงาน");
b.Property<string>("Reason")
.IsRequired()
.HasColumnType("longtext")
.HasColumnOrder(6)
.HasComment("เหตุผลที่ออก");
b.Property<int>("Salary")
.HasMaxLength(20)
.HasColumnType("int")
.HasColumnOrder(5)
.HasComment("เงินเดือนสุดท้ายก่อนออก");
b.HasKey("Id");
b.HasIndex("CandidateId");
b.ToTable("Careers");
});
modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.District", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)")
.HasColumnOrder(2)
.HasComment("สถานะการใช้งาน");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(150)
.HasColumnType("varchar(150)")
.HasColumnOrder(1)
.HasComment("เขต/อำเภอ");
b.Property<Guid?>("ProvinceId")
.HasColumnType("char(36)");
b.HasKey("Id");
b.HasIndex("ProvinceId");
b.ToTable("Districts");
});
modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Education", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<Guid>("CandidateId")
.HasColumnType("char(36)");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<DateTime>("DurationEnd")
.HasColumnType("datetime(6)")
.HasColumnOrder(2)
.HasComment("ระยะเวลาสิ้นสุด");
b.Property<DateTime>("DurationStart")
.HasColumnType("datetime(6)")
.HasColumnOrder(1)
.HasComment("ระยะเวลาเริ่ม");
b.Property<Guid>("EducationLevelId")
.HasColumnType("char(36)");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("Major")
.IsRequired()
.HasColumnType("longtext")
.HasColumnOrder(4)
.HasComment("สาขาวิชา/วิชาเอก");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("longtext")
.HasColumnOrder(3)
.HasComment("ชื่อสถานศึกษา");
b.Property<float>("Scores")
.HasMaxLength(10)
.HasColumnType("float")
.HasColumnOrder(6)
.HasComment("คะแนนเฉลี่ยตลอดหลักสูตร");
b.HasKey("Id");
b.HasIndex("CandidateId");
b.HasIndex("EducationLevelId");
b.ToTable("Educations");
});
modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.EducationLevel", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)")
.HasColumnOrder(2)
.HasComment("สถานะการใช้งาน");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasColumnOrder(1)
.HasComment("ระดับการศึกษา");
b.HasKey("Id");
b.ToTable("EducationLevels");
});
modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.PeriodExam", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<string>("Detail")
.IsRequired()
.HasColumnType("longtext")
.HasColumnOrder(4)
.HasComment("รายละเอียดสมัครสอบ");
b.Property<DateTime>("EndDate")
.HasColumnType("datetime(6)")
.HasColumnOrder(3)
.HasComment("วันสิ้นสุด");
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)")
.HasColumnOrder(5)
.HasComment("สถานะการใช้งาน");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(150)
.HasColumnType("varchar(150)")
.HasColumnOrder(1)
.HasComment("ชื่อการสอบ");
b.Property<DateTime>("StartDate")
.HasColumnType("datetime(6)")
.HasColumnOrder(2)
.HasComment("วันเริ่มสมัครสอบ");
b.HasKey("Id");
b.ToTable("PeriodExams");
});
modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Prefix", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)")
.HasColumnOrder(3)
.HasComment("สถานะการใช้งาน");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("varchar(50)")
.HasColumnOrder(2)
.HasComment("รายละเอียดคำนำหน้า");
b.HasKey("Id");
b.ToTable("Prefixes");
});
modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Province", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)")
.HasColumnOrder(2)
.HasComment("สถานะการใช้งาน");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(150)
.HasColumnType("varchar(150)")
.HasColumnOrder(1)
.HasComment("จังหวัด");
b.HasKey("Id");
b.ToTable("Provinces");
});
modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Relationship", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)")
.HasColumnOrder(2)
.HasComment("สถานะการใช้งาน");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("varchar(50)")
.HasColumnOrder(1)
.HasComment("ชื่อความสัมพันธ์");
b.HasKey("Id");
b.ToTable("Relationships");
});
modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Religion", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)")
.HasColumnOrder(2)
.HasComment("สถานะการใช้งาน");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasColumnOrder(1)
.HasComment("ศาสนา");
b.HasKey("Id");
b.ToTable("Religions");
});
modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.SubDistrict", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<Guid?>("DistrictId")
.HasColumnType("char(36)");
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)")
.HasColumnOrder(3)
.HasComment("สถานะการใช้งาน");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(150)
.HasColumnType("varchar(150)")
.HasColumnOrder(1)
.HasComment("เขต/อำเภอ");
b.Property<string>("ZipCode")
.IsRequired()
.HasMaxLength(10)
.HasColumnType("varchar(10)")
.HasColumnOrder(2)
.HasComment("รหัสไปรษณีย์");
b.HasKey("Id");
b.HasIndex("DistrictId");
b.ToTable("SubDistricts");
});
modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Candidate", b =>
{
b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.District", "CitizenDistrict")
.WithMany()
.HasForeignKey("CitizenDistrictId");
b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Province", "CitizenProvince")
.WithMany()
.HasForeignKey("CitizenProvinceId");
b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.District", "CurrentDistrict")
.WithMany()
.HasForeignKey("CurrentDistrictId");
b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Province", "CurrentProvince")
.WithMany()
.HasForeignKey("CurrentProvinceId");
b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.SubDistrict", "CurrentSubDistrict")
.WithMany()
.HasForeignKey("CurrentSubDistrictId");
b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Prefix", "FatherPrefix")
.WithMany()
.HasForeignKey("FatherPrefixId");
b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Prefix", "MarryPrefix")
.WithMany()
.HasForeignKey("MarryPrefixId");
b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Prefix", "MotherPrefix")
.WithMany()
.HasForeignKey("MotherPrefixId");
b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.PeriodExam", "PeriodExam")
.WithMany()
.HasForeignKey("PeriodExamId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Prefix", "Prefix")
.WithMany()
.HasForeignKey("PrefixId");
b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.District", "RegistDistrict")
.WithMany()
.HasForeignKey("RegistDistrictId");
b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Province", "RegistProvince")
.WithMany()
.HasForeignKey("RegistProvinceId");
b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.SubDistrict", "RegistSubDistrict")
.WithMany()
.HasForeignKey("RegistSubDistrictId");
b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Relationship", "Relationship")
.WithMany()
.HasForeignKey("RelationshipId");
b.Navigation("CitizenDistrict");
b.Navigation("CitizenProvince");
b.Navigation("CurrentDistrict");
b.Navigation("CurrentProvince");
b.Navigation("CurrentSubDistrict");
b.Navigation("FatherPrefix");
b.Navigation("MarryPrefix");
b.Navigation("MotherPrefix");
b.Navigation("PeriodExam");
b.Navigation("Prefix");
b.Navigation("RegistDistrict");
b.Navigation("RegistProvince");
b.Navigation("RegistSubDistrict");
b.Navigation("Relationship");
});
modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Career", b =>
{
b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Candidate", "Candidate")
.WithMany()
.HasForeignKey("CandidateId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Candidate");
});
modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.District", b =>
{
b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Province", "Province")
.WithMany("Districts")
.HasForeignKey("ProvinceId");
b.Navigation("Province");
});
modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Education", b =>
{
b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.Candidate", "Candidate")
.WithMany()
.HasForeignKey("CandidateId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.EducationLevel", "EducationLevel")
.WithMany()
.HasForeignKey("EducationLevelId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Candidate");
b.Navigation("EducationLevel");
});
modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.SubDistrict", b =>
{
b.HasOne("BMA.EHR.Recurit.Exam.Service.Models.District", "District")
.WithMany("SubDistricts")
.HasForeignKey("DistrictId");
b.Navigation("District");
});
modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.District", b =>
{
b.Navigation("SubDistricts");
});
modelBuilder.Entity("BMA.EHR.Recurit.Exam.Service.Models.Province", b =>
{
b.Navigation("Districts");
});
#pragma warning restore 612, 618
}
}
}