merge 冲突合并

This commit is contained in:
2021-04-28 13:52:10 +08:00
54 changed files with 23287 additions and 91 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,57 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace Ewide.Database.Migrations.Migrations
{
public partial class addAreaNumberRelation : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "AreaNumberCode",
table: "sys_org",
type: "varchar(10) CHARACTER SET utf8mb4",
nullable: true,
comment: "组织所在区域代码");
migrationBuilder.AddColumn<int>(
name: "UnbindParent",
table: "sys_menu",
type: "int",
nullable: false,
defaultValue: 0,
comment: "不关联菜单显示");
migrationBuilder.CreateIndex(
name: "IX_sys_org_AreaNumberCode",
table: "sys_org",
column: "AreaNumberCode");
migrationBuilder.AddForeignKey(
name: "FK_sys_org_ewide_area_number_AreaNumberCode",
table: "sys_org",
column: "AreaNumberCode",
principalTable: "ewide_area_number",
principalColumn: "Code",
onDelete: ReferentialAction.Restrict);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_sys_org_ewide_area_number_AreaNumberCode",
table: "sys_org");
migrationBuilder.DropIndex(
name: "IX_sys_org_AreaNumberCode",
table: "sys_org");
migrationBuilder.DropColumn(
name: "AreaNumberCode",
table: "sys_org");
migrationBuilder.DropColumn(
name: "UnbindParent",
table: "sys_menu");
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,79 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace Ewide.Database.Migrations.Migrations
{
public partial class areaCodemanytomany : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "sys_role_area",
columns: table => new
{
SysRoleId = table.Column<string>(type: "varchar(36)", nullable: false, comment: "角色Id"),
AreaNumberCode = table.Column<string>(type: "varchar(10) CHARACTER SET utf8mb4", maxLength: 10, nullable: false, comment: "系统使用的区域代码")
},
constraints: table =>
{
table.PrimaryKey("PK_sys_role_area", x => new { x.SysRoleId, x.AreaNumberCode });
table.ForeignKey(
name: "FK_sys_role_area_ewide_area_number_AreaNumberCode",
column: x => x.AreaNumberCode,
principalTable: "ewide_area_number",
principalColumn: "Code",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_sys_role_area_sys_role_SysRoleId",
column: x => x.SysRoleId,
principalTable: "sys_role",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
},
comment: "角色区域自定义数据");
migrationBuilder.CreateTable(
name: "sys_user_area",
columns: table => new
{
SysUserId = table.Column<string>(type: "varchar(36)", nullable: false, comment: "用户Id"),
AreaNumberCode = table.Column<string>(type: "varchar(10) CHARACTER SET utf8mb4", maxLength: 10, nullable: false, comment: "系统使用的区域代码")
},
constraints: table =>
{
table.PrimaryKey("PK_sys_user_area", x => new { x.SysUserId, x.AreaNumberCode });
table.ForeignKey(
name: "FK_sys_user_area_ewide_area_number_AreaNumberCode",
column: x => x.AreaNumberCode,
principalTable: "ewide_area_number",
principalColumn: "Code",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_sys_user_area_sys_user_SysUserId",
column: x => x.SysUserId,
principalTable: "sys_user",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
},
comment: "用户授权区域信息");
migrationBuilder.CreateIndex(
name: "IX_sys_role_area_AreaNumberCode",
table: "sys_role_area",
column: "AreaNumberCode");
migrationBuilder.CreateIndex(
name: "IX_sys_user_area_AreaNumberCode",
table: "sys_user_area",
column: "AreaNumberCode");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "sys_role_area");
migrationBuilder.DropTable(
name: "sys_user_area");
}
}
}