mirate employee temp
This commit is contained in:
parent
4753e1b45e
commit
164117ef3d
4 changed files with 16443 additions and 24 deletions
16014
BMA.EHR.Infrastructure/Migrations/20230831050947_update table profile add employee temp.Designer.cs
generated
Normal file
16014
BMA.EHR.Infrastructure/Migrations/20230831050947_update table profile add employee temp.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,354 @@
|
|||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BMA.EHR.Infrastructure.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class updatetableprofileaddemployeetemp : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PositionEmployeeGroup",
|
||||
table: "Profiles");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PositionEmployeeLevel",
|
||||
table: "Profiles");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PositionEmployeePosition",
|
||||
table: "Profiles");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PositionEmployeePositionSide",
|
||||
table: "Profiles");
|
||||
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "PositionEmployeePositionSideId",
|
||||
table: "Profiles",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
collation: "ascii_general_ci",
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "char(36)",
|
||||
oldNullable: true,
|
||||
oldComment: "Id ด้านของตำแหน่ง")
|
||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
||||
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "PositionEmployeePositionId",
|
||||
table: "Profiles",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
collation: "ascii_general_ci",
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "char(36)",
|
||||
oldNullable: true,
|
||||
oldComment: "Id ตำแหน่ง")
|
||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
||||
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "PositionEmployeeLevelId",
|
||||
table: "Profiles",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
collation: "ascii_general_ci",
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "char(36)",
|
||||
oldNullable: true,
|
||||
oldComment: " Id ระดับชั้นงาน")
|
||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
||||
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "PositionEmployeeGroupId",
|
||||
table: "Profiles",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
collation: "ascii_general_ci",
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "char(36)",
|
||||
oldNullable: true,
|
||||
oldComment: "Id กลุ่มงาน")
|
||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
||||
|
||||
migrationBuilder.AddColumn<double>(
|
||||
name: "EmployeeMoneyAllowance",
|
||||
table: "Profiles",
|
||||
type: "double",
|
||||
nullable: true,
|
||||
comment: "เงินช่วยเหลือค่าครองชีพชั่วคราว");
|
||||
|
||||
migrationBuilder.AddColumn<double>(
|
||||
name: "EmployeeMoneyEmployee",
|
||||
table: "Profiles",
|
||||
type: "double",
|
||||
nullable: true,
|
||||
comment: "เงินสมทบประกันสังคม(ลูกจ้าง)");
|
||||
|
||||
migrationBuilder.AddColumn<double>(
|
||||
name: "EmployeeMoneyEmployer",
|
||||
table: "Profiles",
|
||||
type: "double",
|
||||
nullable: true,
|
||||
comment: "เงินสมทบประกันสังคม(นายจ้าง)");
|
||||
|
||||
migrationBuilder.AddColumn<double>(
|
||||
name: "EmployeeMoneyIncrease",
|
||||
table: "Profiles",
|
||||
type: "double",
|
||||
nullable: true,
|
||||
comment: "เงินเพิ่มการครองชีพชั่วคราว");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "EmployeeOc",
|
||||
table: "Profiles",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "สังกัด")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "EmployeeTypeIndividual",
|
||||
table: "Profiles",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ประเภทบุคคล")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "EmployeeWage",
|
||||
table: "Profiles",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ค่าจ้าง")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "PositionEmployeeLineId",
|
||||
table: "Profiles",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
collation: "ascii_general_ci");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Profiles_PositionEmployeeGroupId",
|
||||
table: "Profiles",
|
||||
column: "PositionEmployeeGroupId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Profiles_PositionEmployeeLevelId",
|
||||
table: "Profiles",
|
||||
column: "PositionEmployeeLevelId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Profiles_PositionEmployeeLineId",
|
||||
table: "Profiles",
|
||||
column: "PositionEmployeeLineId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Profiles_PositionEmployeePositionId",
|
||||
table: "Profiles",
|
||||
column: "PositionEmployeePositionId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Profiles_PositionEmployeePositionSideId",
|
||||
table: "Profiles",
|
||||
column: "PositionEmployeePositionSideId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Profiles_PositionEmployeeGroups_PositionEmployeeGroupId",
|
||||
table: "Profiles",
|
||||
column: "PositionEmployeeGroupId",
|
||||
principalTable: "PositionEmployeeGroups",
|
||||
principalColumn: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Profiles_PositionEmployeeLevels_PositionEmployeeLevelId",
|
||||
table: "Profiles",
|
||||
column: "PositionEmployeeLevelId",
|
||||
principalTable: "PositionEmployeeLevels",
|
||||
principalColumn: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Profiles_PositionEmployeeLines_PositionEmployeeLineId",
|
||||
table: "Profiles",
|
||||
column: "PositionEmployeeLineId",
|
||||
principalTable: "PositionEmployeeLines",
|
||||
principalColumn: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Profiles_PositionEmployeePositionSides_PositionEmployeePosit~",
|
||||
table: "Profiles",
|
||||
column: "PositionEmployeePositionSideId",
|
||||
principalTable: "PositionEmployeePositionSides",
|
||||
principalColumn: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Profiles_PositionEmployeePositions_PositionEmployeePositionId",
|
||||
table: "Profiles",
|
||||
column: "PositionEmployeePositionId",
|
||||
principalTable: "PositionEmployeePositions",
|
||||
principalColumn: "Id");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Profiles_PositionEmployeeGroups_PositionEmployeeGroupId",
|
||||
table: "Profiles");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Profiles_PositionEmployeeLevels_PositionEmployeeLevelId",
|
||||
table: "Profiles");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Profiles_PositionEmployeeLines_PositionEmployeeLineId",
|
||||
table: "Profiles");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Profiles_PositionEmployeePositionSides_PositionEmployeePosit~",
|
||||
table: "Profiles");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Profiles_PositionEmployeePositions_PositionEmployeePositionId",
|
||||
table: "Profiles");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_Profiles_PositionEmployeeGroupId",
|
||||
table: "Profiles");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_Profiles_PositionEmployeeLevelId",
|
||||
table: "Profiles");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_Profiles_PositionEmployeeLineId",
|
||||
table: "Profiles");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_Profiles_PositionEmployeePositionId",
|
||||
table: "Profiles");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_Profiles_PositionEmployeePositionSideId",
|
||||
table: "Profiles");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "EmployeeMoneyAllowance",
|
||||
table: "Profiles");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "EmployeeMoneyEmployee",
|
||||
table: "Profiles");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "EmployeeMoneyEmployer",
|
||||
table: "Profiles");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "EmployeeMoneyIncrease",
|
||||
table: "Profiles");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "EmployeeOc",
|
||||
table: "Profiles");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "EmployeeTypeIndividual",
|
||||
table: "Profiles");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "EmployeeWage",
|
||||
table: "Profiles");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PositionEmployeeLineId",
|
||||
table: "Profiles");
|
||||
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "PositionEmployeePositionSideId",
|
||||
table: "Profiles",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
comment: "Id ด้านของตำแหน่ง",
|
||||
collation: "ascii_general_ci",
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "char(36)",
|
||||
oldNullable: true)
|
||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
||||
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "PositionEmployeePositionId",
|
||||
table: "Profiles",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
comment: "Id ตำแหน่ง",
|
||||
collation: "ascii_general_ci",
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "char(36)",
|
||||
oldNullable: true)
|
||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
||||
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "PositionEmployeeLevelId",
|
||||
table: "Profiles",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
comment: " Id ระดับชั้นงาน",
|
||||
collation: "ascii_general_ci",
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "char(36)",
|
||||
oldNullable: true)
|
||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
||||
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "PositionEmployeeGroupId",
|
||||
table: "Profiles",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
comment: "Id กลุ่มงาน",
|
||||
collation: "ascii_general_ci",
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "char(36)",
|
||||
oldNullable: true)
|
||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "PositionEmployeeGroup",
|
||||
table: "Profiles",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "กลุ่มงาน")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "PositionEmployeeLevel",
|
||||
table: "Profiles",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ระดับชั้นงาน")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "PositionEmployeePosition",
|
||||
table: "Profiles",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ตำแหน่ง")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "PositionEmployeePositionSide",
|
||||
table: "Profiles",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ด้านของตำแหน่ง")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1029,11 +1029,39 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
.HasColumnType("varchar(20)")
|
||||
.HasComment("ประเภทลูกจ้าง");
|
||||
|
||||
b.Property<double?>("EmployeeMoneyAllowance")
|
||||
.HasColumnType("double")
|
||||
.HasComment("เงินช่วยเหลือค่าครองชีพชั่วคราว");
|
||||
|
||||
b.Property<double?>("EmployeeMoneyEmployee")
|
||||
.HasColumnType("double")
|
||||
.HasComment("เงินสมทบประกันสังคม(ลูกจ้าง)");
|
||||
|
||||
b.Property<double?>("EmployeeMoneyEmployer")
|
||||
.HasColumnType("double")
|
||||
.HasComment("เงินสมทบประกันสังคม(นายจ้าง)");
|
||||
|
||||
b.Property<double?>("EmployeeMoneyIncrease")
|
||||
.HasColumnType("double")
|
||||
.HasComment("เงินเพิ่มการครองชีพชั่วคราว");
|
||||
|
||||
b.Property<string>("EmployeeOc")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("สังกัด");
|
||||
|
||||
b.Property<string>("EmployeeType")
|
||||
.HasMaxLength(20)
|
||||
.HasColumnType("varchar(20)")
|
||||
.HasComment("ประเภทการจ้าง");
|
||||
|
||||
b.Property<string>("EmployeeTypeIndividual")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("ประเภทบุคคล");
|
||||
|
||||
b.Property<string>("EmployeeWage")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("ค่าจ้าง");
|
||||
|
||||
b.Property<string>("EntryStatus")
|
||||
.IsRequired()
|
||||
.HasMaxLength(5)
|
||||
|
|
@ -1228,37 +1256,20 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
b.Property<Guid?>("PosNoId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<string>("PositionEmployeeGroup")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("กลุ่มงาน");
|
||||
|
||||
b.Property<Guid?>("PositionEmployeeGroupId")
|
||||
.HasColumnType("char(36)")
|
||||
.HasComment("Id กลุ่มงาน");
|
||||
|
||||
b.Property<string>("PositionEmployeeLevel")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("ระดับชั้นงาน");
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<Guid?>("PositionEmployeeLevelId")
|
||||
.HasColumnType("char(36)")
|
||||
.HasComment(" Id ระดับชั้นงาน");
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<string>("PositionEmployeePosition")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("ตำแหน่ง");
|
||||
b.Property<Guid?>("PositionEmployeeLineId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<Guid?>("PositionEmployeePositionId")
|
||||
.HasColumnType("char(36)")
|
||||
.HasComment("Id ตำแหน่ง");
|
||||
|
||||
b.Property<string>("PositionEmployeePositionSide")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("ด้านของตำแหน่ง");
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<Guid?>("PositionEmployeePositionSideId")
|
||||
.HasColumnType("char(36)")
|
||||
.HasComment("Id ด้านของตำแหน่ง");
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<string>("PositionExecutive")
|
||||
.HasColumnType("longtext")
|
||||
|
|
@ -1380,6 +1391,16 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
|
||||
b.HasIndex("PosNoId");
|
||||
|
||||
b.HasIndex("PositionEmployeeGroupId");
|
||||
|
||||
b.HasIndex("PositionEmployeeLevelId");
|
||||
|
||||
b.HasIndex("PositionEmployeeLineId");
|
||||
|
||||
b.HasIndex("PositionEmployeePositionId");
|
||||
|
||||
b.HasIndex("PositionEmployeePositionSideId");
|
||||
|
||||
b.HasIndex("PositionId");
|
||||
|
||||
b.HasIndex("PositionLevelId");
|
||||
|
|
@ -13855,6 +13876,26 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
.WithMany()
|
||||
.HasForeignKey("PosNoId");
|
||||
|
||||
b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeGroup", "PositionEmployeeGroup")
|
||||
.WithMany()
|
||||
.HasForeignKey("PositionEmployeeGroupId");
|
||||
|
||||
b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", "PositionEmployeeLevel")
|
||||
.WithMany()
|
||||
.HasForeignKey("PositionEmployeeLevelId");
|
||||
|
||||
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.PositionEmployeePositionSide", "PositionEmployeePositionSide")
|
||||
.WithMany()
|
||||
.HasForeignKey("PositionEmployeePositionSideId");
|
||||
|
||||
b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "Position")
|
||||
.WithMany()
|
||||
.HasForeignKey("PositionId");
|
||||
|
|
@ -13881,6 +13922,16 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
|
||||
b.Navigation("Position");
|
||||
|
||||
b.Navigation("PositionEmployeeGroup");
|
||||
|
||||
b.Navigation("PositionEmployeeLevel");
|
||||
|
||||
b.Navigation("PositionEmployeeLine");
|
||||
|
||||
b.Navigation("PositionEmployeePosition");
|
||||
|
||||
b.Navigation("PositionEmployeePositionSide");
|
||||
|
||||
b.Navigation("PositionLevel");
|
||||
|
||||
b.Navigation("PositionType");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue