Add Certificate Report
This commit is contained in:
parent
5cfdd1561d
commit
dfc9cb2e85
31 changed files with 3737 additions and 79 deletions
29
Models/Documents/Document.cs
Normal file
29
Models/Documents/Document.cs
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace BMA.EHR.Recruit.Service.Models.Documents
|
||||
{
|
||||
public class Document
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
[Required, MaxLength(255)]
|
||||
public string FileName { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
public int FileSize { get; set; } = 0;
|
||||
|
||||
[Required, MaxLength(128)]
|
||||
public string FileType { get; set; } = string.Empty;
|
||||
|
||||
[Column(TypeName = "text")]
|
||||
public string Detail { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
public Guid ObjectRefId { get; set; }
|
||||
|
||||
[Required]
|
||||
public DateTime CreatedDate { get; set; } = DateTime.Now;
|
||||
}
|
||||
}
|
||||
32
Models/EntityBase.cs
Normal file
32
Models/EntityBase.cs
Normal 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.Report.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;
|
||||
}
|
||||
}
|
||||
80
Models/Recruits/Recruit.cs
Normal file
80
Models/Recruits/Recruit.cs
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
using BMA.EHR.Report.Service.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace BMA.EHR.Recruit.Service.Models.Recruits
|
||||
{
|
||||
public class Recruit : EntityBase
|
||||
{
|
||||
|
||||
[Required, MaxLength(13), Comment("เลขประจำตัวประชาชน")]
|
||||
public string CitizenId { get; set; } = string.Empty;
|
||||
|
||||
[Required, MaxLength(50)]
|
||||
public string ExamId { get; set; } = string.Empty;
|
||||
|
||||
[Required, MaxLength(50)]
|
||||
public string Prefix { get; set; } = string.Empty;
|
||||
|
||||
[Required, MaxLength(150)]
|
||||
public string FirstName { get; set; } = string.Empty;
|
||||
|
||||
[Required, MaxLength(150)]
|
||||
public string LastName { get; set; } = string.Empty;
|
||||
|
||||
[MaxLength(20)]
|
||||
public string Gendor { get; set; } = string.Empty;
|
||||
|
||||
[MaxLength(200)]
|
||||
public string National { get; set; } = string.Empty;
|
||||
|
||||
[MaxLength(200)]
|
||||
public string Race { get; set; } = string.Empty;
|
||||
|
||||
[MaxLength(200)]
|
||||
public string Religion { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
public DateTime DateOfBirth { get; set; }
|
||||
|
||||
[MaxLength(20)]
|
||||
public string Marry { get; set; } = string.Empty;
|
||||
|
||||
[MaxLength(1)]
|
||||
public string Isspecial { get; set; } = "N";
|
||||
|
||||
[MaxLength(20)]
|
||||
public string RefNo { get; set; } = string.Empty;
|
||||
|
||||
[MaxLength(200)]
|
||||
public string CitizenCardIssuer { get; set; } = string.Empty;
|
||||
|
||||
public DateTime CitizenCardExpireDate { get; set; }
|
||||
|
||||
[MaxLength(200)]
|
||||
public string Remark { get; set; } = string.Empty;
|
||||
|
||||
[MaxLength(1)]
|
||||
public string Qualified { get; set; } = "Y";
|
||||
|
||||
public RecruitImport? RecruitImport { get; set; }
|
||||
|
||||
public virtual List<RecruitAddress> Addresses { get; set; } = new List<RecruitAddress>();
|
||||
|
||||
public virtual List<RecruitOccupation> Occupations { get; set; } = new List<RecruitOccupation>();
|
||||
|
||||
public virtual List<RecruitCertificate> Certificates { get; set; } = new List<RecruitCertificate>();
|
||||
|
||||
public virtual List<RecruitEducation> Educations { get; set; } = new List<RecruitEducation>();
|
||||
|
||||
public virtual List<RecruitPayment> Payments { get; set; } = new List<RecruitPayment>();
|
||||
|
||||
public virtual List<RecruitDocument> Documents { get; set; } = new List<RecruitDocument>();
|
||||
|
||||
public DateTime CreatedDate { get; set; } = DateTime.Now;
|
||||
|
||||
public DateTime ModifiedDate { get; set; }
|
||||
|
||||
public DateTime ApplyDate { get; set; }
|
||||
}
|
||||
}
|
||||
64
Models/Recruits/RecruitAddress.cs
Normal file
64
Models/Recruits/RecruitAddress.cs
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using BMA.EHR.Report.Service.Models;
|
||||
|
||||
namespace BMA.EHR.Recruit.Service.Models.Recruits
|
||||
{
|
||||
public class RecruitAddress : EntityBase
|
||||
{
|
||||
[MaxLength(200)]
|
||||
public string Address { get; set; }
|
||||
|
||||
[MaxLength(200)]
|
||||
public string Moo { get; set; }
|
||||
|
||||
[MaxLength(200)]
|
||||
public string Soi { get; set; }
|
||||
|
||||
[MaxLength(200)]
|
||||
public string Road { get; set; }
|
||||
|
||||
[MaxLength(200)]
|
||||
public string District { get; set; }
|
||||
|
||||
[MaxLength(200)]
|
||||
public string Amphur { get; set; }
|
||||
|
||||
[MaxLength(200)]
|
||||
public string Province { get; set; }
|
||||
|
||||
[MaxLength(5)]
|
||||
public string ZipCode { get; set; }
|
||||
|
||||
[MaxLength(200)]
|
||||
public string Telephone { get; set; }
|
||||
|
||||
[MaxLength(200)]
|
||||
public string Mobile { get; set; }
|
||||
|
||||
[MaxLength(200)]
|
||||
public string Address1 { get; set; }
|
||||
|
||||
[MaxLength(200)]
|
||||
public string Moo1 { get; set; }
|
||||
|
||||
[MaxLength(200)]
|
||||
public string Soi1 { get; set; }
|
||||
|
||||
[MaxLength(200)]
|
||||
public string Road1 { get; set; }
|
||||
|
||||
[MaxLength(200)]
|
||||
public string District1 { get; set; }
|
||||
|
||||
[MaxLength(200)]
|
||||
public string Amphur1 { get; set; }
|
||||
|
||||
[MaxLength(200)]
|
||||
public string Province1 { get; set; }
|
||||
|
||||
[MaxLength(5)]
|
||||
public string ZipCode1 { get; set; }
|
||||
|
||||
public Recruit Recruit { get; set; }
|
||||
}
|
||||
}
|
||||
20
Models/Recruits/RecruitCertificate.cs
Normal file
20
Models/Recruits/RecruitCertificate.cs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using BMA.EHR.Report.Service.Models;
|
||||
|
||||
namespace BMA.EHR.Recruit.Service.Models.Recruits
|
||||
{
|
||||
public class RecruitCertificate : EntityBase
|
||||
{
|
||||
[MaxLength(50)]
|
||||
public string CertificateNo { get; set; }
|
||||
|
||||
[MaxLength(200)]
|
||||
public string Description { get; set; }
|
||||
|
||||
public DateTime IssueDate { get; set; }
|
||||
|
||||
public DateTime ExpiredDate { get; set; }
|
||||
|
||||
public Recruit Recruit { get; set; }
|
||||
}
|
||||
}
|
||||
15
Models/Recruits/RecruitDocument.cs
Normal file
15
Models/Recruits/RecruitDocument.cs
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
using BMA.EHR.Recruit.Service.Models.Documents;
|
||||
using BMA.EHR.Report.Service.Models;
|
||||
using BMA.EHR.Report.Service.Models;
|
||||
|
||||
namespace BMA.EHR.Recruit.Service.Models.Recruits
|
||||
{
|
||||
public class RecruitDocument : EntityBase
|
||||
{
|
||||
public DateTime CreatedDate { get; set; }
|
||||
|
||||
public Document DocumentFile { get; set; }
|
||||
|
||||
public Recruit Recruit { get; set; }
|
||||
}
|
||||
}
|
||||
34
Models/Recruits/RecruitEducation.cs
Normal file
34
Models/Recruits/RecruitEducation.cs
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using BMA.EHR.Report.Service.Models;
|
||||
|
||||
namespace BMA.EHR.Recruit.Service.Models.Recruits
|
||||
{
|
||||
public class RecruitEducation : EntityBase
|
||||
{
|
||||
[MaxLength(200)]
|
||||
public string Degree { get; set; }
|
||||
|
||||
[MaxLength(200)]
|
||||
public string Major { get; set; }
|
||||
|
||||
[MaxLength(20)]
|
||||
public string MajorGroupId { get; set; }
|
||||
|
||||
[MaxLength(200)]
|
||||
public string MajorGroupName { get; set; }
|
||||
|
||||
[MaxLength(200)]
|
||||
public string University { get; set; }
|
||||
public double GPA { get; set; } = 0.0;
|
||||
|
||||
[MaxLength(1000)]
|
||||
public string Specialist { get; set; }
|
||||
|
||||
[MaxLength(200)]
|
||||
public string HighDegree { get; set; }
|
||||
|
||||
public DateTime BachelorDate { get; set; }
|
||||
|
||||
public Recruit Recruit { get; set; }
|
||||
}
|
||||
}
|
||||
28
Models/Recruits/RecruitImport.cs
Normal file
28
Models/Recruits/RecruitImport.cs
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
using BMA.EHR.Recruit.Service.Models.Documents;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using BMA.EHR.Report.Service.Models;
|
||||
|
||||
namespace BMA.EHR.Recruit.Service.Models.Recruits
|
||||
{
|
||||
public class RecruitImport : EntityBase
|
||||
{
|
||||
[Required, Comment("ปีที่จัดการสอบ"), Column(Order = 1)]
|
||||
public int Year { get; set; }
|
||||
|
||||
[Required, MaxLength(250), Comment("ชื่อการสอบ"), Column(Order = 2)]
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
[Required, Comment("ครั้งที่"), Column(Order = 3)]
|
||||
public int Order { get; set; } = 1;
|
||||
|
||||
public Document ImportFile { get; set; } = new Document();
|
||||
|
||||
public List<Recruit> Recruits { get; set; } = new List<Recruit>();
|
||||
|
||||
public ScoreImport ScoreImport { get; set; }
|
||||
|
||||
public List<RecruitImportHistory> ImportHostories { get; set; } = new List<RecruitImportHistory>();
|
||||
}
|
||||
}
|
||||
15
Models/Recruits/RecruitImportHistory.cs
Normal file
15
Models/Recruits/RecruitImportHistory.cs
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
using Microsoft.EntityFrameworkCore;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using BMA.EHR.Report.Service.Models;
|
||||
|
||||
namespace BMA.EHR.Recruit.Service.Models.Recruits
|
||||
{
|
||||
public class RecruitImportHistory : EntityBase
|
||||
{
|
||||
[Required, Comment("รายละเอียดการนำเข้า"), Column(Order = 1)]
|
||||
public string Description { get; set; } = string.Empty;
|
||||
|
||||
public RecruitImport RecruitImport { get; set; }
|
||||
}
|
||||
}
|
||||
25
Models/Recruits/RecruitOccupation.cs
Normal file
25
Models/Recruits/RecruitOccupation.cs
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using BMA.EHR.Report.Service.Models;
|
||||
|
||||
namespace BMA.EHR.Recruit.Service.Models.Recruits
|
||||
{
|
||||
public class RecruitOccupation : EntityBase
|
||||
{
|
||||
[MaxLength(200)]
|
||||
public string Occupation { get; set; }
|
||||
|
||||
[MaxLength(200)]
|
||||
public string WorkAge { get; set; }
|
||||
|
||||
[MaxLength(200)]
|
||||
public string Position { get; set; }
|
||||
|
||||
[MaxLength(200)]
|
||||
public string Workplace { get; set; }
|
||||
|
||||
[MaxLength(200)]
|
||||
public string Telephone { get; set; }
|
||||
|
||||
public Recruit Recruit { get; set; }
|
||||
}
|
||||
}
|
||||
57
Models/Recruits/RecruitPayment.cs
Normal file
57
Models/Recruits/RecruitPayment.cs
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using BMA.EHR.Report.Service.Models;
|
||||
|
||||
namespace BMA.EHR.Recruit.Service.Models.Recruits
|
||||
{
|
||||
public class RecruitPayment : EntityBase
|
||||
{
|
||||
[MaxLength(50)]
|
||||
public string PaymentId { get; set; }
|
||||
|
||||
[MaxLength(50)]
|
||||
public string CompanyCode { get; set; }
|
||||
|
||||
[MaxLength(50)]
|
||||
public string TextFile { get; set; }
|
||||
|
||||
[MaxLength(50)]
|
||||
public string BankCode { get; set; }
|
||||
|
||||
[MaxLength(50)]
|
||||
public string AccountNumber { get; set; }
|
||||
|
||||
[MaxLength(50)]
|
||||
public string TransDate { get; set; }
|
||||
|
||||
[MaxLength(50)]
|
||||
public string TransTime { get; set; }
|
||||
|
||||
[MaxLength(200)]
|
||||
public string CustomerName { get; set; }
|
||||
|
||||
[MaxLength(50)]
|
||||
public string RefNo1 { get; set; }
|
||||
|
||||
[MaxLength(50)]
|
||||
public string TermBranch { get; set; }
|
||||
|
||||
[MaxLength(50)]
|
||||
public string TellerId { get; set; }
|
||||
|
||||
[MaxLength(50)]
|
||||
public string CreditDebit { get; set; }
|
||||
|
||||
[MaxLength(50)]
|
||||
public string PaymentType { get; set; }
|
||||
|
||||
[MaxLength(50)]
|
||||
public string ChequeNo { get; set; }
|
||||
|
||||
public decimal Amount { get; set; }
|
||||
|
||||
[MaxLength(50)]
|
||||
public string ChqueBankCode { get; set; }
|
||||
|
||||
public Recruit Recruit { get; set; }
|
||||
}
|
||||
}
|
||||
42
Models/Recruits/RecruitScore.cs
Normal file
42
Models/Recruits/RecruitScore.cs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using BMA.EHR.Report.Service.Models;
|
||||
|
||||
namespace BMA.EHR.Recruit.Service.Models.Recruits
|
||||
{
|
||||
public class RecruitScore : EntityBase
|
||||
{
|
||||
[Required, MaxLength(50)]
|
||||
public string ExamId { get; set; }
|
||||
|
||||
public int SumA { get; set; }
|
||||
|
||||
public int FullA { get; set; }
|
||||
|
||||
public double PercentageA { get; set; }
|
||||
|
||||
public int SumB { get; set; }
|
||||
|
||||
public int FullB { get; set; }
|
||||
|
||||
public double PercentageB { get; set; }
|
||||
|
||||
public int SumAB { get; set; }
|
||||
|
||||
[Required, MaxLength(50)]
|
||||
public string ABStatus { get; set; }
|
||||
|
||||
public int SumC { get; set; }
|
||||
|
||||
public int FullC { get; set; }
|
||||
|
||||
public double PercentageC { get; set; }
|
||||
|
||||
[Required, MaxLength(50)]
|
||||
public string ExamStatus { get; set; }
|
||||
|
||||
[MaxLength(200)]
|
||||
public string Major { get; set; }
|
||||
|
||||
public ScoreImport ScoreImport { get; set; }
|
||||
}
|
||||
}
|
||||
20
Models/Recruits/ScoreImport.cs
Normal file
20
Models/Recruits/ScoreImport.cs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
using BMA.EHR.Recruit.Service.Models.Documents;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using BMA.EHR.Report.Service.Models;
|
||||
|
||||
namespace BMA.EHR.Recruit.Service.Models.Recruits
|
||||
{
|
||||
public class ScoreImport : EntityBase
|
||||
{
|
||||
public int Year { get; set; }
|
||||
|
||||
public Document ImportFile { get; set; } = new Document();
|
||||
|
||||
public virtual List<RecruitScore> Scores { get; set; } = new List<RecruitScore>();
|
||||
|
||||
[ForeignKey("FK_Score_Import_ID")]
|
||||
public Guid RecruitImportId { get; set; }
|
||||
|
||||
public RecruitImport RecruitImport { get; set; }
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue