Browse Source

feat: 集成CodeManagement模块

example
WangJunZzz 1 year ago
parent
commit
af52874f54
  1. 14
      aspnet-core/Directory.Build.Lion.targets
  2. 6
      aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/appsettings.json
  3. 2697
      aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20241209110737_1.0.2.Designer.cs
  4. 404
      aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20241209110737_1.0.2.cs
  5. 30
      aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/AbpProDbContextModelSnapshot.cs

14
aspnet-core/Directory.Build.Lion.targets

@ -1,11 +1,11 @@
<Project>
<ItemGroup>
<PackageReference Update="Lion.AbpPro.CodeManagement.Domain" Version="f"/>
<PackageReference Update="Lion.AbpPro.CodeManagement.Domain.Shared" Version="0.1.1"/>
<PackageReference Update="Lion.AbpPro.CodeManagement.Application.Contracts" Version="0.1.1"/>
<PackageReference Update="Lion.AbpPro.CodeManagement.Application" Version="0.1.1"/>
<PackageReference Update="Lion.AbpPro.CodeManagement.HttpApi" Version="0.1.1"/>
<PackageReference Update="Lion.AbpPro.CodeManagement.HttpApi.Client" Version="0.1.1"/>
<PackageReference Update="Lion.AbpPro.CodeManagement.EntityFrameworkCore" Version="0.1.1"/>
<PackageReference Update="Lion.AbpPro.CodeManagement.Domain" Version="1.0.0"/>
<PackageReference Update="Lion.AbpPro.CodeManagement.Domain.Shared" Version="1.0.0"/>
<PackageReference Update="Lion.AbpPro.CodeManagement.Application.Contracts" Version="1.0.0"/>
<PackageReference Update="Lion.AbpPro.CodeManagement.Application" Version="1.0.0"/>
<PackageReference Update="Lion.AbpPro.CodeManagement.HttpApi" Version="1.0.0"/>
<PackageReference Update="Lion.AbpPro.CodeManagement.HttpApi.Client" Version="1.0.0"/>
<PackageReference Update="Lion.AbpPro.CodeManagement.EntityFrameworkCore" Version="1.0.0"/>
</ItemGroup>
</Project>

6
aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/appsettings.json

