Restructure TAble

This commit is contained in:
Suphonchai Phoonsawat 2023-06-25 18:36:02 +07:00
parent 717b0f0a8e
commit 1ba2f2eec1
37 changed files with 1107 additions and 527 deletions

View file

@ -7,11 +7,11 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.5">
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.8">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.5">
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.8">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>

View file

@ -19,5 +19,28 @@ namespace BMA.EHR.Infrastructure
return services;
}
public static IServiceCollection AddEmailSender(this IServiceCollection services,
IConfiguration configuration)
{
return services;
}
public static IServiceCollection AddS3Storage(this IServiceCollection services,
IConfiguration configuration)
{
return services;
}
}
}

View file

@ -1,142 +0,0 @@
// <auto-generated />
using System;
using BMA.EHR.Infrastructure.Persistence;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Oracle.EntityFrameworkCore.Metadata;
#nullable disable
namespace BMA.EHR.Infrastructure.Migrations
{
[DbContext(typeof(ApplicationDBContext))]
[Migration("20230605123842_Initial Database")]
partial class InitialDatabase
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "7.0.5")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
OracleModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("BMA.EHR.Domain.Entities.MetaData.BloodGroupEntity", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("RAW(16)")
.HasColumnOrder(0)
.HasComment("คีย์หลัก");
b.Property<DateTime>("CreatedDate")
.HasColumnType("TIMESTAMP(7)")
.HasColumnOrder(993)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedUserFullName")
.IsRequired()
.HasColumnType("NVARCHAR2(2000)")
.HasColumnOrder(992)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<Guid>("CreatedUserId")
.HasColumnType("RAW(16)")
.HasColumnOrder(991)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<bool>("IsActivable")
.HasColumnType("NUMBER(1)")
.HasColumnOrder(990)
.HasComment("สถานะการใช้งาน");
b.Property<DateTime?>("ModifiedDate")
.HasColumnType("TIMESTAMP(7)")
.HasColumnOrder(996)
.HasComment("แก้ไขข้อมูลเมื่อ");
b.Property<string>("ModifiedUserFullName")
.HasColumnType("NVARCHAR2(2000)")
.HasColumnOrder(995)
.HasComment("ชื่อ User ที่แก้ไจข้อมูล");
b.Property<Guid?>("ModifiedUserId")
.HasColumnType("RAW(16)")
.HasColumnOrder(994)
.HasComment("User Id ที่แก้ไขข้อมูล");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(2)
.HasColumnType("NVARCHAR2(2)")
.HasColumnOrder(1)
.HasComment("ชื่อหมู่โลหิต");
b.HasKey("Id");
b.ToTable("BloodGroups");
});
modelBuilder.Entity("BMA.EHR.Domain.Entities.MetaData.PrefixEntity", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("RAW(16)")
.HasColumnOrder(0)
.HasComment("คีย์หลัก");
b.Property<DateTime>("CreatedDate")
.HasColumnType("TIMESTAMP(7)")
.HasColumnOrder(993)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedUserFullName")
.IsRequired()
.HasColumnType("NVARCHAR2(2000)")
.HasColumnOrder(992)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<Guid>("CreatedUserId")
.HasColumnType("RAW(16)")
.HasColumnOrder(991)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<bool>("IsActivable")
.HasColumnType("NUMBER(1)")
.HasColumnOrder(990)
.HasComment("สถานะการใช้งาน");
b.Property<DateTime?>("ModifiedDate")
.HasColumnType("TIMESTAMP(7)")
.HasColumnOrder(996)
.HasComment("แก้ไขข้อมูลเมื่อ");
b.Property<string>("ModifiedUserFullName")
.HasColumnType("NVARCHAR2(2000)")
.HasColumnOrder(995)
.HasComment("ชื่อ User ที่แก้ไจข้อมูล");
b.Property<Guid?>("ModifiedUserId")
.HasColumnType("RAW(16)")
.HasColumnOrder(994)
.HasComment("User Id ที่แก้ไขข้อมูล");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("NVARCHAR2(100)")
.HasColumnOrder(1)
.HasComment("รายละเอียดคำนำหน้า");
b.HasKey("Id");
b.ToTable("Prefixes");
});
#pragma warning restore 612, 618
}
}
}

View file

