Browse Source

feat: 添加代码生成器示例

example
Hanpaopao 1 year ago
parent
commit
f8b349fffd
  1. 14
      aspnet-core/Directory.Build.Lion.targets
  2. 2
      aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Permissions/AbpProPermissionDefinitionProvider.cs
  3. 2
      aspnet-core/services/src/Lion.AbpPro.Application/AbpProAppService.cs
  4. 4
      aspnet-core/services/src/Lion.AbpPro.Application/AbpProApplicationAutoMapperProfile.cs
  5. 1
      aspnet-core/services/src/Lion.AbpPro.Domain.Shared/AbpProDomainSharedModule.cs
  6. 1
      aspnet-core/services/src/Lion.AbpPro.Domain.Shared/Features/AbpProFeatureDefinitionProvider.cs
  7. 2
      aspnet-core/services/src/Lion.AbpPro.Domain.Shared/Localization/AbpProResource.cs
  8. 12
      aspnet-core/services/src/Lion.AbpPro.Domain/AbpProDomainAutoMapperProfile.cs
  9. 2
      aspnet-core/services/src/Lion.AbpPro.Domain/Settings/AbpProSettingDefinitionProvider.cs
  10. 6
      aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/AbpProDbContext.cs
  11. 23
      aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/AbpProDbContextModelCreatingExtensions.cs
  12. 6
      aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/IAbpProDbContext.cs
  13. 2085
      aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20240914065939_1.0.0.Designer.cs
  14. 1376
      aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20240914065939_1.0.0.cs
  15. 2693
      aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20241130141811_1.0.1.Designer.cs
  16. 329
      aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20241130141811_1.0.1.cs
  17. 2697
      aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20241209110737_1.0.2.Designer.cs
  18. 404
      aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20241209110737_1.0.2.cs
  19. 2694
      aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/AbpProDbContextModelSnapshot.cs
  20. 1
      aspnet-core/services/src/Lion.AbpPro.HttpApi/AbpProHttpApiModule.cs
  21. 2
      aspnet-core/services/src/Lion.AbpPro.HttpApi/Controllers/AbpProController.cs

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

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

2
aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Permissions/AbpProPermissionDefinitionProvider.cs

@ -1,3 +1,5 @@
using Lion.AbpPro.Localization;
namespace Lion.AbpPro.Permissions
{
public class AbpProPermissionDefinitionProvider : PermissionDefinitionProvider

2
aspnet-core/services/src/Lion.AbpPro.Application/AbpProAppService.cs

@ -1,3 +1,5 @@
using Lion.AbpPro.Localization;
namespace Lion.AbpPro
{
/* Inherit your application services from this class.

4
aspnet-core/services/src/Lion.AbpPro.Application/AbpProApplicationAutoMapperProfile.cs

@ -1,10 +1,12 @@
using Lion.AbpPro.Books;
namespace Lion.AbpPro
{
public class AbpProApplicationAutoMapperProfile : Profile
{
public AbpProApplicationAutoMapperProfile()
{
CreateMap<BookDto, PageBookOutput>();
}
}
}

1
aspnet-core/services/src/Lion.AbpPro.Domain.Shared/AbpProDomainSharedModule.cs

@ -3,6 +3,7 @@ using Lion.AbpPro.BasicManagement.Localization;
using Lion.AbpPro.CodeManagement;
using Lion.AbpPro.Core;
using Lion.AbpPro.LanguageManagement;
using Lion.AbpPro.Localization;
namespace Lion.AbpPro
{

1
aspnet-core/services/src/Lion.AbpPro.Domain.Shared/Features/AbpProFeatureDefinitionProvider.cs

@ -1,3 +1,4 @@
using Lion.AbpPro.Localization;
using Volo.Abp.Features;
using Volo.Abp.Validation.StringValues;

2
aspnet-core/services/src/Lion.AbpPro.Domain.Shared/Localization/AbpProResource.cs

@ -1,4 +1,4 @@
namespace Lion.AbpPro
namespace Lion.AbpPro.Localization
{
[LocalizationResourceName("AbpPro")]
public class AbpProResource

12
aspnet-core/services/src/Lion.AbpPro.Domain/AbpProDomainAutoMapperProfile.cs

@ -0,0 +1,12 @@
using AutoMapper;
using Lion.AbpPro.Books;
namespace Lion.AbpPro;
public class AbpProDomainAutoMapperProfile: Profile
{
public AbpProDomainAutoMapperProfile()
{
CreateMap<Book, BookDto>();
}
}

2
aspnet-core/services/src/Lion.AbpPro.Domain/Settings/AbpProSettingDefinitionProvider.cs

@ -1,3 +1,5 @@
using Lion.AbpPro.Localization;
namespace Lion.AbpPro.Settings
{
public class AbpProSettingDefinitionProvider : SettingDefinitionProvider

6
aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/AbpProDbContext.cs

@ -1,3 +1,4 @@
using Lion.AbpPro.Books;
using Lion.AbpPro.CodeManagement.DataTypes.Aggregates;
using Lion.AbpPro.CodeManagement.EntityFrameworkCore;
using Lion.AbpPro.CodeManagement.EntityModels.Aggregates;
@ -62,6 +63,8 @@ namespace Lion.AbpPro.EntityFrameworkCore
public DbSet<DataType> DataTypes { get; set; }
public DbSet<EnumType> EnumTypes { get; set; }
public DbSet<Book> Books { get; set; }
public AbpProDbContext(DbContextOptions<AbpProDbContext> options)
: base(options)
{
@ -99,6 +102,7 @@ namespace Lion.AbpPro.EntityFrameworkCore
builder.ConfigureCodeManagement();
}
}
}

23
aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/AbpProDbContextModelCreatingExtensions.cs

@ -1,3 +1,6 @@
using Humanizer;
using Lion.AbpPro.Books;
namespace Lion.AbpPro.EntityFrameworkCore
{
public static class AbpProDbContextModelCreatingExtensions
@ -5,15 +8,17 @@ namespace Lion.AbpPro.EntityFrameworkCore
public static void ConfigureAbpPro(this ModelBuilder builder)
{
Check.NotNull(builder, nameof(builder));
/* Configure your own tables/entities inside here */
//builder.Entity<YourEntity>(b =>
//{
// b.ToTable(AbpProConsts.DbTablePrefix + "YourEntities", AbpProConsts.DbSchema);
// b.ConfigureByConvention(); //auto configure for the base class props
// //...
//});
builder.Entity<Book>(b =>
{
b.ToTable(AbpProConsts.DbTablePrefix + nameof(Book).Pluralize());
b.Property(e => e.No).IsRequired().HasMaxLength(128).HasComment("编号");
b.Property(e => e.Name).IsRequired().HasMaxLength(128).HasComment("名称");
b.Property(e => e.Price).IsRequired().HasPrecision(6,2).HasComment("价格");
b.Property(e => e.Remark).HasComment("备注");
b.Property(e => e.BookType).HasComment("类型");
b.ConfigureByConvention();
});
}
}
}

6
aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/IAbpProDbContext.cs

@ -1,8 +1,10 @@
using Lion.AbpPro.Books;
namespace Lion.AbpPro.EntityFrameworkCore
{
[ConnectionStringName("Default")]
public interface IAbpProDbContext : IEfCoreDbContext
{
DbSet<Book> Books { get; set; }
}
}
}

2085
aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20240914065939_1.0.0.Designer.cs

File diff suppressed because it is too large

1376
aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20240914065939_1.0.0.cs

File diff suppressed because it is too large

2693
aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20241130141811_1.0.1.Designer.cs

File diff suppressed because it is too large

329
aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20241130141811_1.0.1.cs

@ -1,329 +0,0 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Lion.AbpPro.Migrations
{
/// <inheritdoc />
public partial class _101 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "AbpDataType",
columns: table => new
{
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
Code = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Description = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
ExtraProperties = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false),
CreatorId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
LastModificationTime = table.Column<DateTime>(type: "datetime(6)", nullable: true),
LastModifierId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
DeletionTime = table.Column<DateTime>(type: "datetime(6)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpDataType", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "AbpEntityModels",
columns: table => new
{
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
TenantId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
ProjectId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
Code = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Description = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
RelationalType = table.Column<int>(type: "int", nullable: true),
ParentId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
AggregateId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
ExtraProperties = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false),
CreatorId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
LastModificationTime = table.Column<DateTime>(type: "datetime(6)", nullable: true),
LastModifierId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
DeletionTime = table.Column<DateTime>(type: "datetime(6)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpEntityModels", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "AbpEnumType",
columns: table => new
{
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
TenantId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
Code = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Description = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
EntityModelId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
ProjectId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
ExtraProperties = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false),
CreatorId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
LastModificationTime = table.Column<DateTime>(type: "datetime(6)", nullable: true),
LastModifierId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
DeletionTime = table.Column<DateTime>(type: "datetime(6)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpEnumType", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "AbpProjects",
columns: table => new
{
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
TenantId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
Name = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Owner = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
NameSpace = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Remark = table.Column<string>(type: "varchar(512)", maxLength: 512, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
CompanyName = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
ProjectName = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
ExtraProperties = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false),
CreatorId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
LastModificationTime = table.Column<DateTime>(type: "datetime(6)", nullable: true),
LastModifierId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
DeletionTime = table.Column<DateTime>(type: "datetime(6)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpProjects", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "AbpTemplates",
columns: table => new
{
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
TenantId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
Name = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Remark = table.Column<string>(type: "varchar(512)", maxLength: 512, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
ExtraProperties = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false),
CreatorId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
LastModificationTime = table.Column<DateTime>(type: "datetime(6)", nullable: true),
LastModifierId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
DeletionTime = table.Column<DateTime>(type: "datetime(6)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpTemplates", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "AbpEntityModelProperties",
columns: table => new
{
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
Code = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Description = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
IsRequired = table.Column<bool>(type: "tinyint(1)", nullable: false),
MaxLength = table.Column<int>(type: "int", nullable: true),
MinLength = table.Column<int>(type: "int", nullable: true),
DecimalPrecision = table.Column<int>(type: "int", nullable: true),
DecimalScale = table.Column<int>(type: "int", nullable: true),
EnumTypeId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
DataTypeId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
EntityModelId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false),
CreatorId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
LastModificationTime = table.Column<DateTime>(type: "datetime(6)", nullable: true),
LastModifierId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
DeletionTime = table.Column<DateTime>(type: "datetime(6)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpEntityModelProperties", x => x.Id);
table.ForeignKey(
name: "FK_AbpEntityModelProperties_AbpEntityModels_EntityModelId",
column: x => x.EntityModelId,
principalTable: "AbpEntityModels",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "AbpEnumTypeProperty",
columns: table => new
{
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
EnumTypeId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
Code = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Value = table.Column<int>(type: "int", nullable: false),
Description = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false),
CreatorId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
LastModificationTime = table.Column<DateTime>(type: "datetime(6)", nullable: true),
LastModifierId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
DeletionTime = table.Column<DateTime>(type: "datetime(6)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpEnumTypeProperty", x => x.Id);
table.ForeignKey(
name: "FK_AbpEnumTypeProperty_AbpEnumType_EnumTypeId",
column: x => x.EnumTypeId,
principalTable: "AbpEnumType",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "AbpTemplateDetails",
columns: table => new
{
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
TemplateId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
TemplateType = table.Column<int>(type: "int", nullable: false),
ControlType = table.Column<int>(type: "int", nullable: true),
ParentId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
Name = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Description = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Content = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false),
CreatorId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
LastModificationTime = table.Column<DateTime>(type: "datetime(6)", nullable: true),
LastModifierId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
DeletionTime = table.Column<DateTime>(type: "datetime(6)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpTemplateDetails", x => x.Id);
table.ForeignKey(
name: "FK_AbpTemplateDetails_AbpTemplates_TemplateId",
column: x => x.TemplateId,
principalTable: "AbpTemplates",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateIndex(
name: "IX_AbpEntityModelProperties_EntityModelId",
table: "AbpEntityModelProperties",
column: "EntityModelId");
migrationBuilder.CreateIndex(
name: "IX_AbpEntityModels_Code",
table: "AbpEntityModels",
column: "Code");
migrationBuilder.CreateIndex(
name: "IX_AbpEnumType_Code",
table: "AbpEnumType",
column: "Code");
migrationBuilder.CreateIndex(
name: "IX_AbpEnumTypeProperty_Code",
table: "AbpEnumTypeProperty",
column: "Code");
migrationBuilder.CreateIndex(
name: "IX_AbpEnumTypeProperty_EnumTypeId",
table: "AbpEnumTypeProperty",
column: "EnumTypeId");
migrationBuilder.CreateIndex(
name: "IX_AbpTemplateDetails_TemplateId",
table: "AbpTemplateDetails",
column: "TemplateId");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "AbpDataType");
migrationBuilder.DropTable(
name: "AbpEntityModelProperties");
migrationBuilder.DropTable(
name: "AbpEnumTypeProperty");
migrationBuilder.DropTable(
name: "AbpProjects");
migrationBuilder.DropTable(
name: "AbpTemplateDetails");
migrationBuilder.DropTable(
name: "AbpEntityModels");
migrationBuilder.DropTable(
name: "AbpEnumType");
migrationBuilder.DropTable(
name: "AbpTemplates");
}
}
}

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

@ -1,404 +0,0 @@
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);
}
}
}

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

File diff suppressed because it is too large

1
aspnet-core/services/src/Lion.AbpPro.HttpApi/AbpProHttpApiModule.cs

@ -1,6 +1,7 @@
using Lion.AbpPro.BasicManagement;
using Lion.AbpPro.CodeManagement;
using Lion.AbpPro.LanguageManagement;
using Lion.AbpPro.Localization;
namespace Lion.AbpPro
{

2
aspnet-core/services/src/Lion.AbpPro.HttpApi/Controllers/AbpProController.cs

@ -1,3 +1,5 @@
using Lion.AbpPro.Localization;
namespace Lion.AbpPro.Controllers
{
/* Inherit your controllers from this class.

Loading…
Cancel
Save