using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using BMA.EHR.Domain.Models.Base; using BMA.EHR.Domain.Models.Organizations; using Microsoft.EntityFrameworkCore; namespace BMA.EHR.Domain.Models.Discipline { public class DisciplineInvestigate : EntityBase { [Required, Comment("สถานะเรื่องร้องเรียน มีดังนี้ ใหม่ (NEW), ยุติเรื่อง (STOP), มีมูลส่งไปสืบสวนแล้ว (SEND_INVESTIGATE)")] public string Status { get; set; } = string.Empty; [Required, Comment("ผู้ถูกร้องเรียน (PERSON คือ บุคคล, ORGANIZATION คือ หน่วยงาน, BANGKOK คือ กรุงเทพมหานคร)")] public string RespondentType { get; set; } = string.Empty; [Required, Comment("เรื่องที่ร้องเรียน"), Column(TypeName = "text")] public string Title { get; set; } = string.Empty; [Comment("รายละเอียดของเรื่องร้องเรียน"), Column(TypeName = "text")] public string? Description { get; set; } = string.Empty; [Comment("วันที่รับเรื่อง เป็นวันที่ถือเป็นจุดเริ่มต้นของวินัยนั้น ๆ")] public DateTime? DateReceived { get; set; } [Comment("ระดับการพิจารณา 'ยังไม่ระบุ' (NORMAL คือ ปกติ, URGENT คือ ด่วน, VERY_URGENT คือ ด่วนมาก)")] public string? LevelConsideration { get; set; } = string.Empty; [Comment("วันที่กำหนดพิจารณา")] public DateTime? DateConsideration { get; set; } [Comment("ลักษณะความผิดครั้งแรกจะเป็น 'ยังไม่ระบุ' (NOT_SPECIFIED คือ ยังไม่ระบุ, NOT_DEADLY คือ ไม่ร้ายแรง, DEADLY คือ ร้ายแรง)")] public string? OffenseDetails { get; set; } = string.Empty; [Comment("วันแจ้งเตือนล่วงหน้า")] public DateTime? DateNotification { get; set; } [Comment("รับเรื่องร้องเรียนจาก ระบุว่ารับเรื่องมาจากใคร/หน่วยงานไหน (สตง., ปปช., ปปท., จดหมาย, อีเมล, โทรศัพท์, บอกกล่าว)")] public string? ComplaintFrom { get; set; } = string.Empty; [Comment("ผู้ร้องเรียน")] public string? Appellant { get; set; } = string.Empty; // [Required, Comment("อ้างอิงรหัสเอกสาร")] // public Document Document { get; set; } [Comment("ผลการตรวจสอบเรื่องร้องเรียน")] public string? ResultComplaint { get; set; } [Comment("ผลการตรวจสอบ")] public string? Result { get; set; } [Comment("กรณีหน่วยงานใส่หน่วยงาน")] public string? Organization { get; set; } [Comment("กรณีหน่วยงานใส่หน่วยงาน id")] public string? OrganizationId { get; set; } [Comment("หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง")] public string? ConsideredAgency { get; set; } [Comment("หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง id")] public string? ConsideredAgencyId { get; set; } [Comment("version หน่วยงาน")] public string? activeId { get; set; } [Comment("ลักษณะการสืบสวน (appoint_directors คือ แต่งตั้งกรรมการสืบสวน, secret_investigation คือ สืบสวนทางลับ, other คือ อื่น ๆ)")] public string? InvestigationDetail { get; set; } [Comment("ลักษณะการสืบสวนกรณีเลือกอื่นๆ")] public string? InvestigationDetailOther { get; set; } [Comment("วันที่เริ่มการสืบสวน")] public DateTime? InvestigationDateStart { get; set; } [Comment("วันที่สิ้นสุดการสืบสวน")] public DateTime? InvestigationDateEnd { get; set; } [Comment("รายละเอียดเกี่ยวกับการสืบสวน")] public string? InvestigationDescription { get; set; } [Comment("สถานะหรือผลการสืบสวน (not_specified คือ ยังไม่ระบุ, have_cause คือ มีมูล, no_cause คือ ไม่มีมูล")] public string? InvestigationStatusResult { get; set; } [Comment("กรณีมีมูลต้องเลือกว่า 'ร้ายแรง' หรือ 'ไม่ร้ายแรง'")] public string? InvestigationCauseText { get; set; } [Comment("ขยายเวลา")] public bool InvestigationExtendStatus { get; set; } = false; [Comment("จำนวนวันที่ต้องการขยาย")] public int? InvestigationDaysExtend { get; set; } [Comment("RootDnaId")] public Guid? RootDnaId { get; set; } public DisciplineComplaint DisciplineComplaint { get; set; } public virtual List DisciplineInvestigate_ProfileComplaints { get; set; } = new List(); public virtual List DisciplineInvestigate_DocComplaints { get; set; } = new List(); public virtual List DisciplineInvestigate_Docs { get; set; } = new List(); public virtual List DisciplineInvestigateRelevant_Docs { get; set; } = new List(); public virtual List DisciplineInvestigate_Directors { get; set; } = new List(); public virtual List DisciplineDisciplinarys { get; set; } = new List(); public virtual List DisciplineInvestigateExtends { get; set; } = new List(); } }