เพิ่ม service ระบบออกคำสั่ง (not complete)
This commit is contained in:
parent
90b4705234
commit
b99d7e759b
15 changed files with 23495 additions and 115 deletions
|
|
@ -1,4 +1,5 @@
|
|||
using BMA.EHR.Application.Repositories;
|
||||
using BMA.EHR.Application.Repositories.Commands;
|
||||
using BMA.EHR.Application.Repositories.MessageQueue;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
|
|
@ -12,6 +13,7 @@ namespace BMA.EHR.Application
|
|||
services.AddTransient<PlacementRepository>();
|
||||
services.AddTransient<OrganizationEmployeeRepository>();
|
||||
services.AddTransient<MessageQueueRepository>();
|
||||
services.AddTransient<PlacementCommandRepository>();
|
||||
|
||||
return services;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,27 @@
|
|||
using BMA.EHR.Application.Common.Interfaces;
|
||||
using BMA.EHR.Domain.Models.Commands;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace BMA.EHR.Application.Repositories.Commands
|
||||
{
|
||||
public class PlacementCommandRepository : GenericRepository<Guid, PlacementCommand>
|
||||
{
|
||||
#region " Fields "
|
||||
|
||||
private readonly IApplicationDBContext _dbContext;
|
||||
private readonly IHttpContextAccessor _httpContextAccessor;
|
||||
|
||||
#endregion
|
||||
|
||||
#region " Constructor and Destuctor "
|
||||
|
||||
public PlacementCommandRepository(IApplicationDBContext dbContext,
|
||||
IHttpContextAccessor httpContextAccessor) : base(dbContext, httpContextAccessor)
|
||||
{
|
||||
_dbContext = dbContext;
|
||||
_httpContextAccessor = httpContextAccessor;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
44
BMA.EHR.Domain/Models/Commands/Core/Command.cs
Normal file
44
BMA.EHR.Domain/Models/Commands/Core/Command.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
19
BMA.EHR.Domain/Models/Commands/Core/CommandDocument.cs
Normal file
19
BMA.EHR.Domain/Models/Commands/Core/CommandDocument.cs
Normal 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; }
|
||||
}
|
||||
}
|
||||
12
BMA.EHR.Domain/Models/Commands/Core/CommandStatus.cs
Normal file
12
BMA.EHR.Domain/Models/Commands/Core/CommandStatus.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
15
BMA.EHR.Domain/Models/Commands/Core/CommandType.cs
Normal file
15
BMA.EHR.Domain/Models/Commands/Core/CommandType.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
|
|
@ -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
|
||||
{
|
||||
32
BMA.EHR.Domain/Models/Commands/PlacementCommand.cs
Normal file
32
BMA.EHR.Domain/Models/Commands/PlacementCommand.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
11258
BMA.EHR.Infrastructure/Migrations/20230713075242_Add Placement Command Table and Command Core Table.Designer.cs
generated
Normal file
11258
BMA.EHR.Infrastructure/Migrations/20230713075242_Add Placement Command Table and Command Core Table.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,198 @@
|
|||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BMA.EHR.Infrastructure.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddPlacementCommandTableandCommandCoreTable : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "CommandStatuses",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
|
||||
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
|
||||
CreatedUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
LastUpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
|
||||
LastUpdateUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
CreatedFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
LastUpdateFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
Name = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false, comment: "สถานะของคำสั่ง")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_CommandStatuses", x => x.Id);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "CommandTypes",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
|
||||
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
|
||||
CreatedUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
LastUpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
|
||||
LastUpdateUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
CreatedFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
LastUpdateFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
Name = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อคำสั่ง")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
Category = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false, comment: "ประเภทคำสั่ง")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_CommandTypes", x => x.Id);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "BaseCommand",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
|
||||
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
|
||||
CreatedUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
LastUpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
|
||||
LastUpdateUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
CreatedFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
LastUpdateFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
CommandNo = table.Column<string>(type: "varchar(10)", maxLength: 10, nullable: false, comment: "เลขที่คำสั่ง")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
CommandYear = table.Column<string>(type: "varchar(4)", maxLength: 4, nullable: false, comment: "ปีที่ออกคำสั่ง")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
CommandTypeId = table.Column<Guid>(type: "char(36)", nullable: false, comment: "รหัสอ้างอิงประเภทคำสั่ง", collation: "ascii_general_ci"),
|
||||
IssuerOrganizationId = table.Column<Guid>(type: "char(36)", nullable: false, comment: "รหัสอ้างอิงหน่วยงานที่ออกคำสั่ง", collation: "ascii_general_ci"),
|
||||
IssuerOrganizationName = table.Column<string>(type: "longtext", nullable: false, comment: "หน่วยงานที่ออกคำสั่ง")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
CommandStatusId = table.Column<Guid>(type: "char(36)", nullable: false, comment: "รหัสอ้างอิงสถานะคำสั่ง", collation: "ascii_general_ci"),
|
||||
AuthorizedUserId = table.Column<Guid>(type: "char(36)", nullable: false, comment: "รหัสอ้างอิงผู้มีอำนาจลงนาม", collation: "ascii_general_ci"),
|
||||
AuthorizedUserFullName = table.Column<string>(type: "longtext", nullable: false, comment: "ชื่อผู้มีอำนาจลงนาม")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
Discriminator = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
ExamRoundId = table.Column<Guid>(type: "char(36)", nullable: true, comment: "อ้างอิงรอบการสอบ", collation: "ascii_general_ci"),
|
||||
PositionName = table.Column<string>(type: "longtext", nullable: true, comment: "ตำแหน่งที่บรรจุ")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
ConclusionRegisterNo = table.Column<string>(type: "longtext", nullable: true, comment: "มติ กก. ครั้งที่ (เรื่อง รับสมัครสอบฯ)")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
ConclusionRegisterDate = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "ลงวันที่ (เรื่อง รับสมัครสอบฯ)"),
|
||||
ConclusionResultNo = table.Column<string>(type: "longtext", nullable: true, comment: "มติ กก. ครั้งที่ (เรื่อง ผลการสอบแข่งขัน)")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
ConclusionResultDate = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "ลงวันที่ (เรื่อง ผลการสอบแข่งขัน)")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_BaseCommand", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_BaseCommand_CommandStatuses_CommandStatusId",
|
||||
column: x => x.CommandStatusId,
|
||||
principalTable: "CommandStatuses",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_BaseCommand_CommandTypes_CommandTypeId",
|
||||
column: x => x.CommandTypeId,
|
||||
principalTable: "CommandTypes",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "CommandDocuments",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
|
||||
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
|
||||
CreatedUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
LastUpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
|
||||
LastUpdateUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
CreatedFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
LastUpdateFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
Category = table.Column<string>(type: "longtext", nullable: false, comment: "ประเภทเอกสาร")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
DocumentId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
CommandId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_CommandDocuments", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_CommandDocuments_BaseCommand_CommandId",
|
||||
column: x => x.CommandId,
|
||||
principalTable: "BaseCommand",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_CommandDocuments_Documents_DocumentId",
|
||||
column: x => x.DocumentId,
|
||||
principalTable: "Documents",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_BaseCommand_CommandStatusId",
|
||||
table: "BaseCommand",
|
||||
column: "CommandStatusId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_BaseCommand_CommandTypeId",
|
||||
table: "BaseCommand",
|
||||
column: "CommandTypeId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_CommandDocuments_CommandId",
|
||||
table: "CommandDocuments",
|
||||
column: "CommandId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_CommandDocuments_DocumentId",
|
||||
table: "CommandDocuments",
|
||||
column: "DocumentId");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "CommandDocuments");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "BaseCommand");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "CommandStatuses");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "CommandTypes");
|
||||
}
|
||||
}
|
||||
}
|
||||
11258
BMA.EHR.Infrastructure/Migrations/20230713075919_Change Base Command Table Name.Designer.cs
generated
Normal file
11258
BMA.EHR.Infrastructure/Migrations/20230713075919_Change Base Command Table Name.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,136 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BMA.EHR.Infrastructure.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class ChangeBaseCommandTableName : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_BaseCommand_CommandStatuses_CommandStatusId",
|
||||
table: "BaseCommand");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_BaseCommand_CommandTypes_CommandTypeId",
|
||||
table: "BaseCommand");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_CommandDocuments_BaseCommand_CommandId",
|
||||
table: "CommandDocuments");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_BaseCommand",
|
||||
table: "BaseCommand");
|
||||
|
||||
migrationBuilder.RenameTable(
|
||||
name: "BaseCommand",
|
||||
newName: "Command");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_BaseCommand_CommandTypeId",
|
||||
table: "Command",
|
||||
newName: "IX_Command_CommandTypeId");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_BaseCommand_CommandStatusId",
|
||||
table: "Command",
|
||||
newName: "IX_Command_CommandStatusId");
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_Command",
|
||||
table: "Command",
|
||||
column: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Command_CommandStatuses_CommandStatusId",
|
||||
table: "Command",
|
||||
column: "CommandStatusId",
|
||||
principalTable: "CommandStatuses",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Command_CommandTypes_CommandTypeId",
|
||||
table: "Command",
|
||||
column: "CommandTypeId",
|
||||
principalTable: "CommandTypes",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CommandDocuments_Command_CommandId",
|
||||
table: "CommandDocuments",
|
||||
column: "CommandId",
|
||||
principalTable: "Command",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Command_CommandStatuses_CommandStatusId",
|
||||
table: "Command");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Command_CommandTypes_CommandTypeId",
|
||||
table: "Command");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_CommandDocuments_Command_CommandId",
|
||||
table: "CommandDocuments");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_Command",
|
||||
table: "Command");
|
||||
|
||||
migrationBuilder.RenameTable(
|
||||
name: "Command",
|
||||
newName: "BaseCommand");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_Command_CommandTypeId",
|
||||
table: "BaseCommand",
|
||||
newName: "IX_BaseCommand_CommandTypeId");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_Command_CommandStatusId",
|
||||
table: "BaseCommand",
|
||||
newName: "IX_BaseCommand_CommandStatusId");
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_BaseCommand",
|
||||
table: "BaseCommand",
|
||||
column: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BaseCommand_CommandStatuses_CommandStatusId",
|
||||
table: "BaseCommand",
|
||||
column: "CommandStatusId",
|
||||
principalTable: "CommandStatuses",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BaseCommand_CommandTypes_CommandTypeId",
|
||||
table: "BaseCommand",
|
||||
column: "CommandTypeId",
|
||||
principalTable: "CommandTypes",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CommandDocuments_BaseCommand_CommandId",
|
||||
table: "CommandDocuments",
|
||||
column: "CommandId",
|
||||
principalTable: "BaseCommand",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -16,10 +16,301 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "7.0.8")
|
||||
.HasAnnotation("ProductVersion", "7.0.9")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
||||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.DeploymentChannel", b =>
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("char(36)")
|
||||
.HasColumnOrder(0)
|
||||
.HasComment("PrimaryKey")
|
||||
.HasAnnotation("Relational:JsonPropertyName", "id");
|
||||
|
||||
b.Property<string>("AuthorizedUserFullName")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("ชื่อผู้มีอำนาจลงนาม");
|
||||
|
||||
b.Property<Guid>("AuthorizedUserId")
|
||||
.HasColumnType("char(36)")
|
||||
.HasComment("รหัสอ้างอิงผู้มีอำนาจลงนาม");
|
||||
|
||||
b.Property<string>("CommandNo")
|
||||
.IsRequired()
|
||||
.HasMaxLength(10)
|
||||
.HasColumnType("varchar(10)")
|
||||
.HasComment("เลขที่คำสั่ง");
|
||||
|
||||
b.Property<Guid>("CommandStatusId")
|
||||
.HasColumnType("char(36)")
|
||||
.HasComment("รหัสอ้างอิงสถานะคำสั่ง");
|
||||
|
||||
b.Property<Guid>("CommandTypeId")
|
||||
.HasColumnType("char(36)")
|
||||
.HasComment("รหัสอ้างอิงประเภทคำสั่ง");
|
||||
|
||||
b.Property<string>("CommandYear")
|
||||
.IsRequired()
|
||||
.HasMaxLength(4)
|
||||
.HasColumnType("varchar(4)")
|
||||
.HasComment("ปีที่ออกคำสั่ง");
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasColumnOrder(100)
|
||||
.HasComment("สร้างข้อมูลเมื่อ");
|
||||
|
||||
b.Property<string>("CreatedFullName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("varchar(200)")
|
||||
.HasColumnOrder(104)
|
||||
.HasComment("ชื่อ User ที่สร้างข้อมูล");
|
||||
|
||||
b.Property<string>("CreatedUserId")
|
||||
.IsRequired()
|
||||
.HasMaxLength(40)
|
||||
.HasColumnType("varchar(40)")
|
||||
.HasColumnOrder(101)
|
||||
.HasComment("User Id ที่สร้างข้อมูล");
|
||||
|
||||
b.Property<string>("Discriminator")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<Guid>("IssuerOrganizationId")
|
||||
.HasColumnType("char(36)")
|
||||
.HasComment("รหัสอ้างอิงหน่วยงานที่ออกคำสั่ง");
|
||||
|
||||
b.Property<string>("IssuerOrganizationName")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("หน่วยงานที่ออกคำสั่ง");
|
||||
|
||||
b.Property<string>("LastUpdateFullName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("varchar(200)")
|
||||
.HasColumnOrder(105)
|
||||
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
|
||||
|
||||
b.Property<string>("LastUpdateUserId")
|
||||
.IsRequired()
|
||||
.HasMaxLength(40)
|
||||
.HasColumnType("varchar(40)")
|
||||
.HasColumnOrder(103)
|
||||
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
|
||||
|
||||
b.Property<DateTime?>("LastUpdatedAt")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasColumnOrder(102)
|
||||
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CommandStatusId");
|
||||
|
||||
b.HasIndex("CommandTypeId");
|
||||
|
||||
b.ToTable("Command");
|
||||
|
||||
b.HasDiscriminator<string>("Discriminator").HasValue("Command");
|
||||
|
||||
b.UseTphMappingStrategy();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDocument", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("char(36)")
|
||||
.HasColumnOrder(0)
|
||||
.HasComment("PrimaryKey")
|
||||
.HasAnnotation("Relational:JsonPropertyName", "id");
|
||||
|
||||
b.Property<string>("Category")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("ประเภทเอกสาร");
|
||||
|
||||
b.Property<Guid>("CommandId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasColumnOrder(100)
|
||||
.HasComment("สร้างข้อมูลเมื่อ");
|
||||
|
||||
b.Property<string>("CreatedFullName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("varchar(200)")
|
||||
.HasColumnOrder(104)
|
||||
.HasComment("ชื่อ User ที่สร้างข้อมูล");
|
||||
|
||||
b.Property<string>("CreatedUserId")
|
||||
.IsRequired()
|
||||
.HasMaxLength(40)
|
||||
.HasColumnType("varchar(40)")
|
||||
.HasColumnOrder(101)
|
||||
.HasComment("User Id ที่สร้างข้อมูล");
|
||||
|
||||
b.Property<Guid>("DocumentId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<string>("LastUpdateFullName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("varchar(200)")
|
||||
.HasColumnOrder(105)
|
||||
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
|
||||
|
||||
b.Property<string>("LastUpdateUserId")
|
||||
.IsRequired()
|
||||
.HasMaxLength(40)
|
||||
.HasColumnType("varchar(40)")
|
||||
.HasColumnOrder(103)
|
||||
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
|
||||
|
||||
b.Property<DateTime?>("LastUpdatedAt")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasColumnOrder(102)
|
||||
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CommandId");
|
||||
|
||||
b.HasIndex("DocumentId");
|
||||
|
||||
b.ToTable("CommandDocuments");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandStatus", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("char(36)")
|
||||
.HasColumnOrder(0)
|
||||
.HasComment("PrimaryKey")
|
||||
.HasAnnotation("Relational:JsonPropertyName", "id");
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasColumnOrder(100)
|
||||
.HasComment("สร้างข้อมูลเมื่อ");
|
||||
|
||||
b.Property<string>("CreatedFullName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("varchar(200)")
|
||||
.HasColumnOrder(104)
|
||||
.HasComment("ชื่อ User ที่สร้างข้อมูล");
|
||||
|
||||
b.Property<string>("CreatedUserId")
|
||||
.IsRequired()
|
||||
.HasMaxLength(40)
|
||||
.HasColumnType("varchar(40)")
|
||||
.HasColumnOrder(101)
|
||||
.HasComment("User Id ที่สร้างข้อมูล");
|
||||
|
||||
b.Property<string>("LastUpdateFullName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("varchar(200)")
|
||||
.HasColumnOrder(105)
|
||||
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
|
||||
|
||||
b.Property<string>("LastUpdateUserId")
|
||||
.IsRequired()
|
||||
.HasMaxLength(40)
|
||||
.HasColumnType("varchar(40)")
|
||||
.HasColumnOrder(103)
|
||||
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
|
||||
|
||||
b.Property<DateTime?>("LastUpdatedAt")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasColumnOrder(102)
|
||||
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("varchar(100)")
|
||||
.HasComment("สถานะของคำสั่ง");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("CommandStatuses");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandType", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("char(36)")
|
||||
.HasColumnOrder(0)
|
||||
.HasComment("PrimaryKey")
|
||||
.HasAnnotation("Relational:JsonPropertyName", "id");
|
||||
|
||||
b.Property<string>("Category")
|
||||
.IsRequired()
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("varchar(100)")
|
||||
.HasComment("ประเภทคำสั่ง");
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasColumnOrder(100)
|
||||
.HasComment("สร้างข้อมูลเมื่อ");
|
||||
|
||||
b.Property<string>("CreatedFullName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("varchar(200)")
|
||||
.HasColumnOrder(104)
|
||||
.HasComment("ชื่อ User ที่สร้างข้อมูล");
|
||||
|
||||
b.Property<string>("CreatedUserId")
|
||||
.IsRequired()
|
||||
.HasMaxLength(40)
|
||||
.HasColumnType("varchar(40)")
|
||||
.HasColumnOrder(101)
|
||||
.HasComment("User Id ที่สร้างข้อมูล");
|
||||
|
||||
b.Property<string>("LastUpdateFullName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("varchar(200)")
|
||||
.HasColumnOrder(105)
|
||||
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
|
||||
|
||||
b.Property<string>("LastUpdateUserId")
|
||||
.IsRequired()
|
||||
.HasMaxLength(40)
|
||||
.HasColumnType("varchar(40)")
|
||||
.HasColumnOrder(103)
|
||||
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
|
||||
|
||||
b.Property<DateTime?>("LastUpdatedAt")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasColumnOrder(102)
|
||||
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("varchar(200)")
|
||||
.HasComment("ชื่อคำสั่ง");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("CommandTypes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.DeploymentChannel", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
|
@ -7326,6 +7617,106 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
b.ToTable("SubDistricts");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.MessageQueueEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("char(36)")
|
||||
.HasColumnOrder(0)
|
||||
.HasComment("PrimaryKey")
|
||||
.HasAnnotation("Relational:JsonPropertyName", "id");
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasColumnOrder(100)
|
||||
.HasComment("สร้างข้อมูลเมื่อ");
|
||||
|
||||
b.Property<string>("CreatedFullName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("varchar(200)")
|
||||
.HasColumnOrder(104)
|
||||
.HasComment("ชื่อ User ที่สร้างข้อมูล");
|
||||
|
||||
b.Property<string>("CreatedUserId")
|
||||
.IsRequired()
|
||||
.HasMaxLength(40)
|
||||
.HasColumnType("varchar(40)")
|
||||
.HasColumnOrder(101)
|
||||
.HasComment("User Id ที่สร้างข้อมูล");
|
||||
|
||||
b.Property<bool>("IsSend")
|
||||
.HasColumnType("tinyint(1)")
|
||||
.HasComment("ทำการส่งข้อความแล้วหรือยัง?");
|
||||
|
||||
b.Property<bool>("IsSendEmail")
|
||||
.HasColumnType("tinyint(1)")
|
||||
.HasComment("ส่งอีเมลล์หรือไม่?");
|
||||
|
||||
b.Property<bool>("IsSendInbox")
|
||||
.HasColumnType("tinyint(1)")
|
||||
.HasComment("ส่งไปที่กล่องข้อความหรือไม่?");
|
||||
|
||||
b.Property<bool>("IsSendNotification")
|
||||
.HasColumnType("tinyint(1)")
|
||||
.HasComment("ส่งการแจ้งเตือนหรือไม่?");
|
||||
|
||||
b.Property<string>("LastUpdateFullName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("varchar(200)")
|
||||
.HasColumnOrder(105)
|
||||
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
|
||||
|
||||
b.Property<string>("LastUpdateUserId")
|
||||
.IsRequired()
|
||||
.HasMaxLength(40)
|
||||
.HasColumnType("varchar(40)")
|
||||
.HasColumnOrder(103)
|
||||
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
|
||||
|
||||
b.Property<DateTime?>("LastUpdatedAt")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasColumnOrder(102)
|
||||
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
|
||||
|
||||
b.Property<string>("MessageContent")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("รายละเอียดข้อความ");
|
||||
|
||||
b.Property<string>("MessagePayLoad")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("สิ่งที่แนบมาด้วย");
|
||||
|
||||
b.Property<string>("ReceiverEmailAddress")
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("varchar(500)")
|
||||
.HasComment("อีเมล์ของผู้รับ");
|
||||
|
||||
b.Property<Guid>("ReceiverUserId")
|
||||
.HasColumnType("char(36)")
|
||||
.HasComment("รหัสของผู้รับข้อความ");
|
||||
|
||||
b.Property<string>("SenderSystem")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("varchar(200)")
|
||||
.HasComment("ส่งจากระบบงาน");
|
||||
|
||||
b.Property<string>("Subject")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("varchar(200)")
|
||||
.HasComment("หัวเรื่อง");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("MessageQueues");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
|
|
@ -7485,7 +7876,7 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
b.ToTable("OrganizationEmployees");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.MessageQueueEntity", b =>
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeeLevel", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
|
@ -7532,85 +7923,21 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
.HasColumnOrder(102)
|
||||
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
|
||||
|
||||
b.Property<bool>("IsSend")
|
||||
.HasColumnType("tinyint(1)")
|
||||
.HasComment("ทำการส่งข้อความแล้วหรือยัง?");
|
||||
b.Property<Guid?>("OrganizationEmployeeId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<bool>("IsSendEmail")
|
||||
.HasColumnType("tinyint(1)")
|
||||
.HasComment("ส่งอีเมลล์หรือไม่?");
|
||||
b.Property<Guid?>("PositionEmployeeLevelId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<bool>("IsSendInbox")
|
||||
.HasColumnType("tinyint(1)")
|
||||
.HasComment("ส่งไปที่กล่องข้อความหรือไม่?");
|
||||
b.HasKey("Id");
|
||||
|
||||
b.Property<bool>("IsSendNotification")
|
||||
.HasColumnType("tinyint(1)")
|
||||
.HasComment("ส่งการแจ้งเตือนหรือไม่?");
|
||||
b.HasIndex("OrganizationEmployeeId");
|
||||
|
||||
b.HasIndex("PositionEmployeeLevelId");
|
||||
|
||||
b.ToTable("OrganizationPositionEmployeeLevels");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeeLevel", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("char(36)")
|
||||
.HasColumnOrder(0)
|
||||
.HasComment("PrimaryKey")
|
||||
.HasAnnotation("Relational:JsonPropertyName", "id");
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasColumnOrder(100)
|
||||
.HasComment("สร้างข้อมูลเมื่อ");
|
||||
|
||||
b.Property<string>("CreatedFullName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("varchar(200)")
|
||||
.HasColumnOrder(104)
|
||||
.HasComment("ชื่อ User ที่สร้างข้อมูล");
|
||||
|
||||
b.Property<string>("CreatedUserId")
|
||||
.IsRequired()
|
||||
.HasMaxLength(40)
|
||||
.HasColumnType("varchar(40)")
|
||||
.HasColumnOrder(101)
|
||||
.HasComment("User Id ที่สร้างข้อมูล");
|
||||
|
||||
b.Property<string>("LastUpdateFullName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("varchar(200)")
|
||||
.HasColumnOrder(105)
|
||||
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
|
||||
|
||||
b.Property<string>("LastUpdateUserId")
|
||||
.IsRequired()
|
||||
.HasMaxLength(40)
|
||||
.HasColumnType("varchar(40)")
|
||||
.HasColumnOrder(103)
|
||||
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
|
||||
|
||||
b.Property<DateTime?>("LastUpdatedAt")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasColumnOrder(102)
|
||||
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
|
||||
|
||||
b.Property<Guid?>("OrganizationEmployeeId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<Guid?>("PositionEmployeeLevelId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("OrganizationEmployeeId");
|
||||
|
||||
b.HasIndex("PositionEmployeeLevelId");
|
||||
|
||||
b.ToTable("OrganizationPositionEmployeeLevels");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeePositionSide", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
|
|
@ -7671,41 +7998,6 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
b.HasIndex("PositionEmployeePositionSideId");
|
||||
|
||||
b.ToTable("OrganizationPositionEmployeePositionSides");
|
||||
b.Property<string>("MessageContent")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("รายละเอียดข้อความ");
|
||||
|
||||
b.Property<string>("MessagePayLoad")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("สิ่งที่แนบมาด้วย");
|
||||
|
||||
b.Property<string>("ReceiverEmailAddress")
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("varchar(500)")
|
||||
.HasComment("อีเมล์ของผู้รับ");
|
||||
|
||||
b.Property<Guid>("ReceiverUserId")
|
||||
.HasColumnType("char(36)")
|
||||
.HasComment("รหัสของผู้รับข้อความ");
|
||||
|
||||
b.Property<string>("SenderSystem")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("varchar(200)")
|
||||
.HasComment("ส่งจากระบบงาน");
|
||||
|
||||
b.Property<string>("Subject")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("varchar(200)")
|
||||
.HasComment("หัวเรื่อง");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("MessageQueues");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", b =>
|
||||
|
|
@ -9680,6 +9972,78 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
b.ToTable("PlacementTypes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.PlacementCommand", b =>
|
||||
{
|
||||
b.HasBaseType("BMA.EHR.Domain.Models.Commands.Core.Command");
|
||||
|
||||
b.Property<DateTime>("ConclusionRegisterDate")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasComment("ลงวันที่ (เรื่อง รับสมัครสอบฯ)");
|
||||
|
||||
b.Property<string>("ConclusionRegisterNo")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("มติ กก. ครั้งที่ (เรื่อง รับสมัครสอบฯ)");
|
||||
|
||||
b.Property<DateTime>("ConclusionResultDate")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasComment("ลงวันที่ (เรื่อง ผลการสอบแข่งขัน)");
|
||||
|
||||
b.Property<string>("ConclusionResultNo")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("มติ กก. ครั้งที่ (เรื่อง ผลการสอบแข่งขัน)");
|
||||
|
||||
b.Property<Guid>("ExamRoundId")
|
||||
.HasColumnType("char(36)")
|
||||
.HasComment("อ้างอิงรอบการสอบ");
|
||||
|
||||
b.Property<string>("PositionName")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("ตำแหน่งที่บรรจุ");
|
||||
|
||||
b.HasDiscriminator().HasValue("PlacementCommand");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b =>
|
||||
{
|
||||
b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandStatus", "CommandStatus")
|
||||
.WithMany()
|
||||
.HasForeignKey("CommandStatusId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType")
|
||||
.WithMany()
|
||||
.HasForeignKey("CommandTypeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("CommandStatus");
|
||||
|
||||
b.Navigation("CommandType");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDocument", b =>
|
||||
{
|
||||
b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command")
|
||||
.WithMany("Documents")
|
||||
.HasForeignKey("CommandId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document")
|
||||
.WithMany()
|
||||
.HasForeignKey("DocumentId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Command");
|
||||
|
||||
b.Navigation("Document");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitTypeLeave", b =>
|
||||
{
|
||||
b.HasOne("BMA.EHR.Domain.Models.HR.LimitLeave", "LimitLeave")
|
||||
|
|
@ -10695,6 +11059,11 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
b.Navigation("Religion");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b =>
|
||||
{
|
||||
b.Navigation("Documents");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitLeave", b =>
|
||||
{
|
||||
b.Navigation("LimitTypeLeaves");
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
using BMA.EHR.Application.Common.Interfaces;
|
||||
using BMA.EHR.Domain.Models.Commands;
|
||||
using BMA.EHR.Domain.Models.Documents;
|
||||
using BMA.EHR.Domain.Models.HR;
|
||||
using BMA.EHR.Domain.Models.MetaData;
|
||||
|
|
@ -9,6 +8,8 @@ using BMA.EHR.Domain.Models.Organizations;
|
|||
using BMA.EHR.Domain.Models.Organizations.Report2;
|
||||
using BMA.EHR.Domain.Models.Placement;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using BMA.EHR.Domain.Models.Commands.Core;
|
||||
using BMA.EHR.Domain.Models.Commands;
|
||||
|
||||
namespace BMA.EHR.Infrastructure.Persistence
|
||||
{
|
||||
|
|
@ -261,8 +262,17 @@ namespace BMA.EHR.Infrastructure.Persistence
|
|||
|
||||
#region " Command "
|
||||
|
||||
public DbSet<CommandStatus> CommandStatuses { get; set; }
|
||||
|
||||
public DbSet<CommandType> CommandTypes { get; set; }
|
||||
|
||||
public DbSet<CommandDocument> CommandDocuments { get; set; }
|
||||
|
||||
public DbSet<DeploymentChannel> DeploymentChannels { get; set; }
|
||||
|
||||
|
||||
public DbSet<PlacementCommand> PlacementCommands { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region " Message Queue "
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
"AllowedHosts": "*",
|
||||
"ConnectionStrings": {
|
||||
//"DefaultConnection": "User Id=sys;Password=P@ssw0rd;DBA Privilege=SYSDBA;Data Source=localhost:1521/ORCLCDB",
|
||||
"DefaultConnection": "server=127.0.0.1;user=root;password=P@ssw0rd;port=3308;database=bma_ehr_demo;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;"
|
||||
"DefaultConnection": "server=192.168.1.9;user=root;password=adminVM123;port=3306;database=bma_ehr_demo;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;"
|
||||
},
|
||||
"Jwt": {
|
||||
"Key": "HP-FnQMUj9msHMSD3T9HtdEnphAKoCJLEl85CIqROFI",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue