api บันทึก และ แสดง ข้อมูลผู้สมัคร

This commit is contained in:
Kittapath 2023-03-23 21:41:26 +07:00
parent ffeab6a127
commit a781c375d7
40 changed files with 10433 additions and 2 deletions

147
Models/Candidate.cs Normal file
View file

@ -0,0 +1,147 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
namespace BMA.EHR.Recurit.Exam.Service.Models
{
public class Candidate : EntityBase
{
[Required, Comment("Id การสอบ")]
public virtual PeriodExam? PeriodExam { get; set; }
[Required, MaxLength(40), Comment("User Id ผู้สมัคร")]
public string UserId { get; set; } = string.Empty;
[Required, MaxLength(20), Comment("สถานะผู้สมัคร")]
public string status { get; set; } = "draft";
[Comment("คำนำหน้าชื่อ")]
public virtual Prefix? Prefix { get; set; }
[MaxLength(100), Column(Order = 1), Comment("ชื่อจริง")]
public string? FirstName { get; set; }
[MaxLength(100), Column(Order = 2), Comment("นามสกุล")]
public string? LastName { get; set; }
[MaxLength(40), Column(Order = 3), Comment("สัญชาติ")]
public string? Nationality { get; set; }
[MaxLength(40), Comment("วันเกิด")]
public DateTime? DateOfBirth { get; set; }
[Comment("ศาสนา")]
public virtual Relationship? Relationship { get; set; }
[MaxLength(200), Comment("อีเมล")]
public string? Email { get; set; }
[MaxLength(20), Comment("เลขประจำตัวประชาชน")]
public string? CitizenId { get; set; }
[Comment("เขตที่ออกบัตรประชาชน")]
public virtual District? CitizenDistrict { get; set; }
[Comment("จังหวัดที่ออกบัตรประชาชน")]
public virtual Province? CitizenProvince { get; set; }
[Comment("วันที่ออกบัตร")]
public DateTime? CitizenDate { get; set; }
[MaxLength(20), Comment("โทรศัพท์")]
public string? Telephone { get; set; }
[MaxLength(20), Comment("โทรศัพท์มือถือ")]
public string? MobilePhone { get; set; }
[Comment("ความสามารถพิเศษ")]
public string? Knowledge { get; set; }
[Comment("ที่อยู่ตามทะเบียนบ้าน")]
public string? RegistAddress { get; set; }
[Comment("จังหวัดที่อยู่ตามทะเบียนบ้าน")]
public virtual Province? RegistProvince { get; set; }
[Comment("อำเภอที่อยู่ตามทะเบียนบ้าน")]
public virtual District? RegistDistrict { get; set; }
[Comment("ตำบลที่อยู่ตามทะเบียนบ้าน")]
public virtual SubDistrict? RegistSubDistrict { get; set; }
[MaxLength(10), Comment("รหัสไปรษณีย์ที่อยู่ตามทะเบียนบ้าน")]
public string? RegistZipCode { get; set; }
[Comment("ที่อยู่ปัจจุบันเหมือนที่อยู่ตามทะเบียนบ้าน")]
public bool? RegistSame { get; set; }
[Comment("ที่อยู่ปัจจุบัน")]
public string? CurrentAddress { get; set; }
[Comment("จังหวัดที่อยู่ปัจจุบัน")]
public virtual Province? CurrentProvince { get; set; }
[Comment("อำเภอที่อยู่ปัจจุบัน")]
public virtual District? CurrentDistrict { get; set; }
[Comment("ตำบลที่อยู่ปัจจุบัน")]
public virtual SubDistrict? CurrentSubDistrict { get; set; }
[MaxLength(10), Comment("รหัสไปรษณีย์ที่อยู่ปัจจุบัน")]
public string? CurrentZipCode { get; set; }
[Comment("คู่สมรส")]
public bool? Marry { get; set; }
[Comment("คำนำหน้าชื่อคู่สมรส")]
public virtual Prefix? MarryPrefix { get; set; }
[MaxLength(100), Comment("ชื่อจริงคู่สมรส")]
public string? MarryFirstName { get; set; }
[MaxLength(100), Comment("นามสกุลคู่สมรส")]
public string? MarryLastName { get; set; }
[Comment("คำนำหน้าชื่อบิดา")]
public virtual Prefix? FatherPrefix { get; set; }
[MaxLength(100), Comment("ชื่อจริงบิดา")]
public string? FatherFirstName { get; set; }
[MaxLength(100), Comment("นามสกุลบิดา")]
public string? FatherLastName { get; set; }
[Comment("คำนำหน้าชื่อมารดา")]
public virtual Prefix? MotherPrefix { get; set; }
[MaxLength(100), Comment("ชื่อจริงมารดา")]
public string? MotherFirstName { get; set; }
[MaxLength(100), Comment("นามสกุลมารดา")]
public string? MotherLastName { get; set; }
[Comment("ประเภทอาชีพที่ทำงานมาก่อน")]
public string? OccupationType { get; set; }
[Comment("สำนัก/บริษัท บริษัท")]
public string? OccupationCompany { get; set; }
[Comment("กอง/ฝ่าย บริษัท")]
public string? OccupationDepartment { get; set; }
[MaxLength(200), Comment("อีเมล บริษัท")]
public string? OccupationEmail { get; set; }
[MaxLength(20), Comment("โทรศัพท์ บริษัท")]
public string? OccupationTelephone { get; set; }
}
}

