|
|
|
@ -10,14 +10,14 @@ using VoloDocs.EntityFrameworkCore; |
|
|
|
namespace VoloDocs.EntityFrameworkCore.Migrations |
|
|
|
{ |
|
|
|
[DbContext(typeof(VoloDocsDbContext))] |
|
|
|
[Migration("20200312050853_init")] |
|
|
|
[Migration("20200525053411_init")] |
|
|
|
partial class init |
|
|
|
{ |
|
|
|
protected override void BuildTargetModel(ModelBuilder modelBuilder) |
|
|
|
{ |
|
|
|
#pragma warning disable 612, 618
|
|
|
|
modelBuilder |
|
|
|
.HasAnnotation("ProductVersion", "3.1.1") |
|
|
|
.HasAnnotation("ProductVersion", "3.1.2") |
|
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 128) |
|
|
|
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); |
|
|
|
|
|
|
|
@ -109,6 +109,7 @@ namespace VoloDocs.EntityFrameworkCore.Migrations |
|
|
|
.HasMaxLength(256); |
|
|
|
|
|
|
|
b.Property<Guid?>("TenantId") |
|
|
|
.HasColumnName("TenantId") |
|
|
|
.HasColumnType("uniqueidentifier"); |
|
|
|
|
|
|
|
b.HasKey("Id"); |
|
|
|
@ -136,6 +137,7 @@ namespace VoloDocs.EntityFrameworkCore.Migrations |
|
|
|
.HasColumnType("uniqueidentifier"); |
|
|
|
|
|
|
|
b.Property<Guid?>("TenantId") |
|
|
|
.HasColumnName("TenantId") |
|
|
|
.HasColumnType("uniqueidentifier"); |
|
|
|
|
|
|
|
b.HasKey("Id"); |
|
|
|
@ -305,6 +307,7 @@ namespace VoloDocs.EntityFrameworkCore.Migrations |
|
|
|
.HasMaxLength(1024); |
|
|
|
|
|
|
|
b.Property<Guid?>("TenantId") |
|
|
|
.HasColumnName("TenantId") |
|
|
|
.HasColumnType("uniqueidentifier"); |
|
|
|
|
|
|
|
b.Property<Guid>("UserId") |
|
|
|
@ -336,6 +339,7 @@ namespace VoloDocs.EntityFrameworkCore.Migrations |
|
|
|
.HasMaxLength(196); |
|
|
|
|
|
|
|
b.Property<Guid?>("TenantId") |
|
|
|
.HasColumnName("TenantId") |
|
|
|
.HasColumnType("uniqueidentifier"); |
|
|
|
|
|
|
|
b.HasKey("UserId", "LoginProvider"); |
|
|
|
@ -345,6 +349,33 @@ namespace VoloDocs.EntityFrameworkCore.Migrations |
|
|
|
b.ToTable("AbpUserLogins"); |
|
|
|
}); |
|
|
|
|
|
|
|
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => |
|
|
|
{ |
|
|
|
b.Property<Guid>("OrganizationUnitId") |
|
|
|
.HasColumnType("uniqueidentifier"); |
|
|
|
|
|
|
|
b.Property<Guid>("UserId") |
|
|
|
.HasColumnType("uniqueidentifier"); |
|
|
|
|
|
|
|
b.Property<DateTime>("CreationTime") |
|
|
|
.HasColumnName("CreationTime") |
|
|
|
.HasColumnType("datetime2"); |
|
|
|
|
|
|
|
b.Property<Guid?>("CreatorId") |
|
|
|
.HasColumnName("CreatorId") |
|
|
|
.HasColumnType("uniqueidentifier"); |
|
|
|
|
|
|
|
b.Property<Guid?>("TenantId") |
|
|
|
.HasColumnName("TenantId") |
|
|
|
.HasColumnType("uniqueidentifier"); |
|
|
|
|
|
|
|
b.HasKey("OrganizationUnitId", "UserId"); |
|
|
|
|
|
|
|
b.HasIndex("UserId", "OrganizationUnitId"); |
|
|
|
|
|
|
|
b.ToTable("AbpUserOrganizationUnits"); |
|
|
|
}); |
|
|
|
|
|
|
|
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => |
|
|
|
{ |
|
|
|
b.Property<Guid>("UserId") |
|
|
|
@ -354,6 +385,7 @@ namespace VoloDocs.EntityFrameworkCore.Migrations |
|
|
|
.HasColumnType("uniqueidentifier"); |
|
|
|
|
|
|
|
b.Property<Guid?>("TenantId") |
|
|
|
.HasColumnName("TenantId") |
|
|
|
.HasColumnType("uniqueidentifier"); |
|
|
|
|
|
|
|
b.HasKey("UserId", "RoleId"); |
|
|
|
@ -377,6 +409,7 @@ namespace VoloDocs.EntityFrameworkCore.Migrations |
|
|
|
.HasMaxLength(128); |
|
|
|
|
|
|
|
b.Property<Guid?>("TenantId") |
|
|
|
.HasColumnName("TenantId") |
|
|
|
.HasColumnType("uniqueidentifier"); |
|
|
|
|
|
|
|
b.Property<string>("Value") |
|
|
|
@ -387,6 +420,106 @@ namespace VoloDocs.EntityFrameworkCore.Migrations |
|
|
|
b.ToTable("AbpUserTokens"); |
|
|
|
}); |
|
|
|
|
|
|
|
modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => |
|
|
|
{ |
|
|
|
b.Property<Guid>("Id") |
|
|
|
.ValueGeneratedOnAdd() |
|
|
|
.HasColumnType("uniqueidentifier"); |
|
|
|
|
|
|
|
b.Property<string>("Code") |
|
|
|
.IsRequired() |
|
|
|
.HasColumnName("Code") |
|
|
|
.HasColumnType("nvarchar(95)") |
|
|
|
.HasMaxLength(95); |
|
|
|
|
|
|
|
b.Property<string>("ConcurrencyStamp") |
|
|
|
.IsConcurrencyToken() |
|
|
|
.HasColumnName("ConcurrencyStamp") |
|
|
|
.HasColumnType("nvarchar(max)"); |
|
|
|
|
|
|
|
b.Property<DateTime>("CreationTime") |
|
|
|
.HasColumnName("CreationTime") |
|
|
|
.HasColumnType("datetime2"); |
|
|
|
|
|
|
|
b.Property<Guid?>("CreatorId") |
|
|
|
.HasColumnName("CreatorId") |
|
|
|
.HasColumnType("uniqueidentifier"); |
|
|
|
|
|
|
|
b.Property<Guid?>("DeleterId") |
|
|
|
.HasColumnName("DeleterId") |
|
|
|
.HasColumnType("uniqueidentifier"); |
|
|
|
|
|
|
|
b.Property<DateTime?>("DeletionTime") |
|
|
|
.HasColumnName("DeletionTime") |
|
|
|
.HasColumnType("datetime2"); |
|
|
|
|
|
|
|
b.Property<string>("DisplayName") |
|
|
|
.IsRequired() |
|
|
|
.HasColumnName("DisplayName") |
|
|
|
.HasColumnType("nvarchar(128)") |
|
|
|
.HasMaxLength(128); |
|
|
|
|
|
|
|
b.Property<string>("ExtraProperties") |
|
|
|
.HasColumnName("ExtraProperties") |
|
|
|
.HasColumnType("nvarchar(max)"); |
|
|
|
|
|
|
|
b.Property<bool>("IsDeleted") |
|
|
|
.ValueGeneratedOnAdd() |
|
|
|
.HasColumnName("IsDeleted") |
|
|
|
.HasColumnType("bit") |
|
|
|
.HasDefaultValue(false); |
|
|
|
|
|
|
|
b.Property<DateTime?>("LastModificationTime") |
|
|
|
.HasColumnName("LastModificationTime") |
|
|
|
.HasColumnType("datetime2"); |
|
|
|
|
|
|
|
b.Property<Guid?>("LastModifierId") |
|
|
|
.HasColumnName("LastModifierId") |
|
|
|
.HasColumnType("uniqueidentifier"); |
|
|
|
|
|
|
|
b.Property<Guid?>("ParentId") |
|
|
|
.HasColumnType("uniqueidentifier"); |
|
|
|
|
|
|
|
b.Property<Guid?>("TenantId") |
|
|
|
.HasColumnName("TenantId") |
|
|
|
.HasColumnType("uniqueidentifier"); |
|
|
|
|
|
|
|
b.HasKey("Id"); |
|
|
|
|
|
|
|
b.HasIndex("Code"); |
|
|
|
|
|
|
|
b.HasIndex("ParentId"); |
|
|
|
|
|
|
|
b.ToTable("AbpOrganizationUnits"); |
|
|
|
}); |
|
|
|
|
|
|
|
modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => |
|
|
|
{ |
|
|
|
b.Property<Guid>("OrganizationUnitId") |
|
|
|
.HasColumnType("uniqueidentifier"); |
|
|
|
|
|
|
|
b.Property<Guid>("RoleId") |
|
|
|
.HasColumnType("uniqueidentifier"); |
|
|
|
|
|
|
|
b.Property<DateTime>("CreationTime") |
|
|
|
.HasColumnName("CreationTime") |
|
|
|
.HasColumnType("datetime2"); |
|
|
|
|
|
|
|
b.Property<Guid?>("CreatorId") |
|
|
|
.HasColumnName("CreatorId") |
|
|
|
.HasColumnType("uniqueidentifier"); |
|
|
|
|
|
|
|
b.Property<Guid?>("TenantId") |
|
|
|
.HasColumnName("TenantId") |
|
|
|
.HasColumnType("uniqueidentifier"); |
|
|
|
|
|
|
|
b.HasKey("OrganizationUnitId", "RoleId"); |
|
|
|
|
|
|
|
b.HasIndex("RoleId", "OrganizationUnitId"); |
|
|
|
|
|
|
|
b.ToTable("AbpOrganizationUnitRoles"); |
|
|
|
}); |
|
|
|
|
|
|
|
modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => |
|
|
|
{ |
|
|
|
b.Property<Guid>("Id") |
|
|
|
@ -409,6 +542,7 @@ namespace VoloDocs.EntityFrameworkCore.Migrations |
|
|
|
.HasMaxLength(64); |
|
|
|
|
|
|
|
b.Property<Guid?>("TenantId") |
|
|
|
.HasColumnName("TenantId") |
|
|
|
.HasColumnType("uniqueidentifier"); |
|
|
|
|
|
|
|
b.HasKey("Id"); |
|
|
|
@ -635,6 +769,21 @@ namespace VoloDocs.EntityFrameworkCore.Migrations |
|
|
|
.IsRequired(); |
|
|
|
}); |
|
|
|
|
|
|
|
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => |
|
|
|
{ |
|
|
|
b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) |
|
|
|
.WithMany() |
|
|
|
.HasForeignKey("OrganizationUnitId") |
|
|
|
.OnDelete(DeleteBehavior.Cascade) |
|
|
|
.IsRequired(); |
|
|
|
|
|
|
|
b.HasOne("Volo.Abp.Identity.IdentityUser", null) |
|
|
|
.WithMany("OrganizationUnits") |
|
|
|
.HasForeignKey("UserId") |
|
|
|
.OnDelete(DeleteBehavior.Cascade) |
|
|
|
.IsRequired(); |
|
|
|
}); |
|
|
|
|
|
|
|
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => |
|
|
|
{ |
|
|
|
b.HasOne("Volo.Abp.Identity.IdentityRole", null) |
|
|
|
@ -659,6 +808,28 @@ namespace VoloDocs.EntityFrameworkCore.Migrations |
|
|
|
.IsRequired(); |
|
|
|
}); |
|
|
|
|
|
|
|
modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => |
|
|
|
{ |
|
|
|
b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) |
|
|
|
.WithMany() |
|
|
|
.HasForeignKey("ParentId"); |
|
|
|
}); |
|
|
|
|
|
|
|
modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => |
|
|
|
{ |
|
|
|
b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) |
|
|
|
.WithMany("Roles") |
|
|
|
.HasForeignKey("OrganizationUnitId") |
|
|
|
.OnDelete(DeleteBehavior.Cascade) |
|
|
|
.IsRequired(); |
|
|
|
|
|
|
|
b.HasOne("Volo.Abp.Identity.IdentityRole", null) |
|
|
|
.WithMany() |
|
|
|
.HasForeignKey("RoleId") |
|
|
|
.OnDelete(DeleteBehavior.Cascade) |
|
|
|
.IsRequired(); |
|
|
|
}); |
|
|
|
|
|
|
|
modelBuilder.Entity("Volo.Docs.Documents.DocumentContributor", b => |
|
|
|
{ |
|
|
|
b.HasOne("Volo.Docs.Documents.Document", null) |