Browse Source

Recreate the migration of app template.

pull/4085/head
maliming 6 years ago
parent
commit
cf2ded7071
  1. 183
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200525051739_Initial.Designer.cs
  2. 113
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200525051739_Initial.cs
  3. 181
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/MyProjectNameMigrationsDbContextModelSnapshot.cs

183
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200106080719_Initial.Designer.cs → templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200525051739_Initial.Designer.cs

@ -10,14 +10,14 @@ using MyCompanyName.MyProjectName.EntityFrameworkCore;
namespace MyCompanyName.MyProjectName.Migrations namespace MyCompanyName.MyProjectName.Migrations
{ {
[DbContext(typeof(MyProjectNameMigrationsDbContext))] [DbContext(typeof(MyProjectNameMigrationsDbContext))]
[Migration("20200106080719_Initial")] [Migration("20200525051739_Initial")]
partial class Initial partial class Initial
{ {
protected override void BuildTargetModel(ModelBuilder modelBuilder) protected override void BuildTargetModel(ModelBuilder modelBuilder)
{ {
#pragma warning disable 612, 618 #pragma warning disable 612, 618
modelBuilder modelBuilder
.HasAnnotation("ProductVersion", "3.1.0") .HasAnnotation("ProductVersion", "3.1.2")
.HasAnnotation("Relational:MaxIdentifierLength", 128) .HasAnnotation("Relational:MaxIdentifierLength", 128)
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
@ -58,6 +58,8 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasMaxLength(256); .HasMaxLength(256);
b.Property<string>("ConcurrencyStamp") b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(max)"); .HasColumnType("nvarchar(max)");
b.Property<string>("CorrelationId") b.Property<string>("CorrelationId")
@ -166,6 +168,7 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasMaxLength(256); .HasMaxLength(256);
b.Property<Guid?>("TenantId") b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier"); .HasColumnType("uniqueidentifier");
b.HasKey("Id"); b.HasKey("Id");
@ -259,6 +262,7 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasMaxLength(64); .HasMaxLength(64);
b.Property<Guid?>("TenantId") b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier"); .HasColumnType("uniqueidentifier");
b.HasKey("Id"); b.HasKey("Id");
@ -275,6 +279,8 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasColumnType("uniqueidentifier"); .HasColumnType("uniqueidentifier");
b.Property<string>("ConcurrencyStamp") b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(max)"); .HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreationTime") b.Property<DateTime>("CreationTime")
@ -442,6 +448,7 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasMaxLength(256); .HasMaxLength(256);
b.Property<Guid?>("TenantId") b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier"); .HasColumnType("uniqueidentifier");
b.HasKey("Id"); b.HasKey("Id");
@ -469,6 +476,7 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasColumnType("uniqueidentifier"); .HasColumnType("uniqueidentifier");
b.Property<Guid?>("TenantId") b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier"); .HasColumnType("uniqueidentifier");
b.HasKey("Id"); b.HasKey("Id");
@ -638,6 +646,7 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasMaxLength(1024); .HasMaxLength(1024);
b.Property<Guid?>("TenantId") b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier"); .HasColumnType("uniqueidentifier");
b.Property<Guid>("UserId") b.Property<Guid>("UserId")
@ -669,6 +678,7 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasMaxLength(196); .HasMaxLength(196);
b.Property<Guid?>("TenantId") b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier"); .HasColumnType("uniqueidentifier");
b.HasKey("UserId", "LoginProvider"); b.HasKey("UserId", "LoginProvider");
@ -678,6 +688,33 @@ namespace MyCompanyName.MyProjectName.Migrations
b.ToTable("AbpUserLogins"); 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 => modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b =>
{ {
b.Property<Guid>("UserId") b.Property<Guid>("UserId")
@ -687,6 +724,7 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasColumnType("uniqueidentifier"); .HasColumnType("uniqueidentifier");
b.Property<Guid?>("TenantId") b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier"); .HasColumnType("uniqueidentifier");
b.HasKey("UserId", "RoleId"); b.HasKey("UserId", "RoleId");
@ -710,6 +748,7 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasMaxLength(128); .HasMaxLength(128);
b.Property<Guid?>("TenantId") b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier"); .HasColumnType("uniqueidentifier");
b.Property<string>("Value") b.Property<string>("Value")
@ -720,6 +759,106 @@ namespace MyCompanyName.MyProjectName.Migrations
b.ToTable("AbpUserTokens"); 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.IdentityServer.ApiResources.ApiResource", b => modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b =>
{ {
b.Property<Guid>("Id") b.Property<Guid>("Id")
@ -1275,6 +1414,8 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasMaxLength(200); .HasMaxLength(200);
b.Property<string>("ConcurrencyStamp") b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(max)"); .HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreationTime") b.Property<DateTime>("CreationTime")
@ -1427,6 +1568,7 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasMaxLength(64); .HasMaxLength(64);
b.Property<Guid?>("TenantId") b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier"); .HasColumnType("uniqueidentifier");
b.HasKey("Id"); b.HasKey("Id");
@ -1597,6 +1739,21 @@ namespace MyCompanyName.MyProjectName.Migrations
.IsRequired(); .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 => modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b =>
{ {
b.HasOne("Volo.Abp.Identity.IdentityRole", null) b.HasOne("Volo.Abp.Identity.IdentityRole", null)
@ -1621,6 +1778,28 @@ namespace MyCompanyName.MyProjectName.Migrations
.IsRequired(); .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.Abp.IdentityServer.ApiResources.ApiResourceClaim", b => modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b =>
{ {
b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null)

113
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200106080719_Initial.cs → templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200525051739_Initial.cs

@ -95,6 +95,36 @@ namespace MyCompanyName.MyProjectName.Migrations
table.PrimaryKey("PK_AbpFeatureValues", x => x.Id); table.PrimaryKey("PK_AbpFeatureValues", x => x.Id);
}); });
migrationBuilder.CreateTable(
name: "AbpOrganizationUnits",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
ExtraProperties = table.Column<string>(nullable: true),
ConcurrencyStamp = table.Column<string>(nullable: true),
CreationTime = table.Column<DateTime>(nullable: false),
CreatorId = table.Column<Guid>(nullable: true),
LastModificationTime = table.Column<DateTime>(nullable: true),
LastModifierId = table.Column<Guid>(nullable: true),
IsDeleted = table.Column<bool>(nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(nullable: true),
DeletionTime = table.Column<DateTime>(nullable: true),
TenantId = table.Column<Guid>(nullable: true),
ParentId = table.Column<Guid>(nullable: true),
Code = table.Column<string>(maxLength: 95, nullable: false),
DisplayName = table.Column<string>(maxLength: 128, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpOrganizationUnits", x => x.Id);
table.ForeignKey(
name: "FK_AbpOrganizationUnits_AbpOrganizationUnits_ParentId",
column: x => x.ParentId,
principalTable: "AbpOrganizationUnits",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable( migrationBuilder.CreateTable(
name: "AbpPermissionGrants", name: "AbpPermissionGrants",
columns: table => new columns: table => new
@ -402,6 +432,33 @@ namespace MyCompanyName.MyProjectName.Migrations
onDelete: ReferentialAction.Cascade); onDelete: ReferentialAction.Cascade);
}); });
migrationBuilder.CreateTable(
name: "AbpOrganizationUnitRoles",
columns: table => new
{
RoleId = table.Column<Guid>(nullable: false),
OrganizationUnitId = table.Column<Guid>(nullable: false),
CreationTime = table.Column<DateTime>(nullable: false),
CreatorId = table.Column<Guid>(nullable: true),
TenantId = table.Column<Guid>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpOrganizationUnitRoles", x => new { x.OrganizationUnitId, x.RoleId });
table.ForeignKey(
name: "FK_AbpOrganizationUnitRoles_AbpOrganizationUnits_OrganizationUnitId",
column: x => x.OrganizationUnitId,
principalTable: "AbpOrganizationUnits",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_AbpOrganizationUnitRoles_AbpRoles_RoleId",
column: x => x.RoleId,
principalTable: "AbpRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable( migrationBuilder.CreateTable(
name: "AbpRoleClaims", name: "AbpRoleClaims",
columns: table => new columns: table => new
@ -484,6 +541,33 @@ namespace MyCompanyName.MyProjectName.Migrations
onDelete: ReferentialAction.Cascade); onDelete: ReferentialAction.Cascade);
}); });
migrationBuilder.CreateTable(
name: "AbpUserOrganizationUnits",
columns: table => new
{
UserId = table.Column<Guid>(nullable: false),
OrganizationUnitId = table.Column<Guid>(nullable: false),
CreationTime = table.Column<DateTime>(nullable: false),
CreatorId = table.Column<Guid>(nullable: true),
TenantId = table.Column<Guid>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpUserOrganizationUnits", x => new { x.OrganizationUnitId, x.UserId });
table.ForeignKey(
name: "FK_AbpUserOrganizationUnits_AbpOrganizationUnits_OrganizationUnitId",
column: x => x.OrganizationUnitId,
principalTable: "AbpOrganizationUnits",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_AbpUserOrganizationUnits_AbpUsers_UserId",
column: x => x.UserId,
principalTable: "AbpUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable( migrationBuilder.CreateTable(
name: "AbpUserRoles", name: "AbpUserRoles",
columns: table => new columns: table => new
@ -864,6 +948,21 @@ namespace MyCompanyName.MyProjectName.Migrations
table: "AbpFeatureValues", table: "AbpFeatureValues",
columns: new[] { "Name", "ProviderName", "ProviderKey" }); columns: new[] { "Name", "ProviderName", "ProviderKey" });
migrationBuilder.CreateIndex(
name: "IX_AbpOrganizationUnitRoles_RoleId_OrganizationUnitId",
table: "AbpOrganizationUnitRoles",
columns: new[] { "RoleId", "OrganizationUnitId" });
migrationBuilder.CreateIndex(
name: "IX_AbpOrganizationUnits_Code",
table: "AbpOrganizationUnits",
column: "Code");
migrationBuilder.CreateIndex(
name: "IX_AbpOrganizationUnits_ParentId",
table: "AbpOrganizationUnits",
column: "ParentId");
migrationBuilder.CreateIndex( migrationBuilder.CreateIndex(
name: "IX_AbpPermissionGrants_Name_ProviderName_ProviderKey", name: "IX_AbpPermissionGrants_Name_ProviderName_ProviderKey",
table: "AbpPermissionGrants", table: "AbpPermissionGrants",
@ -899,6 +998,11 @@ namespace MyCompanyName.MyProjectName.Migrations
table: "AbpUserLogins", table: "AbpUserLogins",
columns: new[] { "LoginProvider", "ProviderKey" }); columns: new[] { "LoginProvider", "ProviderKey" });
migrationBuilder.CreateIndex(
name: "IX_AbpUserOrganizationUnits_UserId_OrganizationUnitId",
table: "AbpUserOrganizationUnits",
columns: new[] { "UserId", "OrganizationUnitId" });
migrationBuilder.CreateIndex( migrationBuilder.CreateIndex(
name: "IX_AbpUserRoles_RoleId_UserId", name: "IX_AbpUserRoles_RoleId_UserId",
table: "AbpUserRoles", table: "AbpUserRoles",
@ -974,6 +1078,9 @@ namespace MyCompanyName.MyProjectName.Migrations
migrationBuilder.DropTable( migrationBuilder.DropTable(
name: "AbpFeatureValues"); name: "AbpFeatureValues");
migrationBuilder.DropTable(
name: "AbpOrganizationUnitRoles");
migrationBuilder.DropTable( migrationBuilder.DropTable(
name: "AbpPermissionGrants"); name: "AbpPermissionGrants");
@ -992,6 +1099,9 @@ namespace MyCompanyName.MyProjectName.Migrations
migrationBuilder.DropTable( migrationBuilder.DropTable(
name: "AbpUserLogins"); name: "AbpUserLogins");
migrationBuilder.DropTable(
name: "AbpUserOrganizationUnits");
migrationBuilder.DropTable( migrationBuilder.DropTable(
name: "AbpUserRoles"); name: "AbpUserRoles");
@ -1049,6 +1159,9 @@ namespace MyCompanyName.MyProjectName.Migrations
migrationBuilder.DropTable( migrationBuilder.DropTable(
name: "AbpTenants"); name: "AbpTenants");
migrationBuilder.DropTable(
name: "AbpOrganizationUnits");
migrationBuilder.DropTable( migrationBuilder.DropTable(
name: "AbpRoles"); name: "AbpRoles");

181
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/MyProjectNameMigrationsDbContextModelSnapshot.cs

@ -15,7 +15,7 @@ namespace MyCompanyName.MyProjectName.Migrations
{ {
#pragma warning disable 612, 618 #pragma warning disable 612, 618
modelBuilder modelBuilder
.HasAnnotation("ProductVersion", "3.1.0") .HasAnnotation("ProductVersion", "3.1.2")
.HasAnnotation("Relational:MaxIdentifierLength", 128) .HasAnnotation("Relational:MaxIdentifierLength", 128)
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
@ -56,6 +56,8 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasMaxLength(256); .HasMaxLength(256);
b.Property<string>("ConcurrencyStamp") b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(max)"); .HasColumnType("nvarchar(max)");
b.Property<string>("CorrelationId") b.Property<string>("CorrelationId")
@ -164,6 +166,7 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasMaxLength(256); .HasMaxLength(256);
b.Property<Guid?>("TenantId") b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier"); .HasColumnType("uniqueidentifier");
b.HasKey("Id"); b.HasKey("Id");
@ -257,6 +260,7 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasMaxLength(64); .HasMaxLength(64);
b.Property<Guid?>("TenantId") b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier"); .HasColumnType("uniqueidentifier");
b.HasKey("Id"); b.HasKey("Id");
@ -273,6 +277,8 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasColumnType("uniqueidentifier"); .HasColumnType("uniqueidentifier");
b.Property<string>("ConcurrencyStamp") b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(max)"); .HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreationTime") b.Property<DateTime>("CreationTime")
@ -440,6 +446,7 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasMaxLength(256); .HasMaxLength(256);
b.Property<Guid?>("TenantId") b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier"); .HasColumnType("uniqueidentifier");
b.HasKey("Id"); b.HasKey("Id");
@ -467,6 +474,7 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasColumnType("uniqueidentifier"); .HasColumnType("uniqueidentifier");
b.Property<Guid?>("TenantId") b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier"); .HasColumnType("uniqueidentifier");
b.HasKey("Id"); b.HasKey("Id");
@ -636,6 +644,7 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasMaxLength(1024); .HasMaxLength(1024);
b.Property<Guid?>("TenantId") b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier"); .HasColumnType("uniqueidentifier");
b.Property<Guid>("UserId") b.Property<Guid>("UserId")
@ -667,6 +676,7 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasMaxLength(196); .HasMaxLength(196);
b.Property<Guid?>("TenantId") b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier"); .HasColumnType("uniqueidentifier");
b.HasKey("UserId", "LoginProvider"); b.HasKey("UserId", "LoginProvider");
@ -676,6 +686,33 @@ namespace MyCompanyName.MyProjectName.Migrations
b.ToTable("AbpUserLogins"); 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 => modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b =>
{ {
b.Property<Guid>("UserId") b.Property<Guid>("UserId")
@ -685,6 +722,7 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasColumnType("uniqueidentifier"); .HasColumnType("uniqueidentifier");
b.Property<Guid?>("TenantId") b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier"); .HasColumnType("uniqueidentifier");
b.HasKey("UserId", "RoleId"); b.HasKey("UserId", "RoleId");
@ -708,6 +746,7 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasMaxLength(128); .HasMaxLength(128);
b.Property<Guid?>("TenantId") b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier"); .HasColumnType("uniqueidentifier");
b.Property<string>("Value") b.Property<string>("Value")
@ -718,6 +757,106 @@ namespace MyCompanyName.MyProjectName.Migrations
b.ToTable("AbpUserTokens"); 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.IdentityServer.ApiResources.ApiResource", b => modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b =>
{ {
b.Property<Guid>("Id") b.Property<Guid>("Id")
@ -1273,6 +1412,8 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasMaxLength(200); .HasMaxLength(200);
b.Property<string>("ConcurrencyStamp") b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(max)"); .HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreationTime") b.Property<DateTime>("CreationTime")
@ -1425,6 +1566,7 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasMaxLength(64); .HasMaxLength(64);
b.Property<Guid?>("TenantId") b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier"); .HasColumnType("uniqueidentifier");
b.HasKey("Id"); b.HasKey("Id");
@ -1595,6 +1737,21 @@ namespace MyCompanyName.MyProjectName.Migrations
.IsRequired(); .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 => modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b =>
{ {
b.HasOne("Volo.Abp.Identity.IdentityRole", null) b.HasOne("Volo.Abp.Identity.IdentityRole", null)
@ -1619,6 +1776,28 @@ namespace MyCompanyName.MyProjectName.Migrations
.IsRequired(); .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.Abp.IdentityServer.ApiResources.ApiResourceClaim", b => modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b =>
{ {
b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null)

Loading…
Cancel
Save