issue #1291
This commit is contained in:
parent
e345331381
commit
01590c4894
11 changed files with 20571 additions and 11 deletions
20157
BMA.EHR.Infrastructure/Migrations/20250507030357_Add InsigniaReclaimProfile Table.Designer.cs
generated
Normal file
20157
BMA.EHR.Infrastructure/Migrations/20250507030357_Add InsigniaReclaimProfile Table.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,62 @@
|
|||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BMA.EHR.Infrastructure.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddInsigniaReclaimProfileTable : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "InsigniaReclaimProfiles",
|
||||
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"),
|
||||
ReclaimDate = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "วันที่เรียกคืน"),
|
||||
ReclaimReason = table.Column<string>(type: "longtext", nullable: true, comment: "เหตุผลในการเรียกคืน")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
ReclaimOrganizationId = table.Column<Guid>(type: "char(36)", nullable: true, comment: "Fk Table OrganizationOrganization Borrow", collation: "ascii_general_ci"),
|
||||
ReclaimOrganization = table.Column<string>(type: "longtext", nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
InsigniaNoteProfileId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_InsigniaReclaimProfiles", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_InsigniaReclaimProfiles_InsigniaNoteProfiles_InsigniaNotePro~",
|
||||
column: x => x.InsigniaNoteProfileId,
|
||||
principalTable: "InsigniaNoteProfiles",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_InsigniaReclaimProfiles_InsigniaNoteProfileId",
|
||||
table: "InsigniaReclaimProfiles",
|
||||
column: "InsigniaNoteProfileId");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "InsigniaReclaimProfiles");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -6411,6 +6411,78 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
b.ToTable("InsigniaPeriods");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaReclaimProfile", 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<Guid>("InsigniaNoteProfileId")
|
||||
.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.Property<DateTime?>("ReclaimDate")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasComment("วันที่เรียกคืน");
|
||||
|
||||
b.Property<string>("ReclaimOrganization")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<Guid?>("ReclaimOrganizationId")
|
||||
.HasColumnType("char(36)")
|
||||
.HasComment("Fk Table OrganizationOrganization Borrow");
|
||||
|
||||
b.Property<string>("ReclaimReason")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("เหตุผลในการเรียกคืน");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("InsigniaNoteProfileId");
|
||||
|
||||
b.ToTable("InsigniaReclaimProfiles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
|
|
@ -18877,6 +18949,17 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
b.Navigation("ReliefDoc");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaReclaimProfile", b =>
|
||||
{
|
||||
b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", "InsigniaNoteProfile")
|
||||
.WithMany()
|
||||
.HasForeignKey("InsigniaNoteProfileId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("InsigniaNoteProfile");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b =>
|
||||
{
|
||||
b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue