เพิ่ม service ระบบออกคำสั่ง (not complete)

This commit is contained in:
Suphonchai Phoonsawat 2023-07-13 15:03:29 +07:00
parent 90b4705234
commit b99d7e759b
15 changed files with 23495 additions and 115 deletions

View file

@ -0,0 +1,44 @@
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
{
public abstract class Command : EntityBase
{
[MaxLength(10), Comment("เลขที่คำสั่ง")]
public string CommandNo { get; set; } = string.Empty;
[MaxLength(4), Comment("ปีที่ออกคำสั่ง")]
public string CommandYear { get; set; } = string.Empty;
[Required, Comment("รหัสอ้างอิงประเภทคำสั่ง")]
public Guid CommandTypeId { get; set; } = Guid.Empty;
public CommandType CommandType { get; set; }
[Required, Comment("รหัสอ้างอิงหน่วยงานที่ออกคำสั่ง")]
public Guid IssuerOrganizationId { get; set; } = Guid.Empty;
[Required, Comment("หน่วยงานที่ออกคำสั่ง")]
public string IssuerOrganizationName { get; set; } = string.Empty;
[Required, Comment("รหัสอ้างอิงสถานะคำสั่ง")]
public Guid CommandStatusId { get; set; } = Guid.Empty;
public CommandStatus CommandStatus { get; set; }
[Required, Comment("รหัสอ้างอิงผู้มีอำนาจลงนาม")]
public Guid AuthorizedUserId { get; set; } = Guid.Empty;
[Required, Comment("ชื่อผู้มีอำนาจลงนาม")]
public string AuthorizedUserFullName { get; set; } = string.Empty;
public virtual List<CommandDocument> Documents { get; set; } = new();
}
}

View file

@ -0,0 +1,19 @@
using BMA.EHR.Domain.Models.Base;
using BMA.EHR.Domain.Models.Documents;
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
namespace BMA.EHR.Domain.Models.Commands.Core
{
public class CommandDocument : EntityBase
{
[Required, Comment("ประเภทเอกสาร")]
public string Category { get; set; } = string.Empty;
[Required, Comment("อ้างอิงรหัสเอกสาร")]
public Document Document { get; set; }
[Required, Comment("อ้างอิงคำสั่ง")]
public virtual Command Command { get; set; }
}
}

View file

@ -0,0 +1,12 @@
using BMA.EHR.Domain.Models.Base;
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
namespace BMA.EHR.Domain.Models.Commands.Core
{
public class CommandStatus : EntityBase
{
[Required, MaxLength(100), Comment("สถานะของคำสั่ง")]
public string Name { get; set; } = string.Empty;
}
}

View file

@ -0,0 +1,15 @@
using BMA.EHR.Domain.Models.Base;
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
namespace BMA.EHR.Domain.Models.Commands.Core
{
public class CommandType : EntityBase
{
[Required, MaxLength(200), Comment("ชื่อคำสั่ง")]
public string Name { get; set; } = string.Empty;
[Required, MaxLength(100), Comment("ประเภทคำสั่ง")]
public string Category { get; set; } = string.Empty;
}
}

View file

@ -5,7 +5,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BMA.EHR.Domain.Models.Commands
namespace BMA.EHR.Domain.Models.Commands.Core
{
public class DeploymentChannel : EntityBase
{

View file

@ -0,0 +1,32 @@
using BMA.EHR.Domain.Models.Commands.Core;
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
{
public class PlacementCommand : Command
{
[Required, Comment("อ้างอิงรอบการสอบ")]
public Guid ExamRoundId { get; set; }
[Required, Comment("ตำแหน่งที่บรรจุ")]
public string PositionName { get; set; } = string.Empty;
[Required, Comment("มติ กก. ครั้งที่ (เรื่อง รับสมัครสอบฯ)")]
public string ConclusionRegisterNo { get; set; } = string.Empty;
[Required, Comment("ลงวันที่ (เรื่อง รับสมัครสอบฯ)")]
public DateTime ConclusionRegisterDate { get; set; } = DateTime.Now;
[Required, Comment("มติ กก. ครั้งที่ (เรื่อง ผลการสอบแข่งขัน)")]
public string ConclusionResultNo { get; set; } = string.Empty;
[Required, Comment("ลงวันที่ (เรื่อง ผลการสอบแข่งขัน)")]
public DateTime ConclusionResultDate { get; set; } = DateTime.Now;
}
}