30
Models/Career.cs Normal file
View file

@ -0,0 +1,30 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
namespace BMA.EHR.Recurit.Exam.Service.Models
{
public class Career : EntityBase
{
[Required, Column(Order = 7), Comment("Id ผู้สมัคร")]
public virtual Candidate? Candidate { get; set; }
[Required, Column(Order = 3), Comment("สถานที่ทำงาน/ฝึกงาน")]
public string Name { get; set; } = string.Empty;
[Required, Column(Order = 4), Comment("ตำแหน่ง/ลักษณะงาน")]
public string Position { get; set; } = string.Empty;
[Required, MaxLength(20), Column(Order = 5), Comment("เงินเดือนสุดท้ายก่อนออก")]
public int Salary { get; set; }
[Required, Column(Order = 1), Comment("ระยะเวลาเริ่ม")]
public DateTime DurationStart { get; set; } = DateTime.Now.Date;
[Required, Column(Order = 2), Comment("ระยะเวลาสิ้นสุด")]
public DateTime DurationEnd { get; set; } = DateTime.Now.Date;
[Required, Column(Order = 6), Comment("เหตุผลที่ออก")]
public string Reason { get; set; } = string.Empty;
}
}

30
Models/Education.cs Normal file
View file

@ -0,0 +1,30 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
namespace BMA.EHR.Recurit.Exam.Service.Models
{
public class Education : EntityBase
{
[Required, Column(Order = 7), Comment("Id ผู้สมัคร")]
public virtual Candidate? Candidate { get; set; }
[Required, Column(Order = 5), Comment("วุฒิที่ได้รับ")]
public virtual EducationLevel? EducationLevel { get; set; }
[Required, Column(Order = 4), Comment("สาขาวิชา/วิชาเอก")]
public string Major { get; set; } = string.Empty;
[Required, MaxLength(10), Column(Order = 6), Comment("คะแนนเฉลี่ยตลอดหลักสูตร")]
public int Scores { get; set; }
[Required, Column(Order = 3), Comment("ชื่อสถานศึกษา")]
public string Name { get; set; } = string.Empty;
[Required, Column(Order = 1), Comment("ระยะเวลาเริ่ม")]
public DateTime DurationStart { get; set; } = DateTime.Now.Date;
[Required, Column(Order = 2), Comment("ระยะเวลาสิ้นสุด")]
public DateTime DurationEnd { get; set; } = DateTime.Now.Date;
}
}

24
Models/PeriodExam.cs Normal file
View file

@ -0,0 +1,24 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
namespace BMA.EHR.Recurit.Exam.Service.Models
{
public class PeriodExam : EntityBase
{
[Required, MaxLength(150), Column(Order = 1), Comment("ชื่อการสอบ")]
public string Name { get; set; } = string.Empty;
[Required, Column(Order = 2), Comment("วันเริ่มสมัครสอบ")]
public DateTime StartDate { get; set; } = DateTime.Now.Date;
[Required, Column(Order = 3), Comment("วันสิ้นสุด")]
public DateTime EndDate { get; set; } = DateTime.Now.Date;
[Required, Column(Order = 4), Comment("รายละเอียดสมัครสอบ")]
public string Detail { get; set; } = string.Empty;
[Column(Order = 5), Comment("สถานะการใช้งาน")]
public bool IsActive { get; set; } = true;
}
}