@ -1,63 +0,0 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace BMA.EHR.Infrastructure.Migrations
{
/// <inheritdoc />
public partial class InitialDatabase : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "BloodGroups",
columns: table => new
{
Id = table.Column<Guid>(type: "RAW(16)", nullable: false, comment: "คีย์หลัก"),
Name = table.Column<string>(type: "NVARCHAR2(2)", maxLength: 2, nullable: false, comment: "ชื่อหมู่โลหิต"),
IsActivable = table.Column<bool>(type: "NUMBER(1)", nullable: false, comment: "สถานะการใช้งาน"),
CreatedUserId = table.Column<Guid>(type: "RAW(16)", nullable: false, comment: "User Id ที่สร้างข้อมูล"),
CreatedUserFullName = table.Column<string>(type: "NVARCHAR2(2000)", nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"),
CreatedDate = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
ModifiedUserId = table.Column<Guid>(type: "RAW(16)", nullable: true, comment: "User Id ที่แก้ไขข้อมูล"),
ModifiedUserFullName = table.Column<string>(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อ User ที่แก้ไจข้อมูล"),
ModifiedDate = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลเมื่อ")
},
constraints: table =>
{
table.PrimaryKey("PK_BloodGroups", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Prefixes",
columns: table => new
{
Id = table.Column<Guid>(type: "RAW(16)", nullable: false, comment: "คีย์หลัก"),
Name = table.Column<string>(type: "NVARCHAR2(100)", maxLength: 100, nullable: false, comment: "รายละเอียดคำนำหน้า"),
IsActivable = table.Column<bool>(type: "NUMBER(1)", nullable: false, comment: "สถานะการใช้งาน"),
CreatedUserId = table.Column<Guid>(type: "RAW(16)", nullable: false, comment: "User Id ที่สร้างข้อมูล"),
CreatedUserFullName = table.Column<string>(type: "NVARCHAR2(2000)", nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"),
CreatedDate = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
ModifiedUserId = table.Column<Guid>(type: "RAW(16)", nullable: true, comment: "User Id ที่แก้ไขข้อมูล"),
ModifiedUserFullName = table.Column<string>(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อ User ที่แก้ไจข้อมูล"),
ModifiedDate = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลเมื่อ")
},
constraints: table =>
{
table.PrimaryKey("PK_Prefixes", x => x.Id);
});
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "BloodGroups");
migrationBuilder.DropTable(
name: "Prefixes");
}
}
}

View file

@ -1,142 +0,0 @@
// <auto-generated />
using System;
using BMA.EHR.Infrastructure.Persistence;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Oracle.EntityFrameworkCore.Metadata;
#nullable disable
namespace BMA.EHR.Infrastructure.Migrations
{
[DbContext(typeof(ApplicationDBContext))]
[Migration("20230605131808_Change Field Name")]
partial class ChangeFieldName
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "7.0.5")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
OracleModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("BMA.EHR.Domain.Entities.MetaData.BloodGroupEntity", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("RAW(16)")
.HasColumnOrder(0)
.HasComment("คีย์หลัก");
b.Property<DateTime>("CreatedDate")
.HasColumnType("TIMESTAMP(7)")
.HasColumnOrder(993)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedUserFullName")
.IsRequired()
.HasColumnType("NVARCHAR2(2000)")
.HasColumnOrder(992)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<Guid>("CreatedUserId")
.HasColumnType("RAW(16)")
.HasColumnOrder(991)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<bool>("IsActive")
.HasColumnType("NUMBER(1)")
.HasColumnOrder(990)
.HasComment("สถานะการใช้งาน");
b.Property<DateTime?>("ModifiedDate")
.HasColumnType("TIMESTAMP(7)")
.HasColumnOrder(996)
.HasComment("แก้ไขข้อมูลเมื่อ");
b.Property<string>("ModifiedUserFullName")
.HasColumnType("NVARCHAR2(2000)")
.HasColumnOrder(995)
.HasComment("ชื่อ User ที่แก้ไจข้อมูล");
b.Property<Guid?>("ModifiedUserId")
.HasColumnType("RAW(16)")
.HasColumnOrder(994)
.HasComment("User Id ที่แก้ไขข้อมูล");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(2)
.HasColumnType("NVARCHAR2(2)")
.HasColumnOrder(1)
.HasComment("ชื่อหมู่โลหิต");
b.HasKey("Id");
b.ToTable("BloodGroups");
});
modelBuilder.Entity("BMA.EHR.Domain.Entities.MetaData.PrefixEntity", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("RAW(16)")
.HasColumnOrder(0)
.HasComment("คีย์หลัก");
b.Property<DateTime>("CreatedDate")
.HasColumnType("TIMESTAMP(7)")
.HasColumnOrder(993)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedUserFullName")
.IsRequired()
.HasColumnType("NVARCHAR2(2000)")
.HasColumnOrder(992)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<Guid>("CreatedUserId")
.HasColumnType("RAW(16)")
.HasColumnOrder(991)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<bool>("IsActive")
.HasColumnType("NUMBER(1)")
.HasColumnOrder(990)
.HasComment("สถานะการใช้งาน");
b.Property<DateTime?>("ModifiedDate")
.HasColumnType("TIMESTAMP(7)")
.HasColumnOrder(996)
.HasComment("แก้ไขข้อมูลเมื่อ");
b.Property<string>("ModifiedUserFullName")
.HasColumnType("NVARCHAR2(2000)")
.HasColumnOrder(995)
.HasComment("ชื่อ User ที่แก้ไจข้อมูล");
b.Property<Guid?>("ModifiedUserId")
.HasColumnType("RAW(16)")
.HasColumnOrder(994)
.HasComment("User Id ที่แก้ไขข้อมูล");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("NVARCHAR2(100)")
.HasColumnOrder(1)
.HasComment("รายละเอียดคำนำหน้า");
b.HasKey("Id");
b.ToTable("Prefixes");
});
#pragma warning restore 612, 618
}
}
}

