diff --git a/modules/cms-kit/host/Volo.CmsKit.HttpApi.Host/Migrations/20201231111745_Initial.Designer.cs b/modules/cms-kit/host/Volo.CmsKit.HttpApi.Host/Migrations/20201231111745_Initial.Designer.cs
new file mode 100644
index 0000000000..28e6976776
--- /dev/null
+++ b/modules/cms-kit/host/Volo.CmsKit.HttpApi.Host/Migrations/20201231111745_Initial.Designer.cs
@@ -0,0 +1,531 @@
+//
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Volo.Abp.EntityFrameworkCore;
+using Volo.CmsKit.EntityFrameworkCore;
+
+namespace Volo.CmsKit.Migrations
+{
+ [DbContext(typeof(CmsKitHttpApiHostMigrationsDbContext))]
+ [Migration("20201231111745_Initial")]
+ partial class Initial
+ {
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .UseIdentityColumns()
+ .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer)
+ .HasAnnotation("Relational:MaxIdentifierLength", 128)
+ .HasAnnotation("ProductVersion", "5.0.1");
+
+ modelBuilder.Entity("Volo.Abp.BlobStoring.Database.DatabaseBlob", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("nvarchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("ContainerId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Content")
+ .HasMaxLength(2147483647)
+ .HasColumnType("varbinary(max)");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ContainerId");
+
+ b.HasIndex("TenantId", "ContainerId", "Name");
+
+ b.ToTable("AbpBlobs");
+ });
+
+ modelBuilder.Entity("Volo.Abp.BlobStoring.Database.DatabaseBlobContainer", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("nvarchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("nvarchar(128)");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.HasKey("Id");
+
+ b.HasIndex("TenantId", "Name");
+
+ b.ToTable("AbpBlobContainers");
+ });
+
+ modelBuilder.Entity("Volo.CmsKit.Comments.Comment", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("EntityId")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("EntityType")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("RepliedCommentId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.Property("Text")
+ .IsRequired()
+ .HasMaxLength(512)
+ .HasColumnType("nvarchar(512)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("TenantId", "RepliedCommentId");
+
+ b.HasIndex("TenantId", "EntityType", "EntityId");
+
+ b.ToTable("CmsComments");
+ });
+
+ modelBuilder.Entity("Volo.CmsKit.Contents.Content", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("nvarchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("DeleterId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("DeleterId");
+
+ b.Property("DeletionTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("DeletionTime");
+
+ b.Property("EntityId")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("EntityType")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("LastModifierId");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.Property("Value")
+ .IsRequired()
+ .HasMaxLength(2147483647)
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("TenantId", "EntityType", "EntityId");
+
+ b.ToTable("CmsContents");
+ });
+
+ modelBuilder.Entity("Volo.CmsKit.Pages.Page", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("nvarchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("DeleterId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("DeleterId");
+
+ b.Property("DeletionTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("DeletionTime");
+
+ b.Property("Description")
+ .HasMaxLength(512)
+ .HasColumnType("nvarchar(512)");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("LastModifierId");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.Property("Title")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
+
+ b.Property("Url")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("TenantId", "Url");
+
+ b.ToTable("CmsPages");
+ });
+
+ modelBuilder.Entity("Volo.CmsKit.Ratings.Rating", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("EntityId")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("EntityType")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("StarCount")
+ .HasColumnType("smallint");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.HasIndex("TenantId", "EntityType", "EntityId", "CreatorId");
+
+ b.ToTable("CmsRatings");
+ });
+
+ modelBuilder.Entity("Volo.CmsKit.Reactions.UserReaction", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("EntityId")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("EntityType")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("ReactionName")
+ .IsRequired()
+ .HasMaxLength(32)
+ .HasColumnType("nvarchar(32)");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.HasKey("Id");
+
+ b.HasIndex("TenantId", "EntityType", "EntityId", "ReactionName");
+
+ b.HasIndex("TenantId", "CreatorId", "EntityType", "EntityId", "ReactionName");
+
+ b.ToTable("CmsUserReactions");
+ });
+
+ modelBuilder.Entity("Volo.CmsKit.Tags.EntityTag", b =>
+ {
+ b.Property("EntityId")
+ .HasColumnType("nvarchar(450)");
+
+ b.Property("TagId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.HasKey("EntityId", "TagId");
+
+ b.HasIndex("TenantId", "EntityId", "TagId");
+
+ b.ToTable("CmsEntityTags");
+ });
+
+ modelBuilder.Entity("Volo.CmsKit.Tags.Tag", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("nvarchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("DeleterId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("DeleterId");
+
+ b.Property("DeletionTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("DeletionTime");
+
+ b.Property("EntityType")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("LastModifierId");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(32)
+ .HasColumnType("nvarchar(32)");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.HasKey("Id");
+
+ b.HasIndex("TenantId", "Name");
+
+ b.ToTable("CmsTags");
+ });
+
+ modelBuilder.Entity("Volo.CmsKit.Users.CmsUser", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("nvarchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("Email")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)")
+ .HasColumnName("Email");
+
+ b.Property("EmailConfirmed")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit")
+ .HasDefaultValue(false)
+ .HasColumnName("EmailConfirmed");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("Name")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)")
+ .HasColumnName("Name");
+
+ b.Property("PhoneNumber")
+ .HasMaxLength(16)
+ .HasColumnType("nvarchar(16)")
+ .HasColumnName("PhoneNumber");
+
+ b.Property("PhoneNumberConfirmed")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit")
+ .HasDefaultValue(false)
+ .HasColumnName("PhoneNumberConfirmed");
+
+ b.Property("Surname")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)")
+ .HasColumnName("Surname");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.Property("UserName")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)")
+ .HasColumnName("UserName");
+
+ b.HasKey("Id");
+
+ b.HasIndex("TenantId", "Email");
+
+ b.HasIndex("TenantId", "UserName");
+
+ b.ToTable("CmsUsers");
+ });
+
+ modelBuilder.Entity("Volo.Abp.BlobStoring.Database.DatabaseBlob", b =>
+ {
+ b.HasOne("Volo.Abp.BlobStoring.Database.DatabaseBlobContainer", null)
+ .WithMany()
+ .HasForeignKey("ContainerId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/modules/cms-kit/host/Volo.CmsKit.HttpApi.Host/Migrations/20201231111745_Initial.cs b/modules/cms-kit/host/Volo.CmsKit.HttpApi.Host/Migrations/20201231111745_Initial.cs
new file mode 100644
index 0000000000..55f1ed7245
--- /dev/null
+++ b/modules/cms-kit/host/Volo.CmsKit.HttpApi.Host/Migrations/20201231111745_Initial.cs
@@ -0,0 +1,309 @@
+using System;
+using Microsoft.EntityFrameworkCore.Migrations;
+
+namespace Volo.CmsKit.Migrations
+{
+ public partial class Initial : Migration
+ {
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.CreateTable(
+ name: "AbpBlobContainers",
+ columns: table => new
+ {
+ Id = table.Column(type: "uniqueidentifier", nullable: false),
+ TenantId = table.Column(type: "uniqueidentifier", nullable: true),
+ Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false),
+ ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true),
+ ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_AbpBlobContainers", x => x.Id);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "CmsComments",
+ columns: table => new
+ {
+ Id = table.Column(type: "uniqueidentifier", nullable: false),
+ TenantId = table.Column(type: "uniqueidentifier", nullable: true),
+ EntityType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false),
+ EntityId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false),
+ Text = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: false),
+ RepliedCommentId = table.Column(type: "uniqueidentifier", nullable: true),
+ CreatorId = table.Column(type: "uniqueidentifier", nullable: false),
+ CreationTime = table.Column(type: "datetime2", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_CmsComments", x => x.Id);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "CmsContents",
+ columns: table => new
+ {
+ Id = table.Column(type: "uniqueidentifier", nullable: false),
+ TenantId = table.Column(type: "uniqueidentifier", nullable: true),
+ EntityType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false),
+ EntityId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false),
+ Value = table.Column(type: "nvarchar(max)", maxLength: 2147483647, nullable: false),
+ ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true),
+ ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true),
+ CreationTime = table.Column(type: "datetime2", nullable: false),
+ CreatorId = table.Column(type: "uniqueidentifier", nullable: true),
+ LastModificationTime = table.Column(type: "datetime2", nullable: true),
+ LastModifierId = table.Column(type: "uniqueidentifier", nullable: true),
+ IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false),
+ DeleterId = table.Column(type: "uniqueidentifier", nullable: true),
+ DeletionTime = table.Column(type: "datetime2", nullable: true)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_CmsContents", x => x.Id);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "CmsEntityTags",
+ columns: table => new
+ {
+ TagId = table.Column(type: "uniqueidentifier", nullable: false),
+ EntityId = table.Column(type: "nvarchar(450)", nullable: false),
+ TenantId = table.Column(type: "uniqueidentifier", nullable: true)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_CmsEntityTags", x => new { x.EntityId, x.TagId });
+ });
+
+ migrationBuilder.CreateTable(
+ name: "CmsPages",
+ columns: table => new
+ {
+ Id = table.Column(type: "uniqueidentifier", nullable: false),
+ TenantId = table.Column(type: "uniqueidentifier", nullable: true),
+ Title = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false),
+ Url = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false),
+ Description = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true),
+ ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true),
+ ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true),
+ CreationTime = table.Column(type: "datetime2", nullable: false),
+ CreatorId = table.Column(type: "uniqueidentifier", nullable: true),
+ LastModificationTime = table.Column(type: "datetime2", nullable: true),
+ LastModifierId = table.Column(type: "uniqueidentifier", nullable: true),
+ IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false),
+ DeleterId = table.Column(type: "uniqueidentifier", nullable: true),
+ DeletionTime = table.Column(type: "datetime2", nullable: true)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_CmsPages", x => x.Id);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "CmsRatings",
+ columns: table => new
+ {
+ Id = table.Column(type: "uniqueidentifier", nullable: false),
+ TenantId = table.Column(type: "uniqueidentifier", nullable: true),
+ EntityType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false),
+ EntityId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false),
+ StarCount = table.Column(type: "smallint", nullable: false),
+ CreatorId = table.Column(type: "uniqueidentifier", nullable: false),
+ CreationTime = table.Column(type: "datetime2", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_CmsRatings", x => x.Id);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "CmsTags",
+ columns: table => new
+ {
+ Id = table.Column(type: "uniqueidentifier", nullable: false),
+ EntityType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false),
+ Name = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: false),
+ TenantId = table.Column(type: "uniqueidentifier", nullable: true),
+ ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true),
+ ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true),
+ CreationTime = table.Column(type: "datetime2", nullable: false),
+ CreatorId = table.Column(type: "uniqueidentifier", nullable: true),
+ LastModificationTime = table.Column(type: "datetime2", nullable: true),
+ LastModifierId = table.Column(type: "uniqueidentifier", nullable: true),
+ IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false),
+ DeleterId = table.Column(type: "uniqueidentifier", nullable: true),
+ DeletionTime = table.Column(type: "datetime2", nullable: true)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_CmsTags", x => x.Id);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "CmsUserReactions",
+ columns: table => new
+ {
+ Id = table.Column(type: "uniqueidentifier", nullable: false),
+ TenantId = table.Column(type: "uniqueidentifier", nullable: true),
+ EntityType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false),
+ EntityId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false),
+ ReactionName = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: false),
+ CreatorId = table.Column(type: "uniqueidentifier", nullable: false),
+ CreationTime = table.Column(type: "datetime2", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_CmsUserReactions", x => x.Id);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "CmsUsers",
+ columns: table => new
+ {
+ Id = table.Column(type: "uniqueidentifier", nullable: false),
+ TenantId = table.Column(type: "uniqueidentifier", nullable: true),
+ UserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false),
+ Email = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false),
+ Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true),
+ Surname = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true),
+ EmailConfirmed = table.Column(type: "bit", nullable: false, defaultValue: false),
+ PhoneNumber = table.Column(type: "nvarchar(16)", maxLength: 16, nullable: true),
+ PhoneNumberConfirmed = table.Column(type: "bit", nullable: false, defaultValue: false),
+ ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true),
+ ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_CmsUsers", x => x.Id);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "AbpBlobs",
+ columns: table => new
+ {
+ Id = table.Column(type: "uniqueidentifier", nullable: false),
+ ContainerId = table.Column(type: "uniqueidentifier", nullable: false),
+ TenantId = table.Column(type: "uniqueidentifier", nullable: true),
+ Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false),
+ Content = table.Column(type: "varbinary(max)", maxLength: 2147483647, nullable: true),
+ ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true),
+ ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_AbpBlobs", x => x.Id);
+ table.ForeignKey(
+ name: "FK_AbpBlobs_AbpBlobContainers_ContainerId",
+ column: x => x.ContainerId,
+ principalTable: "AbpBlobContainers",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ });
+
+ migrationBuilder.CreateIndex(
+ name: "IX_AbpBlobContainers_TenantId_Name",
+ table: "AbpBlobContainers",
+ columns: new[] { "TenantId", "Name" });
+
+ migrationBuilder.CreateIndex(
+ name: "IX_AbpBlobs_ContainerId",
+ table: "AbpBlobs",
+ column: "ContainerId");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_AbpBlobs_TenantId_ContainerId_Name",
+ table: "AbpBlobs",
+ columns: new[] { "TenantId", "ContainerId", "Name" });
+
+ migrationBuilder.CreateIndex(
+ name: "IX_CmsComments_TenantId_EntityType_EntityId",
+ table: "CmsComments",
+ columns: new[] { "TenantId", "EntityType", "EntityId" });
+
+ migrationBuilder.CreateIndex(
+ name: "IX_CmsComments_TenantId_RepliedCommentId",
+ table: "CmsComments",
+ columns: new[] { "TenantId", "RepliedCommentId" });
+
+ migrationBuilder.CreateIndex(
+ name: "IX_CmsContents_TenantId_EntityType_EntityId",
+ table: "CmsContents",
+ columns: new[] { "TenantId", "EntityType", "EntityId" });
+
+ migrationBuilder.CreateIndex(
+ name: "IX_CmsEntityTags_TenantId_EntityId_TagId",
+ table: "CmsEntityTags",
+ columns: new[] { "TenantId", "EntityId", "TagId" });
+
+ migrationBuilder.CreateIndex(
+ name: "IX_CmsPages_TenantId_Url",
+ table: "CmsPages",
+ columns: new[] { "TenantId", "Url" });
+
+ migrationBuilder.CreateIndex(
+ name: "IX_CmsRatings_TenantId_EntityType_EntityId_CreatorId",
+ table: "CmsRatings",
+ columns: new[] { "TenantId", "EntityType", "EntityId", "CreatorId" });
+
+ migrationBuilder.CreateIndex(
+ name: "IX_CmsTags_TenantId_Name",
+ table: "CmsTags",
+ columns: new[] { "TenantId", "Name" });
+
+ migrationBuilder.CreateIndex(
+ name: "IX_CmsUserReactions_TenantId_CreatorId_EntityType_EntityId_ReactionName",
+ table: "CmsUserReactions",
+ columns: new[] { "TenantId", "CreatorId", "EntityType", "EntityId", "ReactionName" });
+
+ migrationBuilder.CreateIndex(
+ name: "IX_CmsUserReactions_TenantId_EntityType_EntityId_ReactionName",
+ table: "CmsUserReactions",
+ columns: new[] { "TenantId", "EntityType", "EntityId", "ReactionName" });
+
+ migrationBuilder.CreateIndex(
+ name: "IX_CmsUsers_TenantId_Email",
+ table: "CmsUsers",
+ columns: new[] { "TenantId", "Email" });
+
+ migrationBuilder.CreateIndex(
+ name: "IX_CmsUsers_TenantId_UserName",
+ table: "CmsUsers",
+ columns: new[] { "TenantId", "UserName" });
+ }
+
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropTable(
+ name: "AbpBlobs");
+
+ migrationBuilder.DropTable(
+ name: "CmsComments");
+
+ migrationBuilder.DropTable(
+ name: "CmsContents");
+
+ migrationBuilder.DropTable(
+ name: "CmsEntityTags");
+
+ migrationBuilder.DropTable(
+ name: "CmsPages");
+
+ migrationBuilder.DropTable(
+ name: "CmsRatings");
+
+ migrationBuilder.DropTable(
+ name: "CmsTags");
+
+ migrationBuilder.DropTable(
+ name: "CmsUserReactions");
+
+ migrationBuilder.DropTable(
+ name: "CmsUsers");
+
+ migrationBuilder.DropTable(
+ name: "AbpBlobContainers");
+ }
+ }
+}
diff --git a/modules/cms-kit/host/Volo.CmsKit.HttpApi.Host/Migrations/CmsKitHttpApiHostMigrationsDbContextModelSnapshot.cs b/modules/cms-kit/host/Volo.CmsKit.HttpApi.Host/Migrations/CmsKitHttpApiHostMigrationsDbContextModelSnapshot.cs
new file mode 100644
index 0000000000..cd29086668
--- /dev/null
+++ b/modules/cms-kit/host/Volo.CmsKit.HttpApi.Host/Migrations/CmsKitHttpApiHostMigrationsDbContextModelSnapshot.cs
@@ -0,0 +1,529 @@
+//
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Volo.Abp.EntityFrameworkCore;
+using Volo.CmsKit.EntityFrameworkCore;
+
+namespace Volo.CmsKit.Migrations
+{
+ [DbContext(typeof(CmsKitHttpApiHostMigrationsDbContext))]
+ partial class CmsKitHttpApiHostMigrationsDbContextModelSnapshot : ModelSnapshot
+ {
+ protected override void BuildModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .UseIdentityColumns()
+ .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer)
+ .HasAnnotation("Relational:MaxIdentifierLength", 128)
+ .HasAnnotation("ProductVersion", "5.0.1");
+
+ modelBuilder.Entity("Volo.Abp.BlobStoring.Database.DatabaseBlob", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("nvarchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("ContainerId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Content")
+ .HasMaxLength(2147483647)
+ .HasColumnType("varbinary(max)");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ContainerId");
+
+ b.HasIndex("TenantId", "ContainerId", "Name");
+
+ b.ToTable("AbpBlobs");
+ });
+
+ modelBuilder.Entity("Volo.Abp.BlobStoring.Database.DatabaseBlobContainer", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("nvarchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("nvarchar(128)");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.HasKey("Id");
+
+ b.HasIndex("TenantId", "Name");
+
+ b.ToTable("AbpBlobContainers");
+ });
+
+ modelBuilder.Entity("Volo.CmsKit.Comments.Comment", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("EntityId")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("EntityType")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("RepliedCommentId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.Property("Text")
+ .IsRequired()
+ .HasMaxLength(512)
+ .HasColumnType("nvarchar(512)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("TenantId", "RepliedCommentId");
+
+ b.HasIndex("TenantId", "EntityType", "EntityId");
+
+ b.ToTable("CmsComments");
+ });
+
+ modelBuilder.Entity("Volo.CmsKit.Contents.Content", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("nvarchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("DeleterId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("DeleterId");
+
+ b.Property("DeletionTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("DeletionTime");
+
+ b.Property("EntityId")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("EntityType")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("LastModifierId");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.Property("Value")
+ .IsRequired()
+ .HasMaxLength(2147483647)
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("TenantId", "EntityType", "EntityId");
+
+ b.ToTable("CmsContents");
+ });
+
+ modelBuilder.Entity("Volo.CmsKit.Pages.Page", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("nvarchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("DeleterId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("DeleterId");
+
+ b.Property("DeletionTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("DeletionTime");
+
+ b.Property("Description")
+ .HasMaxLength(512)
+ .HasColumnType("nvarchar(512)");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("LastModifierId");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.Property("Title")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
+
+ b.Property("Url")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("TenantId", "Url");
+
+ b.ToTable("CmsPages");
+ });
+
+ modelBuilder.Entity("Volo.CmsKit.Ratings.Rating", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("EntityId")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("EntityType")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("StarCount")
+ .HasColumnType("smallint");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.HasIndex("TenantId", "EntityType", "EntityId", "CreatorId");
+
+ b.ToTable("CmsRatings");
+ });
+
+ modelBuilder.Entity("Volo.CmsKit.Reactions.UserReaction", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("EntityId")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("EntityType")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("ReactionName")
+ .IsRequired()
+ .HasMaxLength(32)
+ .HasColumnType("nvarchar(32)");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.HasKey("Id");
+
+ b.HasIndex("TenantId", "EntityType", "EntityId", "ReactionName");
+
+ b.HasIndex("TenantId", "CreatorId", "EntityType", "EntityId", "ReactionName");
+
+ b.ToTable("CmsUserReactions");
+ });
+
+ modelBuilder.Entity("Volo.CmsKit.Tags.EntityTag", b =>
+ {
+ b.Property("EntityId")
+ .HasColumnType("nvarchar(450)");
+
+ b.Property("TagId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.HasKey("EntityId", "TagId");
+
+ b.HasIndex("TenantId", "EntityId", "TagId");
+
+ b.ToTable("CmsEntityTags");
+ });
+
+ modelBuilder.Entity("Volo.CmsKit.Tags.Tag", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("nvarchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("DeleterId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("DeleterId");
+
+ b.Property("DeletionTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("DeletionTime");
+
+ b.Property("EntityType")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("LastModifierId");
+
+ b.Property