Add role type ids

This commit is contained in:
Фролов 2022-02-01 15:07:06 +05:00
parent 3aef211b94
commit 9e546a4cfd
5 changed files with 4904 additions and 82 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,589 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace AsbCloudDb.Migrations
{
public partial class AddRoleTypeIds : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1,
column: "id_type",
value: 1);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1100,
column: "id_type",
value: 1);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1101,
column: "id_type",
value: 1);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1102,
column: "id_type",
value: 1);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1103,
column: "id_type",
value: 1);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1104,
column: "id_type",
value: 1);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1105,
column: "id_type",
value: 1);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1106,
column: "id_type",
value: 1);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1107,
column: "id_type",
value: 1);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1108,
column: "id_type",
value: 1);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1109,
column: "id_type",
value: 1);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1110,
column: "id_type",
value: 1);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1111,
column: "id_type",
value: 1);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1112,
column: "id_type",
value: 1);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1113,
column: "id_type",
value: 1);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1114,
column: "id_type",
value: 1);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1115,
column: "id_type",
value: 1);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1116,
column: "id_type",
value: 1);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1117,
column: "id_type",
value: 1);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1200,
column: "id_type",
value: 1);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1201,
column: "id_type",
value: 1);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1202,
column: "id_type",
value: 1);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1203,
column: "id_type",
value: 1);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1204,
column: "id_type",
value: 1);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1205,
column: "id_type",
value: 1);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1206,
column: "id_type",
value: 1);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1207,
column: "id_type",
value: 1);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1208,
column: "id_type",
value: 1);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1209,
column: "id_type",
value: 1);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1210,
column: "id_type",
value: 1);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1211,
column: "id_type",
value: 1);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1212,
column: "id_type",
value: 1);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1213,
column: "id_type",
value: 1);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1214,
column: "id_type",
value: 1);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1215,
column: "id_type",
value: 1);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1216,
column: "id_type",
value: 1);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1217,
column: "id_type",
value: 1);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1218,
column: "id_type",
value: 1);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1219,
column: "id_type",
value: 1);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1220,
column: "id_type",
value: 1);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1221,
column: "id_type",
value: 1);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1,
column: "id_type",
value: 0);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1100,
column: "id_type",
value: 0);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1101,
column: "id_type",
value: 0);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1102,
column: "id_type",
value: 0);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1103,
column: "id_type",
value: 0);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1104,
column: "id_type",
value: 0);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1105,
column: "id_type",
value: 0);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1106,
column: "id_type",
value: 0);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1107,
column: "id_type",
value: 0);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1108,
column: "id_type",
value: 0);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1109,
column: "id_type",
value: 0);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1110,
column: "id_type",
value: 0);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1111,
column: "id_type",
value: 0);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1112,
column: "id_type",
value: 0);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1113,
column: "id_type",
value: 0);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1114,
column: "id_type",
value: 0);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1115,
column: "id_type",
value: 0);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1116,
column: "id_type",
value: 0);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1117,
column: "id_type",
value: 0);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1200,
column: "id_type",
value: 0);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1201,
column: "id_type",
value: 0);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1202,
column: "id_type",
value: 0);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1203,
column: "id_type",
value: 0);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1204,
column: "id_type",
value: 0);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1205,
column: "id_type",
value: 0);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1206,
column: "id_type",
value: 0);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1207,
column: "id_type",
value: 0);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1208,
column: "id_type",
value: 0);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1209,
column: "id_type",
value: 0);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1210,
column: "id_type",
value: 0);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1211,
column: "id_type",
value: 0);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1212,
column: "id_type",
value: 0);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1213,
column: "id_type",
value: 0);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1214,
column: "id_type",
value: 0);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1215,
column: "id_type",
value: 0);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1216,
column: "id_type",
value: 0);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1217,
column: "id_type",
value: 0);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1218,
column: "id_type",
value: 0);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1219,
column: "id_type",
value: 0);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1220,
column: "id_type",
value: 0);
migrationBuilder.UpdateData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1221,
column: "id_type",
value: 0);
}
}
}

View File

@ -2668,247 +2668,247 @@ namespace AsbCloudDb.Migrations
{
Id = 1,
Caption = "root",
IdType = 0
IdType = 1
},
new
{
Id = 1100,
Caption = "admin_cluster.view",
IdType = 0
IdType = 1
},
new
{
Id = 1101,
Caption = "admin_cluster.edit",
IdType = 0
IdType = 1
},
new
{
Id = 1102,
Caption = "admin_company.view",
IdType = 0
IdType = 1
},
new
{
Id = 1103,
Caption = "admin_company.edit",
IdType = 0
IdType = 1
},
new
{
Id = 1104,
Caption = "admin_company_type.view",
IdType = 0
IdType = 1
},
new
{
Id = 1105,
Caption = "admin_company_type.edit",
IdType = 0
IdType = 1
},
new
{
Id = 1106,
Caption = "admin_deposit.view",
IdType = 0
IdType = 1
},
new
{
Id = 1107,
Caption = "admin_deposit.edit",
IdType = 0
IdType = 1
},
new
{
Id = 1108,
Caption = "admin_permission.view",
IdType = 0
IdType = 1
},
new
{
Id = 1109,
Caption = "admin_permission.edit",
IdType = 0
IdType = 1
},
new
{
Id = 1110,
Caption = "admin_role.view",
IdType = 0
IdType = 1
},
new
{
Id = 1111,
Caption = "admin_role.edit",
IdType = 0
IdType = 1
},
new
{
Id = 1112,
Caption = "admin_telemetry.view",
IdType = 0
IdType = 1
},
new
{
Id = 1113,
Caption = "admin_user.view",
IdType = 0
IdType = 1
},
new
{
Id = 1114,
Caption = "admin_user.edit",
IdType = 0
IdType = 1
},
new
{
Id = 1115,
Caption = "admin_visit_log.view",
IdType = 0
IdType = 1
},
new
{
Id = 1116,
Caption = "admin_well.view",
IdType = 0
IdType = 1
},
new
{
Id = 1117,
Caption = "admin_well.edit",
IdType = 0
IdType = 1
},
new
{
Id = 1200,
Caption = "archive.view",
IdType = 0
IdType = 1
},
new
{
Id = 1201,
Caption = "cluster.view",
IdType = 0
IdType = 1
},
new
{
Id = 1202,
Caption = "composite.view",
IdType = 0
IdType = 1
},
new
{
Id = 1203,
Caption = "composite.edit",
IdType = 0
IdType = 1
},
new
{
Id = 1204,
Caption = "deposit.view",
IdType = 0
IdType = 1
},
new
{
Id = 1205,
Caption = "document.view",
IdType = 0
IdType = 1
},
new
{
Id = 1206,
Caption = "drillProcessFlow.view",
IdType = 0
IdType = 1
},
new
{
Id = 1207,
Caption = "drillProcessFlow.edit",
IdType = 0
IdType = 1
},
new
{
Id = 1208,
Caption = "measure.view",
IdType = 0
IdType = 1
},
new
{
Id = 1209,
Caption = "measure.edit",
IdType = 0
IdType = 1
},
new
{
Id = 1210,
Caption = "message.view",
IdType = 0
IdType = 1
},
new
{
Id = 1211,
Caption = "operations.view",
IdType = 0
IdType = 1
},
new
{
Id = 1212,
Caption = "operations.edit",
IdType = 0
IdType = 1
},
new
{
Id = 1213,
Caption = "params.view",
IdType = 0
IdType = 1
},
new
{
Id = 1214,
Caption = "params.edit",
IdType = 0
IdType = 1
},
new
{
Id = 1215,
Caption = "report.view",
IdType = 0
IdType = 1
},
new
{
Id = 1216,
Caption = "report.edit",
IdType = 0
IdType = 1
},
new
{
Id = 1217,
Caption = "setpoints.view",
IdType = 0
IdType = 1
},
new
{
Id = 1218,
Caption = "setpoints.edit",
IdType = 0
IdType = 1
},
new
{
Id = 1219,
Caption = "telemetry.view",
IdType = 0
IdType = 1
},
new
{
Id = 1220,
Caption = "telemetryAnalysis.view",
IdType = 0
IdType = 1
},
new
{
Id = 1221,
Caption = "well.view",
IdType = 0
IdType = 1
});
});

View File

@ -271,47 +271,47 @@ namespace AsbCloudDb.Model
modelBuilder.Entity<UserRole>(entity =>
{
entity.HasData(new List<UserRole>{
new UserRole{ Id = 1, Caption = "root", },
new UserRole{ Id = 1100, Caption = "admin_cluster.view"},
new UserRole{ Id = 1101, Caption = "admin_cluster.edit"},
new UserRole{ Id = 1102, Caption = "admin_company.view"},
new UserRole{ Id = 1103, Caption = "admin_company.edit"},
new UserRole{ Id = 1104, Caption = "admin_company_type.view"},
new UserRole{ Id = 1105, Caption = "admin_company_type.edit"},
new UserRole{ Id = 1106, Caption = "admin_deposit.view"},
new UserRole{ Id = 1107, Caption = "admin_deposit.edit"},
new UserRole{ Id = 1108, Caption = "admin_permission.view"},
new UserRole{ Id = 1109, Caption = "admin_permission.edit"},
new UserRole{ Id = 1110, Caption = "admin_role.view"},
new UserRole{ Id = 1111, Caption = "admin_role.edit"},
new UserRole{ Id = 1112, Caption = "admin_telemetry.view"},
new UserRole{ Id = 1113, Caption = "admin_user.view"},
new UserRole{ Id = 1114, Caption = "admin_user.edit"},
new UserRole{ Id = 1115, Caption = "admin_visit_log.view"},
new UserRole{ Id = 1116, Caption = "admin_well.view"},
new UserRole{ Id = 1117, Caption = "admin_well.edit"},
new UserRole{ Id = 1200, Caption = "archive.view"},
new UserRole{ Id = 1201, Caption = "cluster.view"},
new UserRole{ Id = 1202, Caption = "composite.view"},
new UserRole{ Id = 1203, Caption = "composite.edit"},
new UserRole{ Id = 1204, Caption = "deposit.view"},
new UserRole{ Id = 1205, Caption = "document.view"},
new UserRole{ Id = 1206, Caption = "drillProcessFlow.view"},
new UserRole{ Id = 1207, Caption = "drillProcessFlow.edit"},
new UserRole{ Id = 1208, Caption = "measure.view"},
new UserRole{ Id = 1209, Caption = "measure.edit"},
new UserRole{ Id = 1210, Caption = "message.view"},
new UserRole{ Id = 1211, Caption = "operations.view"},
new UserRole{ Id = 1212, Caption = "operations.edit"},
new UserRole{ Id = 1213, Caption = "params.view"},
new UserRole{ Id = 1214, Caption = "params.edit"},
new UserRole{ Id = 1215, Caption = "report.view"},
new UserRole{ Id = 1216, Caption = "report.edit"},
new UserRole{ Id = 1217, Caption = "setpoints.view"},
new UserRole{ Id = 1218, Caption = "setpoints.edit"},
new UserRole{ Id = 1219, Caption = "telemetry.view"},
new UserRole{ Id = 1220, Caption = "telemetryAnalysis.view"},
new UserRole{ Id = 1221, Caption = "well.view"},
new UserRole{ Id = 1, Caption = "root", IdType = 1},
new UserRole{ Id = 1100, Caption = "admin_cluster.view", IdType = 1},
new UserRole{ Id = 1101, Caption = "admin_cluster.edit", IdType = 1},
new UserRole{ Id = 1102, Caption = "admin_company.view", IdType = 1},
new UserRole{ Id = 1103, Caption = "admin_company.edit", IdType = 1},
new UserRole{ Id = 1104, Caption = "admin_company_type.view", IdType = 1},
new UserRole{ Id = 1105, Caption = "admin_company_type.edit", IdType = 1},
new UserRole{ Id = 1106, Caption = "admin_deposit.view", IdType = 1},
new UserRole{ Id = 1107, Caption = "admin_deposit.edit", IdType = 1},
new UserRole{ Id = 1108, Caption = "admin_permission.view", IdType = 1},
new UserRole{ Id = 1109, Caption = "admin_permission.edit", IdType = 1},
new UserRole{ Id = 1110, Caption = "admin_role.view", IdType = 1},
new UserRole{ Id = 1111, Caption = "admin_role.edit", IdType = 1},
new UserRole{ Id = 1112, Caption = "admin_telemetry.view", IdType = 1},
new UserRole{ Id = 1113, Caption = "admin_user.view", IdType = 1},
new UserRole{ Id = 1114, Caption = "admin_user.edit", IdType = 1},
new UserRole{ Id = 1115, Caption = "admin_visit_log.view", IdType = 1},
new UserRole{ Id = 1116, Caption = "admin_well.view", IdType = 1},
new UserRole{ Id = 1117, Caption = "admin_well.edit", IdType = 1},
new UserRole{ Id = 1200, Caption = "archive.view", IdType = 1},
new UserRole{ Id = 1201, Caption = "cluster.view", IdType = 1},
new UserRole{ Id = 1202, Caption = "composite.view", IdType = 1},
new UserRole{ Id = 1203, Caption = "composite.edit", IdType = 1},
new UserRole{ Id = 1204, Caption = "deposit.view", IdType = 1},
new UserRole{ Id = 1205, Caption = "document.view", IdType = 1},
new UserRole{ Id = 1206, Caption = "drillProcessFlow.view", IdType = 1},
new UserRole{ Id = 1207, Caption = "drillProcessFlow.edit", IdType = 1},
new UserRole{ Id = 1208, Caption = "measure.view", IdType = 1},
new UserRole{ Id = 1209, Caption = "measure.edit", IdType = 1},
new UserRole{ Id = 1210, Caption = "message.view", IdType = 1},
new UserRole{ Id = 1211, Caption = "operations.view", IdType = 1},
new UserRole{ Id = 1212, Caption = "operations.edit", IdType = 1},
new UserRole{ Id = 1213, Caption = "params.view", IdType = 1},
new UserRole{ Id = 1214, Caption = "params.edit", IdType = 1},
new UserRole{ Id = 1215, Caption = "report.view", IdType = 1},
new UserRole{ Id = 1216, Caption = "report.edit", IdType = 1},
new UserRole{ Id = 1217, Caption = "setpoints.view", IdType = 1},
new UserRole{ Id = 1218, Caption = "setpoints.edit", IdType = 1},
new UserRole{ Id = 1219, Caption = "telemetry.view", IdType = 1},
new UserRole{ Id = 1220, Caption = "telemetryAnalysis.view", IdType = 1},
new UserRole{ Id = 1221, Caption = "well.view", IdType = 1},
});
});