View file

@ -1,38 +0,0 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace BMA.EHR.Infrastructure.Migrations
{
/// <inheritdoc />
public partial class ChangeFieldName : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.RenameColumn(
name: "IsActivable",
table: "Prefixes",
newName: "IsActive");
migrationBuilder.RenameColumn(
name: "IsActivable",
table: "BloodGroups",
newName: "IsActive");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.RenameColumn(
name: "IsActive",
table: "Prefixes",
newName: "IsActivable");
migrationBuilder.RenameColumn(
name: "IsActive",
table: "BloodGroups",
newName: "IsActivable");
}
}
}

View file

@ -0,0 +1,376 @@
// <auto-generated />
using System;
using BMA.EHR.Infrastructure.Persistence;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Oracle.EntityFrameworkCore.Metadata;
#nullable disable
namespace BMA.EHR.Infrastructure.Migrations
{
[DbContext(typeof(ApplicationDBContext))]
[Migration("20230625113156_Init Project")]
partial class InitProject
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "7.0.8")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
OracleModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("BMA.EHR.Domain.Entities.MetaData.BloodGroup.BloodGroupDraftEntity", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("RAW(16)")
.HasColumnOrder(0)
.HasComment("คีย์หลัก");
b.Property<DateTime>("CreatedDate")
.HasColumnType("TIMESTAMP(7)")
.HasColumnOrder(993)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedUserFullName")
.IsRequired()
.HasColumnType("NVARCHAR2(2000)")
.HasColumnOrder(992)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<Guid>("CreatedUserId")
.HasColumnType("RAW(16)")
.HasColumnOrder(991)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<bool>("IsActive")
.HasColumnType("NUMBER(1)")
.HasColumnOrder(990)
.HasComment("สถานะการใช้งาน");
b.Property<bool>("IsPublished")
.HasColumnType("NUMBER(1)")
.HasColumnOrder(899)
.HasComment("สถานะการเผยแพร่ข้อมูล");
b.Property<DateTime?>("ModifiedDate")
.HasColumnType("TIMESTAMP(7)")
.HasColumnOrder(996)
.HasComment("แก้ไขข้อมูลเมื่อ");
b.Property<string>("ModifiedUserFullName")
.HasColumnType("NVARCHAR2(2000)")
.HasColumnOrder(995)
.HasComment("ชื่อ User ที่แก้ไขข้อมูล");
b.Property<Guid?>("ModifiedUserId")
.HasColumnType("RAW(16)")
.HasColumnOrder(994)
.HasComment("User Id ที่แก้ไขข้อมูล");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(2)
.HasColumnType("NVARCHAR2(2)")
.HasColumnOrder(1)
.HasComment("ชื่อหมู่โลหิต");
b.HasKey("Id");
b.ToTable("MD_BloodGroup_Drafts");
});
modelBuilder.Entity("BMA.EHR.Domain.Entities.MetaData.BloodGroup.BloodGroupEntity", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("RAW(16)")
.HasColumnOrder(0)
.HasComment("คีย์หลัก");
b.Property<DateTime>("CreatedDate")
.HasColumnType("TIMESTAMP(7)")
.HasColumnOrder(993)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedUserFullName")
.IsRequired()
.HasColumnType("NVARCHAR2(2000)")
.HasColumnOrder(992)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<Guid>("CreatedUserId")
.HasColumnType("RAW(16)")
.HasColumnOrder(991)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<bool>("IsActive")
.HasColumnType("NUMBER(1)")
.HasColumnOrder(990)
.HasComment("สถานะการใช้งาน");
b.Property<DateTime?>("ModifiedDate")
.HasColumnType("TIMESTAMP(7)")
.HasColumnOrder(996)
.HasComment("แก้ไขข้อมูลเมื่อ");
b.Property<string>("ModifiedUserFullName")
.HasColumnType("NVARCHAR2(2000)")
.HasColumnOrder(995)
.HasComment("ชื่อ User ที่แก้ไขข้อมูล");
b.Property<Guid?>("ModifiedUserId")
.HasColumnType("RAW(16)")
.HasColumnOrder(994)
.HasComment("User Id ที่แก้ไขข้อมูล");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(2)
.HasColumnType("NVARCHAR2(2)")
.HasColumnOrder(1)
.HasComment("ชื่อหมู่โลหิต");
b.HasKey("Id");
b.ToTable("MD_BloodGroups");
});
modelBuilder.Entity("BMA.EHR.Domain.Entities.MetaData.BloodGroup.BloodGroupPublishHistoryEntity", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("RAW(16)")
.HasColumnOrder(0)
.HasComment("คีย์หลัก");
b.Property<DateTime>("CreatedDate")
.HasColumnType("TIMESTAMP(7)")
.HasColumnOrder(993)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedUserFullName")
.IsRequired()
.HasColumnType("NVARCHAR2(2000)")
.HasColumnOrder(992)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<Guid>("CreatedUserId")
.HasColumnType("RAW(16)")
.HasColumnOrder(991)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<string>("Detail")
.IsRequired()
.HasColumnType("NVARCHAR2(2000)")
.HasColumnOrder(1)
.HasComment("รายละเอียดการแก้ไข");
b.Property<DateTime?>("ModifiedDate")
.HasColumnType("TIMESTAMP(7)")
.HasColumnOrder(996)
.HasComment("แก้ไขข้อมูลเมื่อ");
b.Property<string>("ModifiedUserFullName")
.HasColumnType("NVARCHAR2(2000)")
.HasColumnOrder(995)
.HasComment("ชื่อ User ที่แก้ไขข้อมูล");
b.Property<Guid?>("ModifiedUserId")
.HasColumnType("RAW(16)")
.HasColumnOrder(994)
.HasComment("User Id ที่แก้ไขข้อมูล");
b.Property<string>("ObjectValue")
.IsRequired()
.HasColumnType("NVARCHAR2(2000)")
.HasColumnOrder(2)
.HasComment("เก็บ Object ที่มีการอัพเดตในระบบ");
b.HasKey("Id");
b.ToTable("MD_BloodGroup_Histories");
});
modelBuilder.Entity("BMA.EHR.Domain.Entities.MetaData.Prefix.PrefixDraftEntity", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("RAW(16)")
.HasColumnOrder(0)
.HasComment("คีย์หลัก");
b.Property<DateTime>("CreatedDate")
.HasColumnType("TIMESTAMP(7)")
.HasColumnOrder(993)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedUserFullName")
.IsRequired()
.HasColumnType("NVARCHAR2(2000)")
.HasColumnOrder(992)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<Guid>("CreatedUserId")
.HasColumnType("RAW(16)")
.HasColumnOrder(991)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<bool>("IsActive")
.HasColumnType("NUMBER(1)")
.HasColumnOrder(990)
.HasComment("สถานะการใช้งาน");
b.Property<bool>("IsPublished")
.HasColumnType("NUMBER(1)")
.HasColumnOrder(899)
.HasComment("สถานะการเผยแพร่ข้อมูล");
b.Property<DateTime?>("ModifiedDate")
.HasColumnType("TIMESTAMP(7)")
.HasColumnOrder(996)
.HasComment("แก้ไขข้อมูลเมื่อ");
b.Property<string>("ModifiedUserFullName")
.HasColumnType("NVARCHAR2(2000)")
.HasColumnOrder(995)
.HasComment("ชื่อ User ที่แก้ไขข้อมูล");
b.Property<Guid?>("ModifiedUserId")
.HasColumnType("RAW(16)")
.HasColumnOrder(994)
.HasComment("User Id ที่แก้ไขข้อมูล");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("NVARCHAR2(100)")
.HasColumnOrder(1)
.HasComment("รายละเอียดคำนำหน้า");
b.HasKey("Id");
b.ToTable("MD_Prefix_Drafts");
});
modelBuilder.Entity("BMA.EHR.Domain.Entities.MetaData.Prefix.PrefixEntity", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("RAW(16)")
.HasColumnOrder(0)
.HasComment("คีย์หลัก");
b.Property<DateTime>("CreatedDate")
.HasColumnType("TIMESTAMP(7)")
.HasColumnOrder(993)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedUserFullName")
.IsRequired()
.HasColumnType("NVARCHAR2(2000)")
.HasColumnOrder(992)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<Guid>("CreatedUserId")
.HasColumnType("RAW(16)")
.HasColumnOrder(991)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<bool>("IsActive")
.HasColumnType("NUMBER(1)")
.HasColumnOrder(990)
.HasComment("สถานะการใช้งาน");
b.Property<DateTime?>("ModifiedDate")
.HasColumnType("TIMESTAMP(7)")
.HasColumnOrder(996)
.HasComment("แก้ไขข้อมูลเมื่อ");
b.Property<string>("ModifiedUserFullName")
.HasColumnType("NVARCHAR2(2000)")
.HasColumnOrder(995)
.HasComment("ชื่อ User ที่แก้ไขข้อมูล");
b.Property<Guid?>("ModifiedUserId")
.HasColumnType("RAW(16)")
.HasColumnOrder(994)
.HasComment("User Id ที่แก้ไขข้อมูล");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("NVARCHAR2(100)")
.HasColumnOrder(1)
.HasComment("รายละเอียดคำนำหน้า");
b.HasKey("Id");
b.ToTable("MD_Prefixes");
});
modelBuilder.Entity("BMA.EHR.Domain.Entities.MetaData.Prefix.PrefixPublishHistoryEntity", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("RAW(16)")
.HasColumnOrder(0)
.HasComment("คีย์หลัก");
b.Property<DateTime>("CreatedDate")
.HasColumnType("TIMESTAMP(7)")
.HasColumnOrder(993)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedUserFullName")
.IsRequired()
.HasColumnType("NVARCHAR2(2000)")
.HasColumnOrder(992)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<Guid>("CreatedUserId")
.HasColumnType("RAW(16)")
.HasColumnOrder(991)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<string>("Detail")
.IsRequired()
.HasColumnType("NVARCHAR2(2000)")
.HasColumnOrder(1)
.HasComment("รายละเอียดการแก้ไข");
b.Property<DateTime?>("ModifiedDate")
.HasColumnType("TIMESTAMP(7)")
.HasColumnOrder(996)
.HasComment("แก้ไขข้อมูลเมื่อ");
b.Property<string>("ModifiedUserFullName")
.HasColumnType("NVARCHAR2(2000)")
.HasColumnOrder(995)
.HasComment("ชื่อ User ที่แก้ไขข้อมูล");
b.Property<Guid?>("ModifiedUserId")
.HasColumnType("RAW(16)")
.HasColumnOrder(994)
.HasComment("User Id ที่แก้ไขข้อมูล");
b.Property<string>("ObjectValue")
.IsRequired()
.HasColumnType("NVARCHAR2(2000)")
.HasColumnOrder(2)
.HasComment("เก็บ Object ที่มีการอัพเดตในระบบ");
b.HasKey("Id");
b.ToTable("MD_Prefix_Histories");
});
#pragma warning restore 612, 618
}
}
}

