แก้คำสั่ง 21
This commit is contained in:
parent
be788b6311
commit
a7c305a4d8
5 changed files with 16950 additions and 3 deletions
16758
BMA.EHR.Infrastructure/Migrations/20231011015450_update table PlacementAppointment add employee.Designer.cs
generated
Normal file
16758
BMA.EHR.Infrastructure/Migrations/20231011015450_update table PlacementAppointment add employee.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,143 @@
|
|||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BMA.EHR.Infrastructure.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class updatetablePlacementAppointmentaddemployee : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "OrgEmployeeId",
|
||||
table: "PlacementAppointments",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
collation: "ascii_general_ci");
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "PositionEmployeeLineId",
|
||||
table: "PlacementAppointments",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
collation: "ascii_general_ci");
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "PositionEmployeePositionId",
|
||||
table: "PlacementAppointments",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
collation: "ascii_general_ci");
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "PositionEmployeeStatusId",
|
||||
table: "PlacementAppointments",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
collation: "ascii_general_ci");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PlacementAppointments_OrgEmployeeId",
|
||||
table: "PlacementAppointments",
|
||||
column: "OrgEmployeeId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PlacementAppointments_PositionEmployeeLineId",
|
||||
table: "PlacementAppointments",
|
||||
column: "PositionEmployeeLineId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PlacementAppointments_PositionEmployeePositionId",
|
||||
table: "PlacementAppointments",
|
||||
column: "PositionEmployeePositionId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PlacementAppointments_PositionEmployeeStatusId",
|
||||
table: "PlacementAppointments",
|
||||
column: "PositionEmployeeStatusId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PlacementAppointments_OrganizationEmployees_OrgEmployeeId",
|
||||
table: "PlacementAppointments",
|
||||
column: "OrgEmployeeId",
|
||||
principalTable: "OrganizationEmployees",
|
||||
principalColumn: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PlacementAppointments_PositionEmployeeLines_PositionEmployee~",
|
||||
table: "PlacementAppointments",
|
||||
column: "PositionEmployeeLineId",
|
||||
principalTable: "PositionEmployeeLines",
|
||||
principalColumn: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PlacementAppointments_PositionEmployeePositions_PositionEmpl~",
|
||||
table: "PlacementAppointments",
|
||||
column: "PositionEmployeePositionId",
|
||||
principalTable: "PositionEmployeePositions",
|
||||
principalColumn: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PlacementAppointments_PositionEmployeeStatuses_PositionEmplo~",
|
||||
table: "PlacementAppointments",
|
||||
column: "PositionEmployeeStatusId",
|
||||
principalTable: "PositionEmployeeStatuses",
|
||||
principalColumn: "Id");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_PlacementAppointments_OrganizationEmployees_OrgEmployeeId",
|
||||
table: "PlacementAppointments");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_PlacementAppointments_PositionEmployeeLines_PositionEmployee~",
|
||||
table: "PlacementAppointments");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_PlacementAppointments_PositionEmployeePositions_PositionEmpl~",
|
||||
table: "PlacementAppointments");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_PlacementAppointments_PositionEmployeeStatuses_PositionEmplo~",
|
||||
table: "PlacementAppointments");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_PlacementAppointments_OrgEmployeeId",
|
||||
table: "PlacementAppointments");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_PlacementAppointments_PositionEmployeeLineId",
|
||||
table: "PlacementAppointments");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_PlacementAppointments_PositionEmployeePositionId",
|
||||
table: "PlacementAppointments");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_PlacementAppointments_PositionEmployeeStatusId",
|
||||
table: "PlacementAppointments");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "OrgEmployeeId",
|
||||
table: "PlacementAppointments");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PositionEmployeeLineId",
|
||||
table: "PlacementAppointments");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PositionEmployeePositionId",
|
||||
table: "PlacementAppointments");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PositionEmployeeStatusId",
|
||||
table: "PlacementAppointments");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -10819,6 +10819,9 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
.HasColumnType("varchar(100)")
|
||||
.HasComment("สัญชาติ");
|
||||
|
||||
b.Property<Guid?>("OrgEmployeeId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<Guid?>("OrganizationPositionId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
|
|
@ -10830,6 +10833,15 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
.HasColumnType("datetime(6)")
|
||||
.HasComment("ดำรงตำแหน่งในระดับปัจจุบันเมื่อ");
|
||||
|
||||
b.Property<Guid?>("PositionEmployeeLineId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<Guid?>("PositionEmployeePositionId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<Guid?>("PositionEmployeeStatusId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<Guid?>("PositionLevelId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
|
|
@ -10903,8 +10915,16 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
|
||||
b.HasIndex("GenderId");
|
||||
|
||||
b.HasIndex("OrgEmployeeId");
|
||||
|
||||
b.HasIndex("OrganizationPositionId");
|
||||
|
||||
b.HasIndex("PositionEmployeeLineId");
|
||||
|
||||
b.HasIndex("PositionEmployeePositionId");
|
||||
|
||||
b.HasIndex("PositionEmployeeStatusId");
|
||||
|
||||
b.HasIndex("PositionLevelId");
|
||||
|
||||
b.HasIndex("PositionLineId");
|
||||
|
|
@ -15589,10 +15609,26 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
.WithMany()
|
||||
.HasForeignKey("GenderId");
|
||||
|
||||
b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrgEmployee")
|
||||
.WithMany()
|
||||
.HasForeignKey("OrgEmployeeId");
|
||||
|
||||
b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition")
|
||||
.WithMany()
|
||||
.HasForeignKey("OrganizationPositionId");
|
||||
|
||||
b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", "PositionEmployeeLine")
|
||||
.WithMany()
|
||||
.HasForeignKey("PositionEmployeeLineId");
|
||||
|
||||
b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", "PositionEmployeePosition")
|
||||
.WithMany()
|
||||
.HasForeignKey("PositionEmployeePositionId");
|
||||
|
||||
b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeStatus", "PositionEmployeeStatus")
|
||||
.WithMany()
|
||||
.HasForeignKey("PositionEmployeeStatusId");
|
||||
|
||||
b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel")
|
||||
.WithMany()
|
||||
.HasForeignKey("PositionLevelId");
|
||||
|
|
@ -15643,8 +15679,16 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
|
||||
b.Navigation("Gender");
|
||||
|
||||
b.Navigation("OrgEmployee");
|
||||
|
||||
b.Navigation("OrganizationPosition");
|
||||
|
||||
b.Navigation("PositionEmployeeLine");
|
||||
|
||||
b.Navigation("PositionEmployeePosition");
|
||||
|
||||
b.Navigation("PositionEmployeeStatus");
|
||||
|
||||
b.Navigation("PositionLevel");
|
||||
|
||||
b.Navigation("PositionLine");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue