26 changed files with 1915 additions and 300 deletions
@ -1,153 +0,0 @@ |
|||
// <auto-generated />
|
|||
using System; |
|||
using Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore; |
|||
using Microsoft.EntityFrameworkCore; |
|||
using Microsoft.EntityFrameworkCore.Infrastructure; |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; |
|||
using Volo.Abp.EntityFrameworkCore; |
|||
|
|||
namespace Lion.AbpPro.DataDictionaryManagement.Migrations |
|||
{ |
|||
[DbContext(typeof(DataDictionaryManagementHttpApiHostMigrationsDbContext))] |
|||
[Migration("20210812130334_Init")] |
|||
partial class Init |
|||
{ |
|||
protected override void BuildTargetModel(ModelBuilder modelBuilder) |
|||
{ |
|||
#pragma warning disable 612, 618
|
|||
modelBuilder |
|||
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) |
|||
.HasAnnotation("Relational:MaxIdentifierLength", 64) |
|||
.HasAnnotation("ProductVersion", "5.0.7"); |
|||
|
|||
modelBuilder.Entity("Lion.AbpPro.DataDictionaryManagement.DataDictionaries.Aggregates.DataDictionary", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("char(36)"); |
|||
|
|||
b.Property<string>("Code") |
|||
.IsRequired() |
|||
.HasMaxLength(64) |
|||
.HasColumnType("varchar(64) CHARACTER SET utf8mb4"); |
|||
|
|||
b.Property<string>("ConcurrencyStamp") |
|||
.IsConcurrencyToken() |
|||
.HasMaxLength(40) |
|||
.HasColumnType("varchar(40) CHARACTER SET utf8mb4") |
|||
.HasColumnName("ConcurrencyStamp"); |
|||
|
|||
b.Property<DateTime>("CreationTime") |
|||
.HasColumnType("datetime(6)") |
|||
.HasColumnName("CreationTime"); |
|||
|
|||
b.Property<Guid?>("CreatorId") |
|||
.HasColumnType("char(36)") |
|||
.HasColumnName("CreatorId"); |
|||
|
|||
b.Property<Guid?>("DeleterId") |
|||
.HasColumnType("char(36)") |
|||
.HasColumnName("DeleterId"); |
|||
|
|||
b.Property<DateTime?>("DeletionTime") |
|||
.HasColumnType("datetime(6)") |
|||
.HasColumnName("DeletionTime"); |
|||
|
|||
b.Property<string>("Description") |
|||
.IsRequired() |
|||
.HasMaxLength(1024) |
|||
.HasColumnType("varchar(1024) CHARACTER SET utf8mb4"); |
|||
|
|||
b.Property<string>("DisplayText") |
|||
.IsRequired() |
|||
.HasMaxLength(64) |
|||
.HasColumnType("varchar(64) CHARACTER SET utf8mb4"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.HasColumnType("longtext CHARACTER SET utf8mb4") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<bool>("IsDeleted") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("tinyint(1)") |
|||
.HasDefaultValue(false) |
|||
.HasColumnName("IsDeleted"); |
|||
|
|||
b.Property<DateTime?>("LastModificationTime") |
|||
.HasColumnType("datetime(6)") |
|||
.HasColumnName("LastModificationTime"); |
|||
|
|||
b.Property<Guid?>("LastModifierId") |
|||
.HasColumnType("char(36)") |
|||
.HasColumnName("LastModifierId"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.ToTable("DataDictionary"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Lion.AbpPro.DataDictionaryManagement.DataDictionaries.Aggregates.DataDictionaryDetail", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("char(36)"); |
|||
|
|||
b.Property<string>("Code") |
|||
.HasColumnType("longtext CHARACTER SET utf8mb4"); |
|||
|
|||
b.Property<DateTime>("CreationTime") |
|||
.HasColumnType("datetime(6)") |
|||
.HasColumnName("CreationTime"); |
|||
|
|||
b.Property<Guid?>("CreatorId") |
|||
.HasColumnType("char(36)") |
|||
.HasColumnName("CreatorId"); |
|||
|
|||
b.Property<Guid>("DataDictionaryId") |
|||
.HasColumnType("char(36)"); |
|||
|
|||
b.Property<string>("Description") |
|||
.HasColumnType("longtext CHARACTER SET utf8mb4"); |
|||
|
|||
b.Property<string>("DisplayText") |
|||
.HasColumnType("longtext CHARACTER SET utf8mb4"); |
|||
|
|||
b.Property<bool>("IsEnabled") |
|||
.HasColumnType("tinyint(1)"); |
|||
|
|||
b.Property<DateTime?>("LastModificationTime") |
|||
.HasColumnType("datetime(6)") |
|||
.HasColumnName("LastModificationTime"); |
|||
|
|||
b.Property<Guid?>("LastModifierId") |
|||
.HasColumnType("char(36)") |
|||
.HasColumnName("LastModifierId"); |
|||
|
|||
b.Property<int>("Order") |
|||
.HasColumnType("int"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("DataDictionaryId"); |
|||
|
|||
b.ToTable("DataDictionaryDetail"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Lion.AbpPro.DataDictionaryManagement.DataDictionaries.Aggregates.DataDictionaryDetail", b => |
|||
{ |
|||
b.HasOne("Lion.AbpPro.DataDictionaryManagement.DataDictionaries.Aggregates.DataDictionary", null) |
|||
.WithMany("Details") |
|||
.HasForeignKey("DataDictionaryId") |
|||
.OnDelete(DeleteBehavior.Cascade) |
|||
.IsRequired(); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Lion.AbpPro.DataDictionaryManagement.DataDictionaries.Aggregates.DataDictionary", b => |
|||
{ |
|||
b.Navigation("Details"); |
|||
}); |
|||
#pragma warning restore 612, 618
|
|||
} |
|||
} |
|||
} |
|||
@ -1,24 +0,0 @@ |
|||
using System; |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
namespace Lion.AbpPro.DataDictionaryManagement.Migrations |
|||
{ |
|||
public partial class AddTenantId : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.AddColumn<Guid>( |
|||
name: "TenantId", |
|||
table: "DataDictionary", |
|||
type: "char(36)", |
|||
nullable: true); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropColumn( |
|||
name: "TenantId", |
|||
table: "DataDictionary"); |
|||
} |
|||
} |
|||
} |
|||
@ -1,25 +0,0 @@ |
|||
namespace Lion.AbpPro.DataDictionaryManagement |
|||
{ |
|||
public class DataDictionaryManagementDataSeedContributor : IDataSeedContributor, ITransientDependency |
|||
{ |
|||
private readonly IGuidGenerator _guidGenerator; |
|||
private readonly ICurrentTenant _currentTenant; |
|||
|
|||
|
|||
public DataDictionaryManagementDataSeedContributor( |
|||
IGuidGenerator guidGenerator, |
|||
ICurrentTenant currentTenant) |
|||
{ |
|||
_guidGenerator = guidGenerator; |
|||
_currentTenant = currentTenant; |
|||
} |
|||
|
|||
public async Task SeedAsync(DataSeedContext context) |
|||
{ |
|||
/* Instead of returning the Task.CompletedTask, you can insert your test data |
|||
* at this point! |
|||
*/ |
|||
await Task.CompletedTask; |
|||
} |
|||
} |
|||
} |
|||
|
Before Width: | Height: | Size: 25 KiB |
File diff suppressed because it is too large
@ -0,0 +1,64 @@ |
|||
using System; |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
#nullable disable |
|||
|
|||
namespace Lion.AbpPro.Migrations |
|||
{ |
|||
/// <inheritdoc />
|
|||
public partial class UpdateDataDictionaryManagementAndNotificationManagement : Migration |
|||
{ |
|||
/// <inheritdoc />
|
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropForeignKey( |
|||
name: "FK_NotificationSubscription_Notification_NotificationId", |
|||
table: "NotificationSubscription"); |
|||
|
|||
migrationBuilder.AlterColumn<Guid>( |
|||
name: "NotificationId", |
|||
table: "NotificationSubscription", |
|||
type: "char(36)", |
|||
nullable: false, |
|||
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"), |
|||
collation: "ascii_general_ci", |
|||
oldClrType: typeof(Guid), |
|||
oldType: "char(36)", |
|||
oldNullable: true) |
|||
.OldAnnotation("Relational:Collation", "ascii_general_ci"); |
|||
|
|||
migrationBuilder.AddForeignKey( |
|||
name: "FK_NotificationSubscription_Notification_NotificationId", |
|||
table: "NotificationSubscription", |
|||
column: "NotificationId", |
|||
principalTable: "Notification", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
} |
|||
|
|||
/// <inheritdoc />
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropForeignKey( |
|||
name: "FK_NotificationSubscription_Notification_NotificationId", |
|||
table: "NotificationSubscription"); |
|||
|
|||
migrationBuilder.AlterColumn<Guid>( |
|||
name: "NotificationId", |
|||
table: "NotificationSubscription", |
|||
type: "char(36)", |
|||
nullable: true, |
|||
collation: "ascii_general_ci", |
|||
oldClrType: typeof(Guid), |
|||
oldType: "char(36)") |
|||
.OldAnnotation("Relational:Collation", "ascii_general_ci"); |
|||
|
|||
migrationBuilder.AddForeignKey( |
|||
name: "FK_NotificationSubscription_Notification_NotificationId", |
|||
table: "NotificationSubscription", |
|||
column: "NotificationId", |
|||
principalTable: "Notification", |
|||
principalColumn: "Id"); |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue