hrms-api-exam/Models/PeriodExam.cs

134 lines
5.6 KiB
C#

using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using BMA.EHR.Recurit.Exam.Service.Models.Disables;
using BMA.EHR.Recurit.Exam.Service.Models.Documents;
namespace BMA.EHR.Recurit.Exam.Service.Models
{
public class PeriodExam : EntityBase
{
[Required, MaxLength(150), Column(Order = 8), Comment("ชื่อการสอบ")]
public string Name { get; set; } = string.Empty;
[Required, Comment("ตรวจสอบเอกสารหลังประกาศผลสอบ")]
public bool CheckDocument { get; set; } = false;
[Required, Comment("คนพิการ")]
public bool CheckDisability { get; set; } = false;
[Column(Order = 9), Comment("รอบการสอบ")]
public int? Round { get; set; }
[Comment("ปีงบประมาณ")]
public int? Year { get; set; }
[Comment("ค่าธรรมเนียม")]
public float? Fee { get; set; } = 0;
[Column(Order = 1), Comment("วันเริ่มสมัครสอบ")]
public DateTime? RegisterStartDate { get; set; }
[Column(Order = 2), Comment("วันสิ้นสุดสมัครสอบ")]
public DateTime? RegisterEndDate { get; set; }
[Column(Order = 3), Comment("วันเริ่มชำระเงิน")]
public DateTime? PaymentStartDate { get; set; }
[Column(Order = 4), Comment("วันสิ้นสุดชำระเงิน")]
public DateTime? PaymentEndDate { get; set; }
[Column(Order = 5), Comment("วันประกาศผลสอบ")]
public DateTime? AnnouncementDate { get; set; }
[Required, Column(Order = 6), Comment("วันเริ่มประกาศ")]
public DateTime AnnouncementStartDate { get; set; } = DateTime.Now.Date;
[Required, Column(Order = 7), Comment("วันสิ้นสุดประกาศ")]
public DateTime AnnouncementEndDate { get; set; } = DateTime.Now.Date;
[Comment("วันที่สอบ")]
public DateTime? ExamDate { get; set; }
[Comment("Id รหัสส่วนราชการ")]
public Guid? OrganizationCodeId { get; set; }
[Comment("ชื่อรหัสส่วนราชการ")]
public string? OrganizationCodeName { get; set; }
[Comment("Id หน่วยงาน")]
public Guid? OrganizationId { get; set; }
[Comment("ชื่อหน่วยงาน")]
public string? OrganizationName { get; set; }
[Comment("ชำระเงินผ่านกรุงไทย")]
public string? PaymentKrungThai { get; set; }
[Comment("รายละเอียดสมัครสอบ")]
public string? Detail { get; set; }
[Comment("รายละเอียดเงื่อนไขการสมัคร")]
public string? EditorCondition { get; set; }
[Comment("รายละเอียดคำรับรอง")]
public string? EditorConfirm { get; set; }
[Comment("หมายเหตุ")]
public string? Note { get; set; }
[Comment("สถานะการใช้งาน")]
public bool IsActive { get; set; } = true;
[Comment("เช็คอัพคะแนน")]
public bool SetSeat { get; set; } = false;
[Comment("ประกาศนี้มีสมัครสอบคัดเลือก")]
public bool AnnouncementExam { get; set; } = false;
[Comment("สำนัก")]
public string? Category { get; set; }
[Comment("remark"), Column(TypeName = "text")]
public string? Remark { get; set; }
[Comment("Company code")]
public string? CompanyCode { get; set; }
[Comment("หมายเหตุ"), Column(TypeName = "text")]
public string? Reason { get; set; }
[Comment("Ref No1")]
public string? RefNo1 { get; set; }
public string? AuthName { get; set; }
public string? AuthPosition { get; set; }
[Comment("ล็อกวันที่สำเร็จการศึกษา (ปี)")]
public int? GraduationYearLock { get; set; } = 3;
[Comment("รายชื่อคนสม้ครในรอบ")]
public List<Candidate> Candidate { get; set; } = new List<Candidate>();
[Comment("ตำแหน่งสมัคร")]
public List<PositionExam> PositionExam { get; set; } = new List<PositionExam>();
[Comment("ช่องทางชำระเงิน")]
public List<BankExam> BankExam { get; set; } = new List<BankExam>();
[Comment("เอกสารอื่นๆ")]
public virtual List<PeriodExamDocument> PeriodExamDocuments { get; set; } = new();
[Comment("รูป")]
public virtual List<PeriodExamImage> PeriodExamImages { get; set; } = new();
[Comment("qr code")]
public virtual List<PeriodExamQrCode> PeriodExamQrCodes { get; set; } = new();
[Comment("bar code")]
public virtual List<PeriodExamBarCode> PeriodExamBarCodes { get; set; } = new();
public Document? ImportFile { get; set; } = new Document();
public List<Disable> Disables { get; set; } = new List<Disable>();
public ScoreImport? ScoreImport { get; set; }
public List<DisableImportHistory> ImportHostories { get; set; } = new List<DisableImportHistory>();
}
}