View file

@ -0,0 +1,153 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace BMA.EHR.Infrastructure.Migrations
{
/// <inheritdoc />
public partial class InitProject : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "MD_BloodGroup_Drafts",
columns: table => new
{
Id = table.Column<Guid>(type: "RAW(16)", nullable: false, comment: "คีย์หลัก"),
Name = table.Column<string>(type: "NVARCHAR2(2)", maxLength: 2, nullable: false, comment: "ชื่อหมู่โลหิต"),
IsPublished = table.Column<bool>(type: "NUMBER(1)", nullable: false, comment: "สถานะการเผยแพร่ข้อมูล"),
IsActive = table.Column<bool>(type: "NUMBER(1)", nullable: false, comment: "สถานะการใช้งาน"),
CreatedUserId = table.Column<Guid>(type: "RAW(16)", nullable: false, comment: "User Id ที่สร้างข้อมูล"),
CreatedUserFullName = table.Column<string>(type: "NVARCHAR2(2000)", nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"),
CreatedDate = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
ModifiedUserId = table.Column<Guid>(type: "RAW(16)", nullable: true, comment: "User Id ที่แก้ไขข้อมูล"),
ModifiedUserFullName = table.Column<string>(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อ User ที่แก้ไขข้อมูล"),
ModifiedDate = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลเมื่อ")
},
constraints: table =>
{
table.PrimaryKey("PK_MD_BloodGroup_Drafts", x => x.Id);
});
migrationBuilder.CreateTable(
name: "MD_BloodGroup_Histories",
columns: table => new
{
Id = table.Column<Guid>(type: "RAW(16)", nullable: false, comment: "คีย์หลัก"),
Detail = table.Column<string>(type: "NVARCHAR2(2000)", nullable: false, comment: "รายละเอียดการแก้ไข"),
ObjectValue = table.Column<string>(type: "NVARCHAR2(2000)", nullable: false, comment: "เก็บ Object ที่มีการอัพเดตในระบบ"),
CreatedUserId = table.Column<Guid>(type: "RAW(16)", nullable: false, comment: "User Id ที่สร้างข้อมูล"),
CreatedUserFullName = table.Column<string>(type: "NVARCHAR2(2000)", nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"),
CreatedDate = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
ModifiedUserId = table.Column<Guid>(type: "RAW(16)", nullable: true, comment: "User Id ที่แก้ไขข้อมูล"),
ModifiedUserFullName = table.Column<string>(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อ User ที่แก้ไขข้อมูล"),
ModifiedDate = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลเมื่อ")
},
constraints: table =>
{
table.PrimaryKey("PK_MD_BloodGroup_Histories", x => x.Id);
});
migrationBuilder.CreateTable(
name: "MD_BloodGroups",
columns: table => new
{
Id = table.Column<Guid>(type: "RAW(16)", nullable: false, comment: "คีย์หลัก"),
Name = table.Column<string>(type: "NVARCHAR2(2)", maxLength: 2, nullable: false, comment: "ชื่อหมู่โลหิต"),
IsActive = table.Column<bool>(type: "NUMBER(1)", nullable: false, comment: "สถานะการใช้งาน"),
CreatedUserId = table.Column<Guid>(type: "RAW(16)", nullable: false, comment: "User Id ที่สร้างข้อมูล"),
CreatedUserFullName = table.Column<string>(type: "NVARCHAR2(2000)", nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"),
CreatedDate = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
ModifiedUserId = table.Column<Guid>(type: "RAW(16)", nullable: true, comment: "User Id ที่แก้ไขข้อมูล"),
ModifiedUserFullName = table.Column<string>(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อ User ที่แก้ไขข้อมูล"),
ModifiedDate = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลเมื่อ")
},
constraints: table =>
{
table.PrimaryKey("PK_MD_BloodGroups", x => x.Id);
});
migrationBuilder.CreateTable(
name: "MD_Prefix_Drafts",
columns: table => new
{
Id = table.Column<Guid>(type: "RAW(16)", nullable: false, comment: "คีย์หลัก"),
Name = table.Column<string>(type: "NVARCHAR2(100)", maxLength: 100, nullable: false, comment: "รายละเอียดคำนำหน้า"),
IsPublished = table.Column<bool>(type: "NUMBER(1)", nullable: false, comment: "สถานะการเผยแพร่ข้อมูล"),
IsActive = table.Column<bool>(type: "NUMBER(1)", nullable: false, comment: "สถานะการใช้งาน"),
CreatedUserId = table.Column<Guid>(type: "RAW(16)", nullable: false, comment: "User Id ที่สร้างข้อมูล"),
CreatedUserFullName = table.Column<string>(type: "NVARCHAR2(2000)", nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"),
CreatedDate = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
ModifiedUserId = table.Column<Guid>(type: "RAW(16)", nullable: true, comment: "User Id ที่แก้ไขข้อมูล"),
ModifiedUserFullName = table.Column<string>(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อ User ที่แก้ไขข้อมูล"),
ModifiedDate = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลเมื่อ")
},
constraints: table =>
{
table.PrimaryKey("PK_MD_Prefix_Drafts", x => x.Id);
});
migrationBuilder.CreateTable(
name: "MD_Prefix_Histories",
columns: table => new
{
Id = table.Column<Guid>(type: "RAW(16)", nullable: false, comment: "คีย์หลัก"),
Detail = table.Column<string>(type: "NVARCHAR2(2000)", nullable: false, comment: "รายละเอียดการแก้ไข"),
ObjectValue = table.Column<string>(type: "NVARCHAR2(2000)", nullable: false, comment: "เก็บ Object ที่มีการอัพเดตในระบบ"),
CreatedUserId = table.Column<Guid>(type: "RAW(16)", nullable: false, comment: "User Id ที่สร้างข้อมูล"),
CreatedUserFullName = table.Column<string>(type: "NVARCHAR2(2000)", nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"),
CreatedDate = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
ModifiedUserId = table.Column<Guid>(type: "RAW(16)", nullable: true, comment: "User Id ที่แก้ไขข้อมูล"),
ModifiedUserFullName = table.Column<string>(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อ User ที่แก้ไขข้อมูล"),
ModifiedDate = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลเมื่อ")
},
constraints: table =>
{
table.PrimaryKey("PK_MD_Prefix_Histories", x => x.Id);
});
migrationBuilder.CreateTable(
name: "MD_Prefixes",
columns: table => new
{
Id = table.Column<Guid>(type: "RAW(16)", nullable: false, comment: "คีย์หลัก"),
Name = table.Column<string>(type: "NVARCHAR2(100)", maxLength: 100, nullable: false, comment: "รายละเอียดคำนำหน้า"),
IsActive = table.Column<bool>(type: "NUMBER(1)", nullable: false, comment: "สถานะการใช้งาน"),
CreatedUserId = table.Column<Guid>(type: "RAW(16)", nullable: false, comment: "User Id ที่สร้างข้อมูล"),
CreatedUserFullName = table.Column<string>(type: "NVARCHAR2(2000)", nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"),
CreatedDate = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
ModifiedUserId = table.Column<Guid>(type: "RAW(16)", nullable: true, comment: "User Id ที่แก้ไขข้อมูล"),
ModifiedUserFullName = table.Column<string>(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อ User ที่แก้ไขข้อมูล"),
ModifiedDate = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลเมื่อ")
},
constraints: table =>
{
table.PrimaryKey("PK_MD_Prefixes", x => x.Id);
});
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "MD_BloodGroup_Drafts");
migrationBuilder.DropTable(
name: "MD_BloodGroup_Histories");
migrationBuilder.DropTable(
name: "MD_BloodGroups");
migrationBuilder.DropTable(
name: "MD_Prefix_Drafts");
migrationBuilder.DropTable(
name: "MD_Prefix_Histories");
migrationBuilder.DropTable(
name: "MD_Prefixes");
}
}
}

View file

@ -17,12 +17,12 @@ namespace BMA.EHR.Infrastructure.Migrations
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "7.0.5")
.HasAnnotation("ProductVersion", "7.0.8")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
OracleModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("BMA.EHR.Domain.Entities.MetaData.BloodGroupEntity", b =>
modelBuilder.Entity("BMA.EHR.Domain.Entities.MetaData.BloodGroup.BloodGroupDraftEntity", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
@ -51,6 +51,11 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnOrder(990)
.HasComment("สถานะการใช้งาน");
b.Property<bool>("IsPublished")
.HasColumnType("NUMBER(1)")
.HasColumnOrder(899)
.HasComment("สถานะการเผยแพร่ข้อมูล");
b.Property<DateTime?>("ModifiedDate")
.HasColumnType("TIMESTAMP(7)")
.HasColumnOrder(996)
@ -59,7 +64,7 @@ namespace BMA.EHR.Infrastructure.Migrations
b.Property<string>("ModifiedUserFullName")
.HasColumnType("NVARCHAR2(2000)")
.HasColumnOrder(995)
.HasComment("ชื่อ User ที่แก้ไข้อมูล");
.HasComment("ชื่อ User ที่แก้ไข้อมูล");
b.Property<Guid?>("ModifiedUserId")
.HasColumnType("RAW(16)")
@ -75,10 +80,10 @@ namespace BMA.EHR.Infrastructure.Migrations
b.HasKey("Id");
b.ToTable("BloodGroups");
b.ToTable("MD_BloodGroup_Drafts");
});
modelBuilder.Entity("BMA.EHR.Domain.Entities.MetaData.PrefixEntity", b =>
modelBuilder.Entity("BMA.EHR.Domain.Entities.MetaData.BloodGroup.BloodGroupEntity", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
@ -115,7 +120,124 @@ namespace BMA.EHR.Infrastructure.Migrations
b.Property<string>("ModifiedUserFullName")
.HasColumnType("NVARCHAR2(2000)")
.HasColumnOrder(995)
.HasComment("ชื่อ User ที่แก้ไจข้อมูล");
.HasComment("ชื่อ User ที่แก้ไขข้อมูล");
b.Property<Guid?>("ModifiedUserId")
.HasColumnType("RAW(16)")
.HasColumnOrder(994)
.HasComment("User Id ที่แก้ไขข้อมูล");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(2)
.HasColumnType("NVARCHAR2(2)")
.HasColumnOrder(1)
.HasComment("ชื่อหมู่โลหิต");
b.HasKey("Id");
b.ToTable("MD_BloodGroups");
});
modelBuilder.Entity("BMA.EHR.Domain.Entities.MetaData.BloodGroup.BloodGroupPublishHistoryEntity", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("RAW(16)")
.HasColumnOrder(0)
.HasComment("คีย์หลัก");
b.Property<DateTime>("CreatedDate")
.HasColumnType("TIMESTAMP(7)")
.HasColumnOrder(993)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedUserFullName")
.IsRequired()
.HasColumnType("NVARCHAR2(2000)")
.HasColumnOrder(992)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<Guid>("CreatedUserId")
.HasColumnType("RAW(16)")
.HasColumnOrder(991)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<string>("Detail")
.IsRequired()
.HasColumnType("NVARCHAR2(2000)")
.HasColumnOrder(1)
.HasComment("รายละเอียดการแก้ไข");
b.Property<DateTime?>("ModifiedDate")
.HasColumnType("TIMESTAMP(7)")
.HasColumnOrder(996)
.HasComment("แก้ไขข้อมูลเมื่อ");
b.Property<string>("ModifiedUserFullName")
.HasColumnType("NVARCHAR2(2000)")
.HasColumnOrder(995)
.HasComment("ชื่อ User ที่แก้ไขข้อมูล");
b.Property<Guid?>("ModifiedUserId")
.HasColumnType("RAW(16)")
.HasColumnOrder(994)
.HasComment("User Id ที่แก้ไขข้อมูล");
b.Property<string>("ObjectValue")
.IsRequired()
.HasColumnType("NVARCHAR2(2000)")
.HasColumnOrder(2)
.HasComment("เก็บ Object ที่มีการอัพเดตในระบบ");
b.HasKey("Id");
b.ToTable("MD_BloodGroup_Histories");
});
modelBuilder.Entity("BMA.EHR.Domain.Entities.MetaData.Prefix.PrefixDraftEntity", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("RAW(16)")
.HasColumnOrder(0)
.HasComment("คีย์หลัก");
b.Property<DateTime>("CreatedDate")
.HasColumnType("TIMESTAMP(7)")
.HasColumnOrder(993)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedUserFullName")
.IsRequired()
.HasColumnType("NVARCHAR2(2000)")
.HasColumnOrder(992)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<Guid>("CreatedUserId")
.HasColumnType("RAW(16)")
.HasColumnOrder(991)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<bool>("IsActive")
.HasColumnType("NUMBER(1)")
.HasColumnOrder(990)
.HasComment("สถานะการใช้งาน");
b.Property<bool>("IsPublished")
.HasColumnType("NUMBER(1)")
.HasColumnOrder(899)
.HasComment("สถานะการเผยแพร่ข้อมูล");
b.Property<DateTime?>("ModifiedDate")
.HasColumnType("TIMESTAMP(7)")
.HasColumnOrder(996)
.HasComment("แก้ไขข้อมูลเมื่อ");
b.Property<string>("ModifiedUserFullName")
.HasColumnType("NVARCHAR2(2000)")
.HasColumnOrder(995)
.HasComment("ชื่อ User ที่แก้ไขข้อมูล");
b.Property<Guid?>("ModifiedUserId")
.HasColumnType("RAW(16)")
@ -131,7 +253,119 @@ namespace BMA.EHR.Infrastructure.Migrations
b.HasKey("Id");
b.ToTable("Prefixes");
b.ToTable("MD_Prefix_Drafts");
});
modelBuilder.Entity("BMA.EHR.Domain.Entities.MetaData.Prefix.PrefixEntity", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("RAW(16)")
.HasColumnOrder(0)
.HasComment("คีย์หลัก");
b.Property<DateTime>("CreatedDate")
.HasColumnType("TIMESTAMP(7)")
.HasColumnOrder(993)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedUserFullName")
.IsRequired()
.HasColumnType("NVARCHAR2(2000)")
.HasColumnOrder(992)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<Guid>("CreatedUserId")
.HasColumnType("RAW(16)")
.HasColumnOrder(991)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<bool>("IsActive")
.HasColumnType("NUMBER(1)")
.HasColumnOrder(990)
.HasComment("สถานะการใช้งาน");
b.Property<DateTime?>("ModifiedDate")
.HasColumnType("TIMESTAMP(7)")
.HasColumnOrder(996)
.HasComment("แก้ไขข้อมูลเมื่อ");
b.Property<string>("ModifiedUserFullName")
.HasColumnType("NVARCHAR2(2000)")
.HasColumnOrder(995)
.HasComment("ชื่อ User ที่แก้ไขข้อมูล");
b.Property<Guid?>("ModifiedUserId")
.HasColumnType("RAW(16)")
.HasColumnOrder(994)
.HasComment("User Id ที่แก้ไขข้อมูล");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("NVARCHAR2(100)")
.HasColumnOrder(1)
.HasComment("รายละเอียดคำนำหน้า");
b.HasKey("Id");
b.ToTable("MD_Prefixes");
});
modelBuilder.Entity("BMA.EHR.Domain.Entities.MetaData.Prefix.PrefixPublishHistoryEntity", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("RAW(16)")
.HasColumnOrder(0)
.HasComment("คีย์หลัก");
b.Property<DateTime>("CreatedDate")
.HasColumnType("TIMESTAMP(7)")
.HasColumnOrder(993)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedUserFullName")
.IsRequired()
.HasColumnType("NVARCHAR2(2000)")
.HasColumnOrder(992)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<Guid>("CreatedUserId")
.HasColumnType("RAW(16)")
.HasColumnOrder(991)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<string>("Detail")
.IsRequired()
.HasColumnType("NVARCHAR2(2000)")
.HasColumnOrder(1)
.HasComment("รายละเอียดการแก้ไข");
b.Property<DateTime?>("ModifiedDate")
.HasColumnType("TIMESTAMP(7)")
.HasColumnOrder(996)
.HasComment("แก้ไขข้อมูลเมื่อ");
b.Property<string>("ModifiedUserFullName")
.HasColumnType("NVARCHAR2(2000)")
.HasColumnOrder(995)
.HasComment("ชื่อ User ที่แก้ไขข้อมูล");
b.Property<Guid?>("ModifiedUserId")
.HasColumnType("RAW(16)")
.HasColumnOrder(994)
.HasComment("User Id ที่แก้ไขข้อมูล");
b.Property<string>("ObjectValue")
.IsRequired()
.HasColumnType("NVARCHAR2(2000)")
.HasColumnOrder(2)
.HasComment("เก็บ Object ที่มีการอัพเดตในระบบ");
b.HasKey("Id");
b.ToTable("MD_Prefix_Histories");
});
#pragma warning restore 612, 618
}

View file

@ -1,20 +1,38 @@
using BMA.EHR.Application.Common.Interfaces;
using BMA.EHR.Domain.Entities.MetaData;
using BMA.EHR.Domain.Entities.MetaData.BloodGroup;
using BMA.EHR.Domain.Entities.MetaData.Prefix;
using Microsoft.EntityFrameworkCore;
namespace BMA.EHR.Infrastructure.Persistence
{
public class ApplicationDBContext : DbContext, IApplicationDBContext
public class ApplicationDBContext : DbContext, IApplicationDBContext
{
public ApplicationDBContext(DbContextOptions<ApplicationDBContext> options)
: base(options)
{
}
public DbSet<PrefixEntity> Prefixes { get; set; }
public DbSet<BloodGroupEntity> BloodGroups { get; set; }
#region " Prefix "
public Task<int> SaveChangesAsync()
public DbSet<PrefixEntity> MD_Prefixes { get; set; }
public DbSet<PrefixDraftEntity> MD_Prefix_Drafts { get; set; }
public DbSet<PrefixPublishHistoryEntity> MD_Prefix_Histories { get; set; }
#endregion
#region " BloodGroups "
public DbSet<BloodGroupEntity> MD_BloodGroups { get; set; }
public DbSet<BloodGroupDraftEntity> MD_BloodGroup_Drafts { get; set; }
public DbSet<BloodGroupPublishHistoryEntity> MD_BloodGroup_Histories { get; set; }
#endregion
public Task<int> SaveChangesAsync()
{
return base.SaveChangesAsync();
}