@ -34,7 +34,9 @@
"CorsOrigins": "https://*.AbpPro.com,http://localhost:4200,http://localhost:3100"
},
"ConnectionStrings": {
"Default": "Data Source=182.43.18.151;Port=3306;Database=abpvnextpro1;uid=root;pwd=IFKy!Cufe3V9sYcz;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true"
"Default": "Data Source=182.43.18.151;Port=3306;Database=abpvnextpro1;uid=root;pwd=IFKy!Cufe3V9sYcz;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true",
// 使default
"CodeManagement": "Data Source=182.43.18.151;Database=abpvnextpro1;uid=root;pwd=IFKy!Cufe3V9sYcz;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true"
},
"Hangfire": {
"Redis": {
@ -52,7 +54,7 @@
"ExpirationTime": 2
},
"Cap": {
"Enabled": true,
"Enabled": false,
"RabbitMq": {
"HostName": "182.43.18.151",
"UserName": "admin",

2697
aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20241209110737_1.0.2.Designer.cs

File diff suppressed because it is too large

404
aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20241209110737_1.0.2.cs

@ -0,0 +1,404 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Lion.AbpPro.Migrations
{
/// <inheritdoc />
public partial class _102 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_AbpEntityModelProperties_AbpEntityModels_EntityModelId",
table: "AbpEntityModelProperties");
migrationBuilder.DropForeignKey(
name: "FK_AbpEnumTypeProperty_AbpEnumType_EnumTypeId",
table: "AbpEnumTypeProperty");
migrationBuilder.DropForeignKey(
name: "FK_AbpTemplateDetails_AbpTemplates_TemplateId",
table: "AbpTemplateDetails");
migrationBuilder.DropPrimaryKey(
name: "PK_AbpTemplates",
table: "AbpTemplates");
migrationBuilder.DropPrimaryKey(
name: "PK_AbpTemplateDetails",
table: "AbpTemplateDetails");
migrationBuilder.DropPrimaryKey(
name: "PK_AbpProjects",
table: "AbpProjects");
migrationBuilder.DropPrimaryKey(
name: "PK_AbpEnumTypeProperty",
table: "AbpEnumTypeProperty");
migrationBuilder.DropPrimaryKey(
name: "PK_AbpEnumType",
table: "AbpEnumType");
migrationBuilder.DropPrimaryKey(
name: "PK_AbpEntityModels",
table: "AbpEntityModels");
migrationBuilder.DropPrimaryKey(
name: "PK_AbpEntityModelProperties",
table: "AbpEntityModelProperties");
migrationBuilder.DropPrimaryKey(
name: "PK_AbpDataType",
table: "AbpDataType");
migrationBuilder.DropColumn(
name: "Name",
table: "AbpProjects");
migrationBuilder.RenameTable(
name: "AbpTemplates",
newName: "AbpProTemplates");
migrationBuilder.RenameTable(
name: "AbpTemplateDetails",
newName: "AbpProTemplateDetails");
migrationBuilder.RenameTable(
name: "AbpProjects",
newName: "AbpProProjects");
migrationBuilder.RenameTable(
name: "AbpEnumTypeProperty",
newName: "AbpProEnumTypeProperty");
migrationBuilder.RenameTable(
name: "AbpEnumType",
newName: "AbpProEnumType");
migrationBuilder.RenameTable(
name: "AbpEntityModels",
newName: "AbpProEntityModels");
migrationBuilder.RenameTable(
name: "AbpEntityModelProperties",
newName: "AbpProEntityModelProperties");
migrationBuilder.RenameTable(
name: "AbpDataType",
newName: "AbpProDataType");
migrationBuilder.RenameIndex(
name: "IX_AbpTemplateDetails_TemplateId",
table: "AbpProTemplateDetails",
newName: "IX_AbpProTemplateDetails_TemplateId");
migrationBuilder.RenameIndex(
name: "IX_AbpEnumTypeProperty_EnumTypeId",
table: "AbpProEnumTypeProperty",
newName: "IX_AbpProEnumTypeProperty_EnumTypeId");
migrationBuilder.RenameIndex(
name: "IX_AbpEnumTypeProperty_Code",
table: "AbpProEnumTypeProperty",
newName: "IX_AbpProEnumTypeProperty_Code");
migrationBuilder.RenameIndex(
name: "IX_AbpEnumType_Code",
table: "AbpProEnumType",
newName: "IX_AbpProEnumType_Code");
migrationBuilder.RenameIndex(
name: "IX_AbpEntityModels_Code",
table: "AbpProEntityModels",
newName: "IX_AbpProEntityModels_Code");
migrationBuilder.RenameIndex(
name: "IX_AbpEntityModelProperties_EntityModelId",
table: "AbpProEntityModelProperties",
newName: "IX_AbpProEntityModelProperties_EntityModelId");
migrationBuilder.AddColumn<bool>(
name: "AllowAdd",
table: "AbpProEntityModelProperties",
type: "tinyint(1)",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "AllowEdit",
table: "AbpProEntityModelProperties",
type: "tinyint(1)",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "AllowSearch",
table: "AbpProEntityModelProperties",
type: "tinyint(1)",
nullable: false,
defaultValue: false);
migrationBuilder.AddPrimaryKey(
name: "PK_AbpProTemplates",
table: "AbpProTemplates",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_AbpProTemplateDetails",
table: "AbpProTemplateDetails",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_AbpProProjects",
table: "AbpProProjects",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_AbpProEnumTypeProperty",
table: "AbpProEnumTypeProperty",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_AbpProEnumType",
table: "AbpProEnumType",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_AbpProEntityModels",
table: "AbpProEntityModels",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_AbpProEntityModelProperties",
table: "AbpProEntityModelProperties",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_AbpProDataType",
table: "AbpProDataType",
column: "Id");
migrationBuilder.AddForeignKey(
name: "FK_AbpProEntityModelProperties_AbpProEntityModels_EntityModelId",
table: "AbpProEntityModelProperties",
column: "EntityModelId",
principalTable: "AbpProEntityModels",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_AbpProEnumTypeProperty_AbpProEnumType_EnumTypeId",
table: "AbpProEnumTypeProperty",
column: "EnumTypeId",
principalTable: "AbpProEnumType",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_AbpProTemplateDetails_AbpProTemplates_TemplateId",
table: "AbpProTemplateDetails",
column: "TemplateId",
principalTable: "AbpProTemplates",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_AbpProEntityModelProperties_AbpProEntityModels_EntityModelId",
table: "AbpProEntityModelProperties");
migrationBuilder.DropForeignKey(
name: "FK_AbpProEnumTypeProperty_AbpProEnumType_EnumTypeId",
table: "AbpProEnumTypeProperty");
migrationBuilder.DropForeignKey(
name: "FK_AbpProTemplateDetails_AbpProTemplates_TemplateId",
table: "AbpProTemplateDetails");
migrationBuilder.DropPrimaryKey(
name: "PK_AbpProTemplates",
table: "AbpProTemplates");
migrationBuilder.DropPrimaryKey(
name: "PK_AbpProTemplateDetails",
table: "AbpProTemplateDetails");
migrationBuilder.DropPrimaryKey(
name: "PK_AbpProProjects",
table: "AbpProProjects");
migrationBuilder.DropPrimaryKey(
name: "PK_AbpProEnumTypeProperty",
table: "AbpProEnumTypeProperty");
migrationBuilder.DropPrimaryKey(
name: "PK_AbpProEnumType",
table: "AbpProEnumType");
migrationBuilder.DropPrimaryKey(
name: "PK_AbpProEntityModels",
table: "AbpProEntityModels");
migrationBuilder.DropPrimaryKey(
name: "PK_AbpProEntityModelProperties",
table: "AbpProEntityModelProperties");
migrationBuilder.DropPrimaryKey(
name: "PK_AbpProDataType",
table: "AbpProDataType");
migrationBuilder.DropColumn(
name: "AllowAdd",
table: "AbpProEntityModelProperties");
migrationBuilder.DropColumn(
name: "AllowEdit",
table: "AbpProEntityModelProperties");
migrationBuilder.DropColumn(
name: "AllowSearch",
table: "AbpProEntityModelProperties");
migrationBuilder.RenameTable(
name: "AbpProTemplates",
newName: "AbpTemplates");
migrationBuilder.RenameTable(
name: "AbpProTemplateDetails",
newName: "AbpTemplateDetails");
migrationBuilder.RenameTable(
name: "AbpProProjects",
newName: "AbpProjects");
migrationBuilder.RenameTable(
name: "AbpProEnumTypeProperty",
newName: "AbpEnumTypeProperty");
migrationBuilder.RenameTable(
name: "AbpProEnumType",
newName: "AbpEnumType");
migrationBuilder.RenameTable(
name: "AbpProEntityModels",
newName: "AbpEntityModels");
migrationBuilder.RenameTable(
name: "AbpProEntityModelProperties",
newName: "AbpEntityModelProperties");
migrationBuilder.RenameTable(
name: "AbpProDataType",
newName: "AbpDataType");
migrationBuilder.RenameIndex(
name: "IX_AbpProTemplateDetails_TemplateId",
table: "AbpTemplateDetails",
newName: "IX_AbpTemplateDetails_TemplateId");
migrationBuilder.RenameIndex(
name: "IX_AbpProEnumTypeProperty_EnumTypeId",
table: "AbpEnumTypeProperty",
newName: "IX_AbpEnumTypeProperty_EnumTypeId");
migrationBuilder.RenameIndex(
name: "IX_AbpProEnumTypeProperty_Code",
table: "AbpEnumTypeProperty",
newName: "IX_AbpEnumTypeProperty_Code");
migrationBuilder.RenameIndex(
name: "IX_AbpProEnumType_Code",
table: "AbpEnumType",
newName: "IX_AbpEnumType_Code");
migrationBuilder.RenameIndex(
name: "IX_AbpProEntityModels_Code",
table: "AbpEntityModels",
newName: "IX_AbpEntityModels_Code");
migrationBuilder.RenameIndex(
name: "IX_AbpProEntityModelProperties_EntityModelId",
table: "AbpEntityModelProperties",
newName: "IX_AbpEntityModelProperties_EntityModelId");
migrationBuilder.AddColumn<string>(
name: "Name",
table: "AbpProjects",
type: "varchar(128)",
maxLength: 128,
nullable: false,
defaultValue: "")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddPrimaryKey(
name: "PK_AbpTemplates",
table: "AbpTemplates",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_AbpTemplateDetails",
table: "AbpTemplateDetails",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_AbpProjects",
table: "AbpProjects",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_AbpEnumTypeProperty",
table: "AbpEnumTypeProperty",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_AbpEnumType",
table: "AbpEnumType",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_AbpEntityModels",
table: "AbpEntityModels",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_AbpEntityModelProperties",
table: "AbpEntityModelProperties",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_AbpDataType",
table: "AbpDataType",
column: "Id");
migrationBuilder.AddForeignKey(
name: "FK_AbpEntityModelProperties_AbpEntityModels_EntityModelId",
table: "AbpEntityModelProperties",
column: "EntityModelId",
principalTable: "AbpEntityModels",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_AbpEnumTypeProperty_AbpEnumType_EnumTypeId",
table: "AbpEnumTypeProperty",
column: "EnumTypeId",
principalTable: "AbpEnumType",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_AbpTemplateDetails_AbpTemplates_TemplateId",
table: "AbpTemplateDetails",
column: "TemplateId",
principalTable: "AbpTemplates",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
}
}
}

30
aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/AbpProDbContextModelSnapshot.cs

@ -83,7 +83,7 @@ namespace Lion.AbpPro.Migrations
b.HasKey("Id");
b.ToTable("AbpDataType", (string)null);
b.ToTable("AbpProDataType", (string)null);
});
modelBuilder.Entity("Lion.AbpPro.CodeManagement.EntityModels.Aggregates.EntityModel", b =>
@ -163,7 +163,7 @@ namespace Lion.AbpPro.Migrations
b.HasIndex("Code");
b.ToTable("AbpEntityModels", (string)null);
b.ToTable("AbpProEntityModels", (string)null);
});
modelBuilder.Entity("Lion.AbpPro.CodeManagement.EntityModels.Aggregates.EntityModelProperty", b =>
@ -171,6 +171,15 @@ namespace Lion.AbpPro.Migrations
b.Property<Guid>("Id")
.HasColumnType("char(36)");
b.Property<bool>("AllowAdd")
.HasColumnType("tinyint(1)");
b.Property<bool>("AllowEdit")
.HasColumnType("tinyint(1)");
b.Property<bool>("AllowSearch")
.HasColumnType("tinyint(1)");
b.Property<string>("Code")
.IsRequired()
.HasMaxLength(128)
@ -239,7 +248,7 @@ namespace Lion.AbpPro.Migrations
b.HasIndex("EntityModelId");
b.ToTable("AbpEntityModelProperties", (string)null);
b.ToTable("AbpProEntityModelProperties", (string)null);
});
modelBuilder.Entity("Lion.AbpPro.CodeManagement.EnumTypes.Aggregates.EnumType", b =>
@ -312,7 +321,7 @@ namespace Lion.AbpPro.Migrations
b.HasIndex("Code");
b.ToTable("AbpEnumType", (string)null);
b.ToTable("AbpProEnumType", (string)null);
});
modelBuilder.Entity("Lion.AbpPro.CodeManagement.EnumTypes.Aggregates.EnumTypeProperty", b =>
@ -371,7 +380,7 @@ namespace Lion.AbpPro.Migrations
b.HasIndex("EnumTypeId");
b.ToTable("AbpEnumTypeProperty", (string)null);
b.ToTable("AbpProEnumTypeProperty", (string)null);
});
modelBuilder.Entity("Lion.AbpPro.CodeManagement.Projects.Aggregates.Project", b =>
@ -426,11 +435,6 @@ namespace Lion.AbpPro.Migrations
.HasColumnType("char(36)")
.HasColumnName("LastModifierId");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("varchar(128)");
b.Property<string>("NameSpace")
.IsRequired()
.HasMaxLength(128)
@ -455,7 +459,7 @@ namespace Lion.AbpPro.Migrations
b.HasKey("Id");
b.ToTable("AbpProjects", (string)null);
b.ToTable("AbpProProjects", (string)null);
});
modelBuilder.Entity("Lion.AbpPro.CodeManagement.Templates.Aggregates.Template", b =>
@ -520,7 +524,7 @@ namespace Lion.AbpPro.Migrations
b.HasKey("Id");
b.ToTable("AbpTemplates", (string)null);
b.ToTable("AbpProTemplates", (string)null);
});
modelBuilder.Entity("Lion.AbpPro.CodeManagement.Templates.Aggregates.TemplateDetail", b =>
@ -587,7 +591,7 @@ namespace Lion.AbpPro.Migrations
b.HasIndex("TemplateId");
b.ToTable("AbpTemplateDetails", (string)null);
b.ToTable("AbpProTemplateDetails", (string)null);
});
modelBuilder.Entity("Lion.AbpPro.DataDictionaryManagement.DataDictionaries.Aggregates.DataDictionary", b =>

Loading…
Cancel
Save