This commit is contained in:
maliming 2020-10-21 21:45:20 +08:00
Родитель 8f8a98167e
Коммит ca6bea9ebf
9 изменённых файлов: 410 добавлений и 28 удалений

Просмотреть файл

@ -15,8 +15,8 @@
<EmbeddedResource Include="Localization\SourceFiles\*.xml" Exclude="bin\**;obj\**;**\*.xproj;packages\**;@(EmbeddedResource)" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Abp.AutoMapper" Version="5.2.0" />
<PackageReference Include="Abp.ZeroCore.EntityFrameworkCore" Version="5.2.0" />
<PackageReference Include="Castle.Windsor.MsDependencyInjection" Version="3.3.1" />
<PackageReference Include="Abp.AutoMapper" Version="5.14.0" />
<PackageReference Include="Abp.ZeroCore.EntityFrameworkCore" Version="5.14.0" />
<PackageReference Include="Castle.Windsor.MsDependencyInjection" Version="3.4.0" />
</ItemGroup>
</Project>

Просмотреть файл

@ -8,17 +8,12 @@
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
</PropertyGroup>
<ItemGroup>
<Compile Remove="Migrations\20180726102624_Upgrade_ABP_380.cs" />
<Compile Remove="Migrations\20180927062408_test.cs" />
<Compile Remove="Migrations\20190111071724_Upgraded_To_Abp_v4_1_0.cs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.1.0">
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.9" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.1.9">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.1.0">
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.1.9">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>

Просмотреть файл

@ -10,14 +10,14 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace AbpODataDemo.Migrations
{
[DbContext(typeof(AbpODataDemoDbContext))]
[Migration("20201015053907_Initial")]
[Migration("20201021134318_Initial")]
partial class Initial
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "3.1.1")
.HasAnnotation("ProductVersion", "3.1.9")
.HasAnnotation("Relational:MaxIdentifierLength", 128)
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
@ -613,6 +613,112 @@ namespace AbpODataDemo.Migrations
b.ToTable("AbpSettings");
});
modelBuilder.Entity("Abp.DynamicEntityProperties.DynamicEntityProperty", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
b.Property<int>("DynamicPropertyId")
.HasColumnType("int");
b.Property<string>("EntityFullName")
.HasColumnType("nvarchar(450)");
b.Property<int?>("TenantId")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("DynamicPropertyId");
b.HasIndex("EntityFullName", "DynamicPropertyId", "TenantId")
.IsUnique()
.HasFilter("[EntityFullName] IS NOT NULL AND [TenantId] IS NOT NULL");
b.ToTable("AbpDynamicEntityProperties");
});
modelBuilder.Entity("Abp.DynamicEntityProperties.DynamicEntityPropertyValue", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
b.Property<int>("DynamicEntityPropertyId")
.HasColumnType("int");
b.Property<string>("EntityId")
.HasColumnType("nvarchar(max)");
b.Property<int?>("TenantId")
.HasColumnType("int");
b.Property<string>("Value")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.HasIndex("DynamicEntityPropertyId");
b.ToTable("AbpDynamicEntityPropertyValues");
});
modelBuilder.Entity("Abp.DynamicEntityProperties.DynamicProperty", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
b.Property<string>("InputType")
.HasColumnType("nvarchar(max)");
b.Property<string>("Permission")
.HasColumnType("nvarchar(max)");
b.Property<string>("PropertyName")
.HasColumnType("nvarchar(450)");
b.Property<int?>("TenantId")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("PropertyName", "TenantId")
.IsUnique()
.HasFilter("[PropertyName] IS NOT NULL AND [TenantId] IS NOT NULL");
b.ToTable("AbpDynamicProperties");
});
modelBuilder.Entity("Abp.DynamicEntityProperties.DynamicPropertyValue", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
b.Property<int>("DynamicPropertyId")
.HasColumnType("int");
b.Property<int?>("TenantId")
.HasColumnType("int");
b.Property<string>("Value")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.HasIndex("DynamicPropertyId");
b.ToTable("AbpDynamicPropertyValues");
});
modelBuilder.Entity("Abp.EntityHistory.EntityChange", b =>
{
b.Property<long>("Id")
@ -1645,6 +1751,33 @@ namespace AbpODataDemo.Migrations
.HasForeignKey("UserId");
});
modelBuilder.Entity("Abp.DynamicEntityProperties.DynamicEntityProperty", b =>
{
b.HasOne("Abp.DynamicEntityProperties.DynamicProperty", "DynamicProperty")
.WithMany()
.HasForeignKey("DynamicPropertyId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Abp.DynamicEntityProperties.DynamicEntityPropertyValue", b =>
{
b.HasOne("Abp.DynamicEntityProperties.DynamicEntityProperty", "DynamicEntityProperty")
.WithMany()
.HasForeignKey("DynamicEntityPropertyId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Abp.DynamicEntityProperties.DynamicPropertyValue", b =>
{
b.HasOne("Abp.DynamicEntityProperties.DynamicProperty", "DynamicProperty")
.WithMany("DynamicPropertyValues")
.HasForeignKey("DynamicPropertyId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Abp.EntityHistory.EntityChange", b =>
{
b.HasOne("Abp.EntityHistory.EntityChangeSet", null)

Просмотреть файл

@ -55,6 +55,22 @@ namespace AbpODataDemo.Migrations
table.PrimaryKey("PK_AbpBackgroundJobs", x => x.Id);
});
migrationBuilder.CreateTable(
name: "AbpDynamicProperties",
columns: table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
PropertyName = table.Column<string>(nullable: true),
InputType = table.Column<string>(nullable: true),
Permission = table.Column<string>(nullable: true),
TenantId = table.Column<int>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpDynamicProperties", x => x.Id);
});
migrationBuilder.CreateTable(
name: "AbpEditions",
columns: table => new
@ -446,6 +462,48 @@ namespace AbpODataDemo.Migrations
table.PrimaryKey("PK_Persons", x => x.Id);
});
migrationBuilder.CreateTable(
name: "AbpDynamicEntityProperties",
columns: table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
EntityFullName = table.Column<string>(nullable: true),
DynamicPropertyId = table.Column<int>(nullable: false),
TenantId = table.Column<int>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpDynamicEntityProperties", x => x.Id);
table.ForeignKey(
name: "FK_AbpDynamicEntityProperties_AbpDynamicProperties_DynamicPropertyId",
column: x => x.DynamicPropertyId,
principalTable: "AbpDynamicProperties",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "AbpDynamicPropertyValues",
columns: table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Value = table.Column<string>(nullable: false),
TenantId = table.Column<int>(nullable: true),
DynamicPropertyId = table.Column<int>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpDynamicPropertyValues", x => x.Id);
table.ForeignKey(
name: "FK_AbpDynamicPropertyValues_AbpDynamicProperties_DynamicPropertyId",
column: x => x.DynamicPropertyId,
principalTable: "AbpDynamicProperties",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "AbpFeatures",
columns: table => new
@ -754,6 +812,28 @@ namespace AbpODataDemo.Migrations
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "AbpDynamicEntityPropertyValues",
columns: table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Value = table.Column<string>(nullable: false),
EntityId = table.Column<string>(nullable: true),
DynamicEntityPropertyId = table.Column<int>(nullable: false),
TenantId = table.Column<int>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpDynamicEntityPropertyValues", x => x.Id);
table.ForeignKey(
name: "FK_AbpDynamicEntityPropertyValues_AbpDynamicEntityProperties_DynamicEntityPropertyId",
column: x => x.DynamicEntityPropertyId,
principalTable: "AbpDynamicEntityProperties",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "AbpEntityPropertyChanges",
columns: table => new
@ -854,6 +934,35 @@ namespace AbpODataDemo.Migrations
table: "AbpBackgroundJobs",
columns: new[] { "IsAbandoned", "NextTryTime" });
migrationBuilder.CreateIndex(
name: "IX_AbpDynamicEntityProperties_DynamicPropertyId",
table: "AbpDynamicEntityProperties",
column: "DynamicPropertyId");
migrationBuilder.CreateIndex(
name: "IX_AbpDynamicEntityProperties_EntityFullName_DynamicPropertyId_TenantId",
table: "AbpDynamicEntityProperties",
columns: new[] { "EntityFullName", "DynamicPropertyId", "TenantId" },
unique: true,
filter: "[EntityFullName] IS NOT NULL AND [TenantId] IS NOT NULL");
migrationBuilder.CreateIndex(
name: "IX_AbpDynamicEntityPropertyValues_DynamicEntityPropertyId",
table: "AbpDynamicEntityPropertyValues",
column: "DynamicEntityPropertyId");
migrationBuilder.CreateIndex(
name: "IX_AbpDynamicProperties_PropertyName_TenantId",
table: "AbpDynamicProperties",
columns: new[] { "PropertyName", "TenantId" },
unique: true,
filter: "[PropertyName] IS NOT NULL AND [TenantId] IS NOT NULL");
migrationBuilder.CreateIndex(
name: "IX_AbpDynamicPropertyValues_DynamicPropertyId",
table: "AbpDynamicPropertyValues",
column: "DynamicPropertyId");
migrationBuilder.CreateIndex(
name: "IX_AbpEntityChanges_EntityChangeSetId",
table: "AbpEntityChanges",
@ -1164,6 +1273,12 @@ namespace AbpODataDemo.Migrations
migrationBuilder.DropTable(
name: "AbpBackgroundJobs");
migrationBuilder.DropTable(
name: "AbpDynamicEntityPropertyValues");
migrationBuilder.DropTable(
name: "AbpDynamicPropertyValues");
migrationBuilder.DropTable(
name: "AbpEntityPropertyChanges");
@ -1236,6 +1351,9 @@ namespace AbpODataDemo.Migrations
migrationBuilder.DropTable(
name: "Phones");
migrationBuilder.DropTable(
name: "AbpDynamicEntityProperties");
migrationBuilder.DropTable(
name: "AbpEntityChanges");
@ -1251,6 +1369,9 @@ namespace AbpODataDemo.Migrations
migrationBuilder.DropTable(
name: "Persons");
migrationBuilder.DropTable(
name: "AbpDynamicProperties");
migrationBuilder.DropTable(
name: "AbpEntityChangeSets");

Просмотреть файл

@ -15,7 +15,7 @@ namespace AbpODataDemo.Migrations
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "3.1.1")
.HasAnnotation("ProductVersion", "3.1.9")
.HasAnnotation("Relational:MaxIdentifierLength", 128)
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
@ -611,6 +611,112 @@ namespace AbpODataDemo.Migrations
b.ToTable("AbpSettings");
});
modelBuilder.Entity("Abp.DynamicEntityProperties.DynamicEntityProperty", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
b.Property<int>("DynamicPropertyId")
.HasColumnType("int");
b.Property<string>("EntityFullName")
.HasColumnType("nvarchar(450)");
b.Property<int?>("TenantId")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("DynamicPropertyId");
b.HasIndex("EntityFullName", "DynamicPropertyId", "TenantId")
.IsUnique()
.HasFilter("[EntityFullName] IS NOT NULL AND [TenantId] IS NOT NULL");
b.ToTable("AbpDynamicEntityProperties");
});
modelBuilder.Entity("Abp.DynamicEntityProperties.DynamicEntityPropertyValue", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
b.Property<int>("DynamicEntityPropertyId")
.HasColumnType("int");
b.Property<string>("EntityId")
.HasColumnType("nvarchar(max)");
b.Property<int?>("TenantId")
.HasColumnType("int");
b.Property<string>("Value")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.HasIndex("DynamicEntityPropertyId");
b.ToTable("AbpDynamicEntityPropertyValues");
});
modelBuilder.Entity("Abp.DynamicEntityProperties.DynamicProperty", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
b.Property<string>("InputType")
.HasColumnType("nvarchar(max)");
b.Property<string>("Permission")
.HasColumnType("nvarchar(max)");
b.Property<string>("PropertyName")
.HasColumnType("nvarchar(450)");
b.Property<int?>("TenantId")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("PropertyName", "TenantId")
.IsUnique()
.HasFilter("[PropertyName] IS NOT NULL AND [TenantId] IS NOT NULL");
b.ToTable("AbpDynamicProperties");
});
modelBuilder.Entity("Abp.DynamicEntityProperties.DynamicPropertyValue", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
b.Property<int>("DynamicPropertyId")
.HasColumnType("int");
b.Property<int?>("TenantId")
.HasColumnType("int");
b.Property<string>("Value")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.HasIndex("DynamicPropertyId");
b.ToTable("AbpDynamicPropertyValues");
});
modelBuilder.Entity("Abp.EntityHistory.EntityChange", b =>
{
b.Property<long>("Id")
@ -1643,6 +1749,33 @@ namespace AbpODataDemo.Migrations
.HasForeignKey("UserId");
});
modelBuilder.Entity("Abp.DynamicEntityProperties.DynamicEntityProperty", b =>
{
b.HasOne("Abp.DynamicEntityProperties.DynamicProperty", "DynamicProperty")
.WithMany()
.HasForeignKey("DynamicPropertyId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Abp.DynamicEntityProperties.DynamicEntityPropertyValue", b =>
{
b.HasOne("Abp.DynamicEntityProperties.DynamicEntityProperty", "DynamicEntityProperty")
.WithMany()
.HasForeignKey("DynamicEntityPropertyId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Abp.DynamicEntityProperties.DynamicPropertyValue", b =>
{
b.HasOne("Abp.DynamicEntityProperties.DynamicProperty", "DynamicProperty")
.WithMany("DynamicPropertyValues")
.HasForeignKey("DynamicPropertyId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Abp.EntityHistory.EntityChange", b =>
{
b.HasOne("Abp.EntityHistory.EntityChangeSet", null)

Просмотреть файл

@ -15,7 +15,7 @@
</None>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Abp.Castle.Log4Net" Version="5.2.0" />
<PackageReference Include="Abp.Castle.Log4Net" Version="5.14.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\AbpODataDemo.Core\AbpODataDemo.Core.csproj" />

Просмотреть файл

@ -22,10 +22,10 @@
<ProjectReference Include="..\AbpODataDemo.EntityFrameworkCore\AbpODataDemo.EntityFrameworkCore.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="3.1.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.0.0-rc4" />
<PackageReference Include="Abp.ZeroCore" Version="5.2.0" />
<PackageReference Include="Abp.AspNetCore.SignalR" Version="5.2.0" />
<ProjectReference Include="D:\Github\volo\aspnetboilerplate\src\Abp.AspNetCore.OData\Abp.AspNetCore.OData.csproj" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="3.1.9" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.6.3" />
<PackageReference Include="Abp.ZeroCore" Version="5.14.0" />
<PackageReference Include="Abp.AspNetCore.SignalR" Version="5.14.0" />
<PackageReference Include="Abp.AspNetCore.OData" Version="5.14.0" />
</ItemGroup>
</Project>

Просмотреть файл

@ -31,8 +31,8 @@
<ProjectReference Include="..\AbpODataDemo.Web.Core\AbpODataDemo.Web.Core.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Abp.Castle.Log4Net" Version="5.2.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.1.0">
<PackageReference Include="Abp.Castle.Log4Net" Version="5.14.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.1.9">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>

Просмотреть файл

@ -15,18 +15,18 @@
<ProjectReference Include="..\..\src\AbpODataDemo.EntityFrameworkCore\AbpODataDemo.EntityFrameworkCore.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />
<PackageReference Include="NSubstitute" Version="4.2.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
<PackageReference Include="NSubstitute" Version="4.2.2" />
<PackageReference Include="Shouldly" Version="3.0.2" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.extensibility.execution" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="Abp.TestBase" Version="5.2.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="3.1.0" />
<PackageReference Include="Castle.Core" Version="4.4.0" />
<PackageReference Include="Abp.TestBase" Version="5.14.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="3.1.9" />
<PackageReference Include="Castle.Core" Version="4.4.1" />
</ItemGroup>
<ItemGroup>
<None Update="appsettings.json">