ปรับปรุงรายงานกรอบวงเงิน
This commit is contained in:
132
Migrations/25640301044832_AddLimitFrame.cs
Normal file
132
Migrations/25640301044832_AddLimitFrame.cs
Normal file
@@ -0,0 +1,132 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace tb320eva.Migrations
|
||||
{
|
||||
public partial class AddLimitFrame : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "eva_limit_frame_plan",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<Guid>(nullable: false),
|
||||
created = table.Column<DateTime>(nullable: false),
|
||||
updated = table.Column<DateTime>(nullable: false),
|
||||
isActive = table.Column<bool>(nullable: false),
|
||||
plan_guid = table.Column<Guid>(nullable: true),
|
||||
executed_date = table.Column<DateTime>(nullable: true),
|
||||
limit_frame_005 = table.Column<decimal>(nullable: true),
|
||||
status_self = table.Column<string>(maxLength: 1, nullable: true),
|
||||
status_chief = table.Column<string>(maxLength: 1, nullable: true),
|
||||
supervisor1 = table.Column<int>(nullable: true),
|
||||
supervisor1_result = table.Column<string>(maxLength: 1, nullable: true),
|
||||
supervisor1_remark = table.Column<string>(maxLength: 1000, nullable: true),
|
||||
supervisor1_date = table.Column<DateTime>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_eva_limit_frame_plan", x => x.id);
|
||||
table.ForeignKey(
|
||||
name: "FK_eva_limit_frame_plan_eva_performance_plan_plan_guid",
|
||||
column: x => x.plan_guid,
|
||||
principalTable: "eva_performance_plan",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "eva_limit_frame_group",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<Guid>(nullable: false),
|
||||
created = table.Column<DateTime>(nullable: false),
|
||||
updated = table.Column<DateTime>(nullable: false),
|
||||
isActive = table.Column<bool>(nullable: false),
|
||||
frame_plan_guid = table.Column<Guid>(nullable: true),
|
||||
group_guid = table.Column<Guid>(nullable: true),
|
||||
limit_frame_295 = table.Column<decimal>(nullable: true),
|
||||
total_salary = table.Column<decimal>(nullable: true),
|
||||
total_salary_limit = table.Column<decimal>(nullable: true),
|
||||
total_salary_limit_rounded = table.Column<decimal>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_eva_limit_frame_group", x => x.id);
|
||||
table.ForeignKey(
|
||||
name: "FK_eva_limit_frame_group_eva_limit_frame_plan_frame_plan_guid",
|
||||
column: x => x.frame_plan_guid,
|
||||
principalTable: "eva_limit_frame_plan",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_eva_limit_frame_group_eva_evaluation_group_group_guid",
|
||||
column: x => x.group_guid,
|
||||
principalTable: "eva_evaluation_group",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "eva_limit_frame_employee",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<Guid>(nullable: false),
|
||||
created = table.Column<DateTime>(nullable: false),
|
||||
updated = table.Column<DateTime>(nullable: false),
|
||||
isActive = table.Column<bool>(nullable: false),
|
||||
frame_group_guid = table.Column<Guid>(nullable: true),
|
||||
employee_id = table.Column<int>(nullable: true),
|
||||
org_id = table.Column<int>(nullable: true),
|
||||
position_id = table.Column<int>(nullable: true),
|
||||
level_id = table.Column<int>(nullable: true),
|
||||
salary = table.Column<decimal>(nullable: true),
|
||||
position_allowance = table.Column<decimal>(nullable: true),
|
||||
monthly_remuneration = table.Column<decimal>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_eva_limit_frame_employee", x => x.id);
|
||||
table.ForeignKey(
|
||||
name: "FK_eva_limit_frame_employee_eva_limit_frame_group_frame_group_~",
|
||||
column: x => x.frame_group_guid,
|
||||
principalTable: "eva_limit_frame_group",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_eva_limit_frame_employee_frame_group_guid",
|
||||
table: "eva_limit_frame_employee",
|
||||
column: "frame_group_guid");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_eva_limit_frame_group_frame_plan_guid",
|
||||
table: "eva_limit_frame_group",
|
||||
column: "frame_plan_guid");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_eva_limit_frame_group_group_guid",
|
||||
table: "eva_limit_frame_group",
|
||||
column: "group_guid");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_eva_limit_frame_plan_plan_guid",
|
||||
table: "eva_limit_frame_plan",
|
||||
column: "plan_guid");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "eva_limit_frame_employee");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "eva_limit_frame_group");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "eva_limit_frame_plan");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user