Add Deploy And Receiver Table Structure

This commit is contained in:
Suphonchai Phoonsawat 2023-07-27 10:22:51 +07:00
parent 73407d3e73
commit 70cc95e408
7 changed files with 12358 additions and 8 deletions

View file

@ -1,11 +1,6 @@
using BMA.EHR.Domain.Models.Base;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BMA.EHR.Domain.Models.Commands.Core
{
@ -51,8 +46,6 @@ namespace BMA.EHR.Domain.Models.Commands.Core
[Required, MaxLength(500), Comment("คำสั่งเรื่อง")]
public string CommandSubject { get; set; } = string.Empty;
public virtual List<CommandDocument> Documents { get; set; } = new();
#region " For Placement Command "
[Required, Comment("อ้างอิงรอบการสอบ")]
@ -74,5 +67,11 @@ namespace BMA.EHR.Domain.Models.Commands.Core
public DateTime ConclusionResultDate { get; set; } = DateTime.Now;
#endregion
public virtual List<CommandDocument> Documents { get; set; } = new();
public virtual List<CommandReceiver> Receivers { get; set; }
public virtual List<CommandDeployment> Deployments { get; set; }
}
}

View file

@ -0,0 +1,26 @@
using BMA.EHR.Domain.Models.Base;
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
namespace BMA.EHR.Domain.Models.Commands.Core
{
public class CommandDeployment:EntityBase
{
[Comment("รหัสอ้างอิงคำสั่ง")]
public Guid CommandId { get; set; } = Guid.Empty;
public Command Command { get; set; } = new();
[Required,Comment("รหัสอ้างอิงผู้ใช้งานระบบ")]
public string ReceiveUserId { get; set; } = string.Empty;
[Required,Comment("ส่งอีเมล์หรือไม่?")]
public bool IsSendMail { get; set; } = true;
[Required, Comment("ส่งกล่องข้อความหรือไม่?")]
public bool IsSendInbox { get; set; } = true;
[Required, Comment("ส่งแจ้งเตือนหรือไม่?")]
public bool IsSendNotification { get; set; } = true;
}
}

View file

@ -0,0 +1,33 @@
using BMA.EHR.Domain.Models.Base;
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace BMA.EHR.Domain.Models.Commands.Core
{
public class CommandReceiver : EntityBase
{
[Comment("รหัสอ้างอิงคำสั่ง")]
public Guid CommandId { get; set; } = Guid.Empty;
public Command Command { get; set; } = new();
[Required,Comment("ลำดับในบัญชีแนบท้าย")]
public int Sequence { get; set; } = 0;
[MaxLength(13), Required, Comment("เลขประจำตัวประชาชน")]
public string CitizenId { get; set; } = string.Empty;
[MaxLength(50),Required,Comment("คำนำหน้านาม")]
public string Prefix { get; set; } = string.Empty;
[MaxLength(100), Required, Comment("ชื่อ")]
public string FirstName { get; set; } = string.Empty;
[MaxLength(100), Required, Comment("นามสกุล")]
public string LastName { get; set; } = string.Empty;
[Column(TypeName = "text"),Comment("หมายเหตุ")]
public string Comment { get; set; }
}
}