เพิ่มรับคืนเครื่องราช
This commit is contained in:
parent
59f782e8cf
commit
1619a502d4
22 changed files with 33518 additions and 41 deletions
16329
BMA.EHR.Infrastructure/Migrations/20230926085215_update table insigniaperiod add reason.Designer.cs
generated
Normal file
16329
BMA.EHR.Infrastructure/Migrations/20230926085215_update table insigniaperiod add reason.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,88 @@
|
|||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BMA.EHR.Infrastructure.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class updatetableinsigniaperiodaddreason : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "DocumentId",
|
||||
table: "InsigniaRequests",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
collation: "ascii_general_ci");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Reason",
|
||||
table: "InsigniaRequestProfiles",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "เหตุผลการได้รับเครื่องราชฯ",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldNullable: true,
|
||||
oldComment: "เหตุผลไม่ยื่นขอ")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "ReasonReject",
|
||||
table: "InsigniaRequestProfiles",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "เหตุผลไม่ยื่นขอ")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_InsigniaRequests_DocumentId",
|
||||
table: "InsigniaRequests",
|
||||
column: "DocumentId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_InsigniaRequests_Documents_DocumentId",
|
||||
table: "InsigniaRequests",
|
||||
column: "DocumentId",
|
||||
principalTable: "Documents",
|
||||
principalColumn: "Id");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_InsigniaRequests_Documents_DocumentId",
|
||||
table: "InsigniaRequests");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_InsigniaRequests_DocumentId",
|
||||
table: "InsigniaRequests");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "DocumentId",
|
||||
table: "InsigniaRequests");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ReasonReject",
|
||||
table: "InsigniaRequestProfiles");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Reason",
|
||||
table: "InsigniaRequestProfiles",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "เหตุผลไม่ยื่นขอ",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldNullable: true,
|
||||
oldComment: "เหตุผลการได้รับเครื่องราชฯ")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
}
|
||||
}
|
||||
}
|
||||
16381
BMA.EHR.Infrastructure/Migrations/20230926094505_update table insignianoteprofile add return.Designer.cs
generated
Normal file
16381
BMA.EHR.Infrastructure/Migrations/20230926094505_update table insignianoteprofile add return.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,165 @@
|
|||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BMA.EHR.Infrastructure.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class updatetableinsignianoteprofileaddreturn : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "DateReceiveInsignia",
|
||||
table: "InsigniaNoteProfiles",
|
||||
type: "datetime(6)",
|
||||
nullable: true,
|
||||
comment: "วันที่รับเครื่องราชฯ");
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "DateReturnInsignia",
|
||||
table: "InsigniaNoteProfiles",
|
||||
type: "datetime(6)",
|
||||
nullable: true,
|
||||
comment: "วันที่คืนเครื่องราชฯ");
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "DocReceiveInsigniaId",
|
||||
table: "InsigniaNoteProfiles",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
collation: "ascii_general_ci");
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "DocReturnInsigniaId",
|
||||
table: "InsigniaNoteProfiles",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
collation: "ascii_general_ci");
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "OrgReceiveInsigniaId",
|
||||
table: "InsigniaNoteProfiles",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
collation: "ascii_general_ci");
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "OrgReturnInsigniaId",
|
||||
table: "InsigniaNoteProfiles",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
collation: "ascii_general_ci");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_InsigniaNoteProfiles_DocReceiveInsigniaId",
|
||||
table: "InsigniaNoteProfiles",
|
||||
column: "DocReceiveInsigniaId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_InsigniaNoteProfiles_DocReturnInsigniaId",
|
||||
table: "InsigniaNoteProfiles",
|
||||
column: "DocReturnInsigniaId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_InsigniaNoteProfiles_OrgReceiveInsigniaId",
|
||||
table: "InsigniaNoteProfiles",
|
||||
column: "OrgReceiveInsigniaId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_InsigniaNoteProfiles_OrgReturnInsigniaId",
|
||||
table: "InsigniaNoteProfiles",
|
||||
column: "OrgReturnInsigniaId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_InsigniaNoteProfiles_Documents_DocReceiveInsigniaId",
|
||||
table: "InsigniaNoteProfiles",
|
||||
column: "DocReceiveInsigniaId",
|
||||
principalTable: "Documents",
|
||||
principalColumn: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_InsigniaNoteProfiles_Documents_DocReturnInsigniaId",
|
||||
table: "InsigniaNoteProfiles",
|
||||
column: "DocReturnInsigniaId",
|
||||
principalTable: "Documents",
|
||||
principalColumn: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_InsigniaNoteProfiles_OrganizationOrganizations_OrgReceiveIns~",
|
||||
table: "InsigniaNoteProfiles",
|
||||
column: "OrgReceiveInsigniaId",
|
||||
principalTable: "OrganizationOrganizations",
|
||||
principalColumn: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_InsigniaNoteProfiles_OrganizationOrganizations_OrgReturnInsi~",
|
||||
table: "InsigniaNoteProfiles",
|
||||
column: "OrgReturnInsigniaId",
|
||||
principalTable: "OrganizationOrganizations",
|
||||
principalColumn: "Id");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_InsigniaNoteProfiles_Documents_DocReceiveInsigniaId",
|
||||
table: "InsigniaNoteProfiles");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_InsigniaNoteProfiles_Documents_DocReturnInsigniaId",
|
||||
table: "InsigniaNoteProfiles");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_InsigniaNoteProfiles_OrganizationOrganizations_OrgReceiveIns~",
|
||||
table: "InsigniaNoteProfiles");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_InsigniaNoteProfiles_OrganizationOrganizations_OrgReturnInsi~",
|
||||
table: "InsigniaNoteProfiles");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_InsigniaNoteProfiles_DocReceiveInsigniaId",
|
||||
table: "InsigniaNoteProfiles");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_InsigniaNoteProfiles_DocReturnInsigniaId",
|
||||
table: "InsigniaNoteProfiles");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_InsigniaNoteProfiles_OrgReceiveInsigniaId",
|
||||
table: "InsigniaNoteProfiles");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_InsigniaNoteProfiles_OrgReturnInsigniaId",
|
||||
table: "InsigniaNoteProfiles");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "DateReceiveInsignia",
|
||||
table: "InsigniaNoteProfiles");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "DateReturnInsignia",
|
||||
table: "InsigniaNoteProfiles");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "DocReceiveInsigniaId",
|
||||
table: "InsigniaNoteProfiles");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "DocReturnInsigniaId",
|
||||
table: "InsigniaNoteProfiles");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "OrgReceiveInsigniaId",
|
||||
table: "InsigniaNoteProfiles");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "OrgReturnInsigniaId",
|
||||
table: "InsigniaNoteProfiles");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -5665,6 +5665,20 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
.HasColumnType("datetime(6)")
|
||||
.HasComment("วันที่ได้รับพระราชทานเครื่องราชฯ");
|
||||
|
||||
b.Property<DateTime?>("DateReceiveInsignia")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasComment("วันที่รับเครื่องราชฯ");
|
||||
|
||||
b.Property<DateTime?>("DateReturnInsignia")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasComment("วันที่คืนเครื่องราชฯ");
|
||||
|
||||
b.Property<Guid?>("DocReceiveInsigniaId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<Guid?>("DocReturnInsigniaId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<Guid>("InsigniaNoteId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
|
|
@ -5702,6 +5716,12 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
.HasColumnType("longtext")
|
||||
.HasComment("หมายเลขประกาศนียบัตรกำกับเครื่องราชฯ");
|
||||
|
||||
b.Property<Guid?>("OrgReceiveInsigniaId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<Guid?>("OrgReturnInsigniaId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<string>("OrganizationOrganizationReceive")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("สังกัด ณ วันที่ได้รับพระราชทานเครื่องราชฯ");
|
||||
|
|
@ -5745,8 +5765,16 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("DocReceiveInsigniaId");
|
||||
|
||||
b.HasIndex("DocReturnInsigniaId");
|
||||
|
||||
b.HasIndex("InsigniaNoteId");
|
||||
|
||||
b.HasIndex("OrgReceiveInsigniaId");
|
||||
|
||||
b.HasIndex("OrgReturnInsigniaId");
|
||||
|
||||
b.HasIndex("ProfileId");
|
||||
|
||||
b.HasIndex("RequestInsigniaId");
|
||||
|
|
@ -5878,6 +5906,9 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
.HasColumnOrder(101)
|
||||
.HasComment("User Id ที่สร้างข้อมูล");
|
||||
|
||||
b.Property<Guid?>("DocumentId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<string>("LastUpdateFullName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
|
|
@ -5914,6 +5945,8 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("DocumentId");
|
||||
|
||||
b.HasIndex("OrganizationId");
|
||||
|
||||
b.HasIndex("PeriodId");
|
||||
|
|
@ -5979,6 +6012,10 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<string>("Reason")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("เหตุผลการได้รับเครื่องราชฯ");
|
||||
|
||||
b.Property<string>("ReasonReject")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("เหตุผลไม่ยื่นขอ");
|
||||
|
||||
|
|
@ -14721,12 +14758,28 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", b =>
|
||||
{
|
||||
b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocReceiveInsignia")
|
||||
.WithMany()
|
||||
.HasForeignKey("DocReceiveInsigniaId");
|
||||
|
||||
b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocReturnInsignia")
|
||||
.WithMany()
|
||||
.HasForeignKey("DocReturnInsigniaId");
|
||||
|
||||
b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNote", "InsigniaNote")
|
||||
.WithMany("InsigniaNoteProfiles")
|
||||
.HasForeignKey("InsigniaNoteId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrgReceiveInsignia")
|
||||
.WithMany()
|
||||
.HasForeignKey("OrgReceiveInsigniaId");
|
||||
|
||||
b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrgReturnInsignia")
|
||||
.WithMany()
|
||||
.HasForeignKey("OrgReturnInsigniaId");
|
||||
|
||||
b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile")
|
||||
.WithMany()
|
||||
.HasForeignKey("ProfileId")
|
||||
|
|
@ -14739,8 +14792,16 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("DocReceiveInsignia");
|
||||
|
||||
b.Navigation("DocReturnInsignia");
|
||||
|
||||
b.Navigation("InsigniaNote");
|
||||
|
||||
b.Navigation("OrgReceiveInsignia");
|
||||
|
||||
b.Navigation("OrgReturnInsignia");
|
||||
|
||||
b.Navigation("Profile");
|
||||
|
||||
b.Navigation("RequestInsignia");
|
||||
|
|
@ -14757,6 +14818,10 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b =>
|
||||
{
|
||||
b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document")
|
||||
.WithMany()
|
||||
.HasForeignKey("DocumentId");
|
||||
|
||||
b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization")
|
||||
.WithMany()
|
||||
.HasForeignKey("OrganizationId")
|
||||
|
|
@ -14769,6 +14834,8 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Document");
|
||||
|
||||
b.Navigation("Organization");
|
||||
|
||||
b.Navigation("Period");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue