From 917e20df26954f855af92e7be692f2ff34162a16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A6=20=E8=B5=B5?= <89237069@qq.com> Date: Tue, 22 Aug 2023 11:49:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20230822033456_202308220001.Designer.cs | 208 ++++++++++++++++++ .../Migrations/20230822033456_202308220001.cs | 117 ++++++++++ .../20230822034321_2023082200001.Designer.cs | 208 ++++++++++++++++++ .../20230822034321_2023082200001.cs | 17 ++ .../BaseServiceDbContextModelSnapshot.cs | 206 +++++++++++++++++ .../appsettings.json | 2 +- .../appsettings.json | 2 +- 7 files changed, 758 insertions(+), 2 deletions(-) create mode 100644 code/src/Modules/BaseService/BaseService.EntityFrameworkCore/Migrations/20230822033456_202308220001.Designer.cs create mode 100644 code/src/Modules/BaseService/BaseService.EntityFrameworkCore/Migrations/20230822033456_202308220001.cs create mode 100644 code/src/Modules/BaseService/BaseService.EntityFrameworkCore/Migrations/20230822034321_2023082200001.Designer.cs create mode 100644 code/src/Modules/BaseService/BaseService.EntityFrameworkCore/Migrations/20230822034321_2023082200001.cs create mode 100644 code/src/Modules/BaseService/BaseService.EntityFrameworkCore/Migrations/BaseServiceDbContextModelSnapshot.cs diff --git a/code/src/Modules/BaseService/BaseService.EntityFrameworkCore/Migrations/20230822033456_202308220001.Designer.cs b/code/src/Modules/BaseService/BaseService.EntityFrameworkCore/Migrations/20230822033456_202308220001.Designer.cs new file mode 100644 index 00000000..a3c5c89b --- /dev/null +++ b/code/src/Modules/BaseService/BaseService.EntityFrameworkCore/Migrations/20230822033456_202308220001.Designer.cs @@ -0,0 +1,208 @@ +// +using System; +using BaseService.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +namespace BaseService.Migrations +{ + [DbContext(typeof(BaseServiceDbContext))] + [Migration("20230822033456_202308220001")] + partial class _202308220001 + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("Relational:MaxIdentifierLength", 128) + .HasAnnotation("ProductVersion", "5.0.17") + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + modelBuilder.Entity("BaseService.BaseData.Branch", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CascadeId") + .HasColumnType("nvarchar(max)"); + + b.Property("CategoryId") + .HasColumnType("smallint"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Enabled") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FullName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Leaf") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Pid") + .HasColumnType("uniqueidentifier"); + + b.Property("Sort") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("Pid"); + + b.ToTable("base_branches"); + }); + + modelBuilder.Entity("BaseService.BaseData.UserBranch", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.ToTable("base_user_branches"); + }); + + modelBuilder.Entity("BaseService.RelationBaseData.BranchRole", b => + { + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.HasKey("BranchId", "RoleId"); + + b.ToTable("base_branch_role"); + }); + + modelBuilder.Entity("BaseService.BaseData.UserBranch", b => + { + b.OwnsMany("BaseService.BaseData.UserBranchRole", "Roles", b1 => + { + b1.Property("UserBranchId") + .HasColumnType("uniqueidentifier"); + + b1.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + b1.Property("RoleId") + .HasColumnType("uniqueidentifier"); + + b1.HasKey("UserBranchId", "Id"); + + b1.ToTable("base_user_branch_role"); + + b1.WithOwner() + .HasForeignKey("UserBranchId"); + }); + + b.Navigation("Roles"); + }); + + modelBuilder.Entity("BaseService.RelationBaseData.BranchRole", b => + { + b.HasOne("BaseService.BaseData.Branch", null) + .WithMany("Roles") + .HasForeignKey("BranchId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("BaseService.BaseData.Branch", b => + { + b.Navigation("Roles"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/code/src/Modules/BaseService/BaseService.EntityFrameworkCore/Migrations/20230822033456_202308220001.cs b/code/src/Modules/BaseService/BaseService.EntityFrameworkCore/Migrations/20230822033456_202308220001.cs new file mode 100644 index 00000000..cd5d02e0 --- /dev/null +++ b/code/src/Modules/BaseService/BaseService.EntityFrameworkCore/Migrations/20230822033456_202308220001.cs @@ -0,0 +1,117 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +namespace BaseService.Migrations +{ + public partial class _202308220001 : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "base_branches", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + CategoryId = table.Column(type: "smallint", nullable: false), + Pid = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + FullName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + Sort = table.Column(type: "int", nullable: false), + Leaf = table.Column(type: "bit", nullable: false), + CascadeId = table.Column(type: "nvarchar(max)", nullable: true), + Enabled = table.Column(type: "bit", nullable: false, defaultValue: false), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_base_branches", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "base_user_branches", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + UserId = table.Column(type: "uniqueidentifier", nullable: false), + BranchId = table.Column(type: "uniqueidentifier", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_base_user_branches", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "base_branch_role", + columns: table => new + { + RoleId = table.Column(type: "uniqueidentifier", nullable: false), + BranchId = table.Column(type: "uniqueidentifier", nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_base_branch_role", x => new { x.BranchId, x.RoleId }); + table.ForeignKey( + name: "FK_base_branch_role_base_branches_BranchId", + column: x => x.BranchId, + principalTable: "base_branches", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "base_user_branch_role", + columns: table => new + { + UserBranchId = table.Column(type: "uniqueidentifier", nullable: false), + Id = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + RoleId = table.Column(type: "uniqueidentifier", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_base_user_branch_role", x => new { x.UserBranchId, x.Id }); + table.ForeignKey( + name: "FK_base_user_branch_role_base_user_branches_UserBranchId", + column: x => x.UserBranchId, + principalTable: "base_user_branches", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateIndex( + name: "IX_base_branches_Pid", + table: "base_branches", + column: "Pid"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "base_branch_role"); + + migrationBuilder.DropTable( + name: "base_user_branch_role"); + + migrationBuilder.DropTable( + name: "base_branches"); + + migrationBuilder.DropTable( + name: "base_user_branches"); + } + } +} diff --git a/code/src/Modules/BaseService/BaseService.EntityFrameworkCore/Migrations/20230822034321_2023082200001.Designer.cs b/code/src/Modules/BaseService/BaseService.EntityFrameworkCore/Migrations/20230822034321_2023082200001.Designer.cs new file mode 100644 index 00000000..c9b9de82 --- /dev/null +++ b/code/src/Modules/BaseService/BaseService.EntityFrameworkCore/Migrations/20230822034321_2023082200001.Designer.cs @@ -0,0 +1,208 @@ +// +using System; +using BaseService.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +namespace BaseService.Migrations +{ + [DbContext(typeof(BaseServiceDbContext))] + [Migration("20230822034321_2023082200001")] + partial class _2023082200001 + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("Relational:MaxIdentifierLength", 128) + .HasAnnotation("ProductVersion", "5.0.17") + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + modelBuilder.Entity("BaseService.BaseData.Branch", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CascadeId") + .HasColumnType("nvarchar(max)"); + + b.Property("CategoryId") + .HasColumnType("smallint"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Enabled") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FullName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Leaf") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Pid") + .HasColumnType("uniqueidentifier"); + + b.Property("Sort") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("Pid"); + + b.ToTable("base_branches"); + }); + + modelBuilder.Entity("BaseService.BaseData.UserBranch", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.ToTable("base_user_branches"); + }); + + modelBuilder.Entity("BaseService.RelationBaseData.BranchRole", b => + { + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.HasKey("BranchId", "RoleId"); + + b.ToTable("base_branch_role"); + }); + + modelBuilder.Entity("BaseService.BaseData.UserBranch", b => + { + b.OwnsMany("BaseService.BaseData.UserBranchRole", "Roles", b1 => + { + b1.Property("UserBranchId") + .HasColumnType("uniqueidentifier"); + + b1.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + b1.Property("RoleId") + .HasColumnType("uniqueidentifier"); + + b1.HasKey("UserBranchId", "Id"); + + b1.ToTable("base_user_branch_role"); + + b1.WithOwner() + .HasForeignKey("UserBranchId"); + }); + + b.Navigation("Roles"); + }); + + modelBuilder.Entity("BaseService.RelationBaseData.BranchRole", b => + { + b.HasOne("BaseService.BaseData.Branch", null) + .WithMany("Roles") + .HasForeignKey("BranchId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("BaseService.BaseData.Branch", b => + { + b.Navigation("Roles"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/code/src/Modules/BaseService/BaseService.EntityFrameworkCore/Migrations/20230822034321_2023082200001.cs b/code/src/Modules/BaseService/BaseService.EntityFrameworkCore/Migrations/20230822034321_2023082200001.cs new file mode 100644 index 00000000..d46d45a6 --- /dev/null +++ b/code/src/Modules/BaseService/BaseService.EntityFrameworkCore/Migrations/20230822034321_2023082200001.cs @@ -0,0 +1,17 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +namespace BaseService.Migrations +{ + public partial class _2023082200001 : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + + } + } +} diff --git a/code/src/Modules/BaseService/BaseService.EntityFrameworkCore/Migrations/BaseServiceDbContextModelSnapshot.cs b/code/src/Modules/BaseService/BaseService.EntityFrameworkCore/Migrations/BaseServiceDbContextModelSnapshot.cs new file mode 100644 index 00000000..de43d075 --- /dev/null +++ b/code/src/Modules/BaseService/BaseService.EntityFrameworkCore/Migrations/BaseServiceDbContextModelSnapshot.cs @@ -0,0 +1,206 @@ +// +using System; +using BaseService.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +namespace BaseService.Migrations +{ + [DbContext(typeof(BaseServiceDbContext))] + partial class BaseServiceDbContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("Relational:MaxIdentifierLength", 128) + .HasAnnotation("ProductVersion", "5.0.17") + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + modelBuilder.Entity("BaseService.BaseData.Branch", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CascadeId") + .HasColumnType("nvarchar(max)"); + + b.Property("CategoryId") + .HasColumnType("smallint"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Enabled") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FullName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Leaf") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Pid") + .HasColumnType("uniqueidentifier"); + + b.Property("Sort") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("Pid"); + + b.ToTable("base_branches"); + }); + + modelBuilder.Entity("BaseService.BaseData.UserBranch", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.ToTable("base_user_branches"); + }); + + modelBuilder.Entity("BaseService.RelationBaseData.BranchRole", b => + { + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.HasKey("BranchId", "RoleId"); + + b.ToTable("base_branch_role"); + }); + + modelBuilder.Entity("BaseService.BaseData.UserBranch", b => + { + b.OwnsMany("BaseService.BaseData.UserBranchRole", "Roles", b1 => + { + b1.Property("UserBranchId") + .HasColumnType("uniqueidentifier"); + + b1.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + b1.Property("RoleId") + .HasColumnType("uniqueidentifier"); + + b1.HasKey("UserBranchId", "Id"); + + b1.ToTable("base_user_branch_role"); + + b1.WithOwner() + .HasForeignKey("UserBranchId"); + }); + + b.Navigation("Roles"); + }); + + modelBuilder.Entity("BaseService.RelationBaseData.BranchRole", b => + { + b.HasOne("BaseService.BaseData.Branch", null) + .WithMany("Roles") + .HasForeignKey("BranchId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("BaseService.BaseData.Branch", b => + { + b.Navigation("Roles"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.json b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.json index e37990d3..7c9c32ad 100644 --- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.json +++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.json @@ -3,7 +3,7 @@ "CorsOrigins": "https://*.abc.com,http://localhost:9527,http://149.223.116.5:8088" }, "ConnectionStrings": { - "Default": "Server=dev.ccwin-in.com,13319;Database=BJABP;User ID=ccwin-in;Password=Microsoft@2022;Trusted_Connection=False;TrustServerCertificate=True", + "Default": "Server=dev.ccwin-in.com,13326;Database=BJABP;User ID=ccwin-in;Password=Microsoft@2022;Trusted_Connection=False;TrustServerCertificate=True", "SettleAccountService": "Server=dev.ccwin-in.com,13326;Database=BQ_SA;User ID=ccwin-in;Password=Microsoft@2022;Trusted_Connection=False;TrustServerCertificate=True;", "WMSBJBMPT": "Server=dev.ccwin-in.com,6208;Database=WMS_BJBMPT_2;User ID=sa;Password=ChangkeTec@2021;Trusted_Connection=False;TrustServerCertificate=True;", "questdb": "host=dev.ccwin-in.com;port=10580;username=admin;password=quest;database=vmi;ServerCompatibilityMode=NoTypeLoading;" diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/appsettings.json b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/appsettings.json index 8ec07179..f4639bcf 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/appsettings.json +++ b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/appsettings.json @@ -9,7 +9,7 @@ "CorsOrigins": "http://localhost:9527,http://dev.ccwin-in.com:10588,http://localhost:44307" }, "ConnectionStrings": { - "Default": "Server=dev.ccwin-in.com,13319;Database=BJABP;User ID=ccwin-in;Password=Microsoft@2022;Trusted_Connection=False;TrustServerCertificate=True", + "Default": "Server=dev.ccwin-in.com,13326;Database=BJABP;User ID=ccwin-in;Password=Microsoft@2022;Trusted_Connection=False;TrustServerCertificate=True", "SettleAccountService": "Server=dev.ccwin-in.com,13319;Database=BQ_SA;User ID=ccwin-in;Password=Microsoft@2022;Trusted_Connection=False;TrustServerCertificate=True;" //"SettleAccountService": "Server=localhost;Database=BQ_SA;User ID=sa;Password=aA123456!;Trusted_Connection=False;TrustServerCertificate=True", //"Default": "Server=localhost;Database=BJABP;User ID=sa;Password=aA123456!;Trusted_Connection=False;TrustServerCertificate=True"