diff --git a/README.en.md b/README.en.md
index 85dd66395..f4edfe568 100644
--- a/README.en.md
+++ b/README.en.md
@@ -41,7 +41,19 @@ If you want to get started with a minimal template code instead of integration s
## Screenshots
-
+
+
+
+
+
+
+
+
+
+
+
+
+
## Related Projects
diff --git a/README.md b/README.md
index f5b5cd661..7c4f53eac 100644
--- a/README.md
+++ b/README.md
@@ -19,11 +19,19 @@
## 截图
-
+
-
+
-
+
+
+
+
+
+
+
+
+
## 相关项目
diff --git a/aspnet-core/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20200602134027_Add-Chat-Message-Entites.Designer.cs b/aspnet-core/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20200602134027_Add-Chat-Message-Entites.Designer.cs
new file mode 100644
index 000000000..6b90f18d7
--- /dev/null
+++ b/aspnet-core/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20200602134027_Add-Chat-Message-Entites.Designer.cs
@@ -0,0 +1,494 @@
+//
+using System;
+using LINGYUN.Abp.MessageService.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+
+namespace LINGYUN.Abp.MessageService.Migrations
+{
+ [DbContext(typeof(MessageServiceHostMigrationsDbContext))]
+ [Migration("20200602134027_Add-Chat-Message-Entites")]
+ partial class AddChatMessageEntites
+ {
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "3.1.3")
+ .HasAnnotation("Relational:MaxIdentifierLength", 64);
+
+ modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.ChatGroup", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint");
+
+ b.Property("Address")
+ .HasColumnType("varchar(256) CHARACTER SET utf8mb4")
+ .HasMaxLength(256);
+
+ b.Property("AllowAnonymous")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("AllowSendMessage")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("CreationTime")
+ .HasColumnName("CreationTime")
+ .HasColumnType("datetime(6)");
+
+ b.Property("CreatorId")
+ .HasColumnName("CreatorId")
+ .HasColumnType("char(36)");
+
+ b.Property("Description")
+ .HasColumnType("varchar(128) CHARACTER SET utf8mb4")
+ .HasMaxLength(128);
+
+ b.Property("GroupId")
+ .HasColumnType("bigint");
+
+ b.Property("LastModificationTime")
+ .HasColumnName("LastModificationTime")
+ .HasColumnType("datetime(6)");
+
+ b.Property("LastModifierId")
+ .HasColumnName("LastModifierId")
+ .HasColumnType("char(36)");
+
+ b.Property("MaxUserCount")
+ .HasColumnType("int");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("varchar(20) CHARACTER SET utf8mb4")
+ .HasMaxLength(20);
+
+ b.Property("Notice")
+ .HasColumnType("varchar(64) CHARACTER SET utf8mb4")
+ .HasMaxLength(64);
+
+ b.Property("Tag")
+ .HasColumnType("varchar(512) CHARACTER SET utf8mb4")
+ .HasMaxLength(512);
+
+ b.Property("TenantId")
+ .HasColumnName("TenantId")
+ .HasColumnType("char(36)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("TenantId", "Name");
+
+ b.ToTable("AppChatGroups");
+ });
+
+ modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.ChatGroupAdmin", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint");
+
+ b.Property("AllowAddPeople")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("AllowDissolveGroup")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("AllowKickPeople")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("AllowSendNotice")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("AllowSilence")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime(6)");
+
+ b.Property("CreatorId")
+ .HasColumnType("char(36)");
+
+ b.Property("GroupId")
+ .HasColumnType("bigint");
+
+ b.Property("IsSuperAdmin")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime(6)");
+
+ b.Property("LastModifierId")
+ .HasColumnType("char(36)");
+
+ b.Property("TenantId")
+ .HasColumnName("TenantId")
+ .HasColumnType("char(36)");
+
+ b.Property("UserId")
+ .HasColumnType("char(36)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("TenantId", "GroupId");
+
+ b.ToTable("AppChatGroupAdmins");
+ });
+
+ modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.GroupChatBlack", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime(6)");
+
+ b.Property("CreatorId")
+ .HasColumnType("char(36)");
+
+ b.Property("GroupId")
+ .HasColumnType("bigint");
+
+ b.Property("ShieldUserId")
+ .HasColumnType("char(36)");
+
+ b.Property("TenantId")
+ .HasColumnName("TenantId")
+ .HasColumnType("char(36)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("TenantId", "GroupId");
+
+ b.ToTable("AppGroupChatBlacks");
+ });
+
+ modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.GroupMessage", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint");
+
+ b.Property("Content")
+ .IsRequired()
+ .HasColumnType("longtext CHARACTER SET utf8mb4")
+ .HasMaxLength(1048576);
+
+ b.Property("CreationTime")
+ .HasColumnName("CreationTime")
+ .HasColumnType("datetime(6)");
+
+ b.Property("CreatorId")
+ .HasColumnType("char(36)");
+
+ b.Property("GroupId")
+ .HasColumnType("bigint");
+
+ b.Property("MessageId")
+ .HasColumnType("bigint");
+
+ b.Property("SendState")
+ .HasColumnType("tinyint");
+
+ b.Property("SendUserName")
+ .IsRequired()
+ .HasColumnType("varchar(64) CHARACTER SET utf8mb4")
+ .HasMaxLength(64);
+
+ b.Property("TenantId")
+ .HasColumnName("TenantId")
+ .HasColumnType("char(36)");
+
+ b.Property("Type")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.HasIndex("TenantId", "GroupId");
+
+ b.ToTable("AppGroupMessages");
+ });
+
+ modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.UserChatBlack", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime(6)");
+
+ b.Property("CreatorId")
+ .HasColumnType("char(36)");
+
+ b.Property("ShieldUserId")
+ .HasColumnType("char(36)");
+
+ b.Property("TenantId")
+ .HasColumnName("TenantId")
+ .HasColumnType("char(36)");
+
+ b.Property("UserId")
+ .HasColumnType("char(36)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("TenantId", "UserId");
+
+ b.ToTable("AppUserChatBlacks");
+ });
+
+ modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.UserChatGroup", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint");
+
+ b.Property("CreationTime")
+ .HasColumnName("CreationTime")
+ .HasColumnType("datetime(6)");
+
+ b.Property("CreatorId")
+ .HasColumnName("CreatorId")
+ .HasColumnType("char(36)");
+
+ b.Property("GroupId")
+ .HasColumnType("bigint");
+
+ b.Property("TenantId")
+ .HasColumnName("TenantId")
+ .HasColumnType("char(36)");
+
+ b.Property("UserId")
+ .HasColumnType("char(36)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("TenantId", "GroupId", "UserId");
+
+ b.ToTable("AppUserChatGroups");
+ });
+
+ modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.UserChatSetting", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint");
+
+ b.Property("AllowAddFriend")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("AllowAnonymous")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("AllowReceiveMessage")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("AllowSendMessage")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("RequireAddFriendValition")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("TenantId")
+ .HasColumnName("TenantId")
+ .HasColumnType("char(36)");
+
+ b.Property("UserId")
+ .HasColumnType("char(36)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("TenantId", "UserId");
+
+ b.ToTable("AppUserChatSettings");
+ });
+
+ modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.UserMessage", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint");
+
+ b.Property("Content")
+ .IsRequired()
+ .HasColumnType("longtext CHARACTER SET utf8mb4")
+ .HasMaxLength(1048576);
+
+ b.Property("CreationTime")
+ .HasColumnName("CreationTime")
+ .HasColumnType("datetime(6)");
+
+ b.Property("CreatorId")
+ .HasColumnType("char(36)");
+
+ b.Property("MessageId")
+ .HasColumnType("bigint");
+
+ b.Property("ReceiveUserId")
+ .HasColumnType("char(36)");
+
+ b.Property("SendState")
+ .HasColumnType("tinyint");
+
+ b.Property("SendUserName")
+ .IsRequired()
+ .HasColumnType("varchar(64) CHARACTER SET utf8mb4")
+ .HasMaxLength(64);
+
+ b.Property("TenantId")
+ .HasColumnName("TenantId")
+ .HasColumnType("char(36)");
+
+ b.Property("Type")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.HasIndex("TenantId", "ReceiveUserId");
+
+ b.ToTable("AppUserMessages");
+ });
+
+ modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.UserSpecialFocus", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime(6)");
+
+ b.Property("CreatorId")
+ .HasColumnType("char(36)");
+
+ b.Property("FocusUserId")
+ .HasColumnType("char(36)");
+
+ b.Property("TenantId")
+ .HasColumnName("TenantId")
+ .HasColumnType("char(36)");
+
+ b.Property("UserId")
+ .HasColumnType("char(36)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("TenantId", "UserId");
+
+ b.ToTable("AppUserSpecialFocuss");
+ });
+
+ modelBuilder.Entity("LINGYUN.Abp.MessageService.Notifications.Notification", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint");
+
+ b.Property("CreationTime")
+ .HasColumnName("CreationTime")
+ .HasColumnType("datetime(6)");
+
+ b.Property("ExpirationTime")
+ .HasColumnType("datetime(6)");
+
+ b.Property("NotificationData")
+ .IsRequired()
+ .HasColumnType("longtext CHARACTER SET utf8mb4")
+ .HasMaxLength(1048576);
+
+ b.Property("NotificationId")
+ .HasColumnType("bigint");
+
+ b.Property("NotificationName")
+ .IsRequired()
+ .HasColumnType("varchar(100) CHARACTER SET utf8mb4")
+ .HasMaxLength(100);
+
+ b.Property("NotificationTypeName")
+ .IsRequired()
+ .HasColumnType("varchar(512) CHARACTER SET utf8mb4")
+ .HasMaxLength(512);
+
+ b.Property("Severity")
+ .HasColumnType("tinyint");
+
+ b.Property("TenantId")
+ .HasColumnName("TenantId")
+ .HasColumnType("char(36)");
+
+ b.Property("Type")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.HasIndex("NotificationName");
+
+ b.ToTable("AppNotifications");
+ });
+
+ modelBuilder.Entity("LINGYUN.Abp.MessageService.Notifications.UserNotification", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint");
+
+ b.Property("NotificationId")
+ .HasColumnType("bigint");
+
+ b.Property("ReadStatus")
+ .HasColumnType("int");
+
+ b.Property("TenantId")
+ .HasColumnName("TenantId")
+ .HasColumnType("char(36)");
+
+ b.Property("UserId")
+ .HasColumnType("char(36)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("TenantId", "UserId", "NotificationId")
+ .HasName("IX_Tenant_User_Notification_Id");
+
+ b.ToTable("AppUserNotifications");
+ });
+
+ modelBuilder.Entity("LINGYUN.Abp.MessageService.Subscriptions.UserSubscribe", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint");
+
+ b.Property("CreationTime")
+ .HasColumnName("CreationTime")
+ .HasColumnType("datetime(6)");
+
+ b.Property("NotificationName")
+ .IsRequired()
+ .HasColumnType("varchar(100) CHARACTER SET utf8mb4")
+ .HasMaxLength(100);
+
+ b.Property("TenantId")
+ .HasColumnName("TenantId")
+ .HasColumnType("char(36)");
+
+ b.Property("UserId")
+ .HasColumnType("char(36)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("TenantId", "UserId", "NotificationName")
+ .IsUnique()
+ .HasName("IX_Tenant_User_Notification_Name");
+
+ b.ToTable("AppUserSubscribes");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/aspnet-core/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20200602134027_Add-Chat-Message-Entites.cs b/aspnet-core/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20200602134027_Add-Chat-Message-Entites.cs
new file mode 100644
index 000000000..c11cb75b4
--- /dev/null
+++ b/aspnet-core/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20200602134027_Add-Chat-Message-Entites.cs
@@ -0,0 +1,281 @@
+using System;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+
+namespace LINGYUN.Abp.MessageService.Migrations
+{
+ public partial class AddChatMessageEntites : Migration
+ {
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.AlterColumn(
+ name: "ReadStatus",
+ table: "AppUserNotifications",
+ nullable: false,
+ oldClrType: typeof(sbyte),
+ oldType: "tinyint");
+
+ migrationBuilder.CreateTable(
+ name: "AppChatGroupAdmins",
+ columns: table => new
+ {
+ Id = table.Column(nullable: false)
+ .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
+ CreationTime = table.Column(nullable: false),
+ CreatorId = table.Column(nullable: true),
+ LastModificationTime = table.Column(nullable: true),
+ LastModifierId = table.Column(nullable: true),
+ TenantId = table.Column(nullable: true),
+ GroupId = table.Column(nullable: false),
+ UserId = table.Column(nullable: false),
+ IsSuperAdmin = table.Column(nullable: false),
+ AllowSilence = table.Column(nullable: false),
+ AllowKickPeople = table.Column(nullable: false),
+ AllowAddPeople = table.Column(nullable: false),
+ AllowSendNotice = table.Column(nullable: false),
+ AllowDissolveGroup = table.Column(nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_AppChatGroupAdmins", x => x.Id);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "AppChatGroups",
+ columns: table => new
+ {
+ Id = table.Column(nullable: false)
+ .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
+ CreationTime = table.Column(nullable: false),
+ CreatorId = table.Column(nullable: true),
+ LastModificationTime = table.Column(nullable: true),
+ LastModifierId = table.Column(nullable: true),
+ TenantId = table.Column(nullable: true),
+ GroupId = table.Column(nullable: false),
+ Name = table.Column(maxLength: 20, nullable: false),
+ Tag = table.Column(maxLength: 512, nullable: true),
+ Address = table.Column(maxLength: 256, nullable: true),
+ Notice = table.Column(maxLength: 64, nullable: true),
+ MaxUserCount = table.Column(nullable: false),
+ AllowAnonymous = table.Column(nullable: false),
+ AllowSendMessage = table.Column(nullable: false),
+ Description = table.Column(maxLength: 128, nullable: true)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_AppChatGroups", x => x.Id);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "AppGroupChatBlacks",
+ columns: table => new
+ {
+ Id = table.Column(nullable: false)
+ .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
+ CreationTime = table.Column(nullable: false),
+ CreatorId = table.Column(nullable: true),
+ TenantId = table.Column(nullable: true),
+ GroupId = table.Column(nullable: false),
+ ShieldUserId = table.Column(nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_AppGroupChatBlacks", x => x.Id);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "AppGroupMessages",
+ columns: table => new
+ {
+ Id = table.Column(nullable: false)
+ .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
+ CreationTime = table.Column(nullable: false),
+ CreatorId = table.Column(nullable: true),
+ TenantId = table.Column(nullable: true),
+ MessageId = table.Column(nullable: false),
+ SendUserName = table.Column(maxLength: 64, nullable: false),
+ Content = table.Column(maxLength: 1048576, nullable: false),
+ Type = table.Column(nullable: false),
+ SendState = table.Column(nullable: false),
+ GroupId = table.Column(nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_AppGroupMessages", x => x.Id);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "AppUserChatBlacks",
+ columns: table => new
+ {
+ Id = table.Column(nullable: false)
+ .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
+ CreationTime = table.Column(nullable: false),
+ CreatorId = table.Column(nullable: true),
+ TenantId = table.Column(nullable: true),
+ UserId = table.Column(nullable: false),
+ ShieldUserId = table.Column(nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_AppUserChatBlacks", x => x.Id);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "AppUserChatGroups",
+ columns: table => new
+ {
+ Id = table.Column(nullable: false)
+ .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
+ CreationTime = table.Column(nullable: false),
+ CreatorId = table.Column(nullable: true),
+ TenantId = table.Column(nullable: true),
+ UserId = table.Column(nullable: false),
+ GroupId = table.Column(nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_AppUserChatGroups", x => x.Id);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "AppUserChatSettings",
+ columns: table => new
+ {
+ Id = table.Column(nullable: false)
+ .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
+ TenantId = table.Column(nullable: true),
+ UserId = table.Column(nullable: false),
+ AllowAnonymous = table.Column(nullable: false),
+ AllowAddFriend = table.Column(nullable: false),
+ RequireAddFriendValition = table.Column(nullable: false),
+ AllowReceiveMessage = table.Column(nullable: false),
+ AllowSendMessage = table.Column(nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_AppUserChatSettings", x => x.Id);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "AppUserMessages",
+ columns: table => new
+ {
+ Id = table.Column(nullable: false)
+ .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
+ CreationTime = table.Column(nullable: false),
+ CreatorId = table.Column(nullable: true),
+ TenantId = table.Column(nullable: true),
+ MessageId = table.Column(nullable: false),
+ SendUserName = table.Column(maxLength: 64, nullable: false),
+ Content = table.Column(maxLength: 1048576, nullable: false),
+ Type = table.Column(nullable: false),
+ SendState = table.Column(nullable: false),
+ ReceiveUserId = table.Column(nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_AppUserMessages", x => x.Id);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "AppUserSpecialFocuss",
+ columns: table => new
+ {
+ Id = table.Column(nullable: false)
+ .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
+ CreationTime = table.Column(nullable: false),
+ CreatorId = table.Column(nullable: true),
+ TenantId = table.Column(nullable: true),
+ UserId = table.Column(nullable: false),
+ FocusUserId = table.Column(nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_AppUserSpecialFocuss", x => x.Id);
+ });
+
+ migrationBuilder.CreateIndex(
+ name: "IX_AppChatGroupAdmins_TenantId_GroupId",
+ table: "AppChatGroupAdmins",
+ columns: new[] { "TenantId", "GroupId" });
+
+ migrationBuilder.CreateIndex(
+ name: "IX_AppChatGroups_TenantId_Name",
+ table: "AppChatGroups",
+ columns: new[] { "TenantId", "Name" });
+
+ migrationBuilder.CreateIndex(
+ name: "IX_AppGroupChatBlacks_TenantId_GroupId",
+ table: "AppGroupChatBlacks",
+ columns: new[] { "TenantId", "GroupId" });
+
+ migrationBuilder.CreateIndex(
+ name: "IX_AppGroupMessages_TenantId_GroupId",
+ table: "AppGroupMessages",
+ columns: new[] { "TenantId", "GroupId" });
+
+ migrationBuilder.CreateIndex(
+ name: "IX_AppUserChatBlacks_TenantId_UserId",
+ table: "AppUserChatBlacks",
+ columns: new[] { "TenantId", "UserId" });
+
+ migrationBuilder.CreateIndex(
+ name: "IX_AppUserChatGroups_TenantId_GroupId_UserId",
+ table: "AppUserChatGroups",
+ columns: new[] { "TenantId", "GroupId", "UserId" });
+
+ migrationBuilder.CreateIndex(
+ name: "IX_AppUserChatSettings_TenantId_UserId",
+ table: "AppUserChatSettings",
+ columns: new[] { "TenantId", "UserId" });
+
+ migrationBuilder.CreateIndex(
+ name: "IX_AppUserMessages_TenantId_ReceiveUserId",
+ table: "AppUserMessages",
+ columns: new[] { "TenantId", "ReceiveUserId" });
+
+ migrationBuilder.CreateIndex(
+ name: "IX_AppUserSpecialFocuss_TenantId_UserId",
+ table: "AppUserSpecialFocuss",
+ columns: new[] { "TenantId", "UserId" });
+ }
+
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropTable(
+ name: "AppChatGroupAdmins");
+
+ migrationBuilder.DropTable(
+ name: "AppChatGroups");
+
+ migrationBuilder.DropTable(
+ name: "AppGroupChatBlacks");
+
+ migrationBuilder.DropTable(
+ name: "AppGroupMessages");
+
+ migrationBuilder.DropTable(
+ name: "AppUserChatBlacks");
+
+ migrationBuilder.DropTable(
+ name: "AppUserChatGroups");
+
+ migrationBuilder.DropTable(
+ name: "AppUserChatSettings");
+
+ migrationBuilder.DropTable(
+ name: "AppUserMessages");
+
+ migrationBuilder.DropTable(
+ name: "AppUserSpecialFocuss");
+
+ migrationBuilder.AlterColumn(
+ name: "ReadStatus",
+ table: "AppUserNotifications",
+ type: "tinyint",
+ nullable: false,
+ oldClrType: typeof(int));
+ }
+ }
+}
diff --git a/aspnet-core/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/MessageServiceHostMigrationsDbContextModelSnapshot.cs b/aspnet-core/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/MessageServiceHostMigrationsDbContextModelSnapshot.cs
index 8e253493d..8704b41fc 100644
--- a/aspnet-core/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/MessageServiceHostMigrationsDbContextModelSnapshot.cs
+++ b/aspnet-core/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/MessageServiceHostMigrationsDbContextModelSnapshot.cs
@@ -17,6 +17,370 @@ namespace LINGYUN.Abp.MessageService.Migrations
.HasAnnotation("ProductVersion", "3.1.3")
.HasAnnotation("Relational:MaxIdentifierLength", 64);
+ modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.ChatGroup", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint");
+
+ b.Property("Address")
+ .HasColumnType("varchar(256) CHARACTER SET utf8mb4")
+ .HasMaxLength(256);
+
+ b.Property("AllowAnonymous")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("AllowSendMessage")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("CreationTime")
+ .HasColumnName("CreationTime")
+ .HasColumnType("datetime(6)");
+
+ b.Property("CreatorId")
+ .HasColumnName("CreatorId")
+ .HasColumnType("char(36)");
+
+ b.Property("Description")
+ .HasColumnType("varchar(128) CHARACTER SET utf8mb4")
+ .HasMaxLength(128);
+
+ b.Property("GroupId")
+ .HasColumnType("bigint");
+
+ b.Property("LastModificationTime")
+ .HasColumnName("LastModificationTime")
+ .HasColumnType("datetime(6)");
+
+ b.Property("LastModifierId")
+ .HasColumnName("LastModifierId")
+ .HasColumnType("char(36)");
+
+ b.Property("MaxUserCount")
+ .HasColumnType("int");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("varchar(20) CHARACTER SET utf8mb4")
+ .HasMaxLength(20);
+
+ b.Property("Notice")
+ .HasColumnType("varchar(64) CHARACTER SET utf8mb4")
+ .HasMaxLength(64);
+
+ b.Property("Tag")
+ .HasColumnType("varchar(512) CHARACTER SET utf8mb4")
+ .HasMaxLength(512);
+
+ b.Property("TenantId")
+ .HasColumnName("TenantId")
+ .HasColumnType("char(36)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("TenantId", "Name");
+
+ b.ToTable("AppChatGroups");
+ });
+
+ modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.ChatGroupAdmin", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint");
+
+ b.Property("AllowAddPeople")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("AllowDissolveGroup")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("AllowKickPeople")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("AllowSendNotice")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("AllowSilence")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime(6)");
+
+ b.Property("CreatorId")
+ .HasColumnType("char(36)");
+
+ b.Property("GroupId")
+ .HasColumnType("bigint");
+
+ b.Property("IsSuperAdmin")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime(6)");
+
+ b.Property("LastModifierId")
+ .HasColumnType("char(36)");
+
+ b.Property("TenantId")
+ .HasColumnName("TenantId")
+ .HasColumnType("char(36)");
+
+ b.Property("UserId")
+ .HasColumnType("char(36)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("TenantId", "GroupId");
+
+ b.ToTable("AppChatGroupAdmins");
+ });
+
+ modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.GroupChatBlack", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime(6)");
+
+ b.Property("CreatorId")
+ .HasColumnType("char(36)");
+
+ b.Property("GroupId")
+ .HasColumnType("bigint");
+
+ b.Property("ShieldUserId")
+ .HasColumnType("char(36)");
+
+ b.Property("TenantId")
+ .HasColumnName("TenantId")
+ .HasColumnType("char(36)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("TenantId", "GroupId");
+
+ b.ToTable("AppGroupChatBlacks");
+ });
+
+ modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.GroupMessage", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint");
+
+ b.Property("Content")
+ .IsRequired()
+ .HasColumnType("longtext CHARACTER SET utf8mb4")
+ .HasMaxLength(1048576);
+
+ b.Property("CreationTime")
+ .HasColumnName("CreationTime")
+ .HasColumnType("datetime(6)");
+
+ b.Property("CreatorId")
+ .HasColumnType("char(36)");
+
+ b.Property("GroupId")
+ .HasColumnType("bigint");
+
+ b.Property("MessageId")
+ .HasColumnType("bigint");
+
+ b.Property("SendState")
+ .HasColumnType("tinyint");
+
+ b.Property("SendUserName")
+ .IsRequired()
+ .HasColumnType("varchar(64) CHARACTER SET utf8mb4")
+ .HasMaxLength(64);
+
+ b.Property("TenantId")
+ .HasColumnName("TenantId")
+ .HasColumnType("char(36)");
+
+ b.Property("Type")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.HasIndex("TenantId", "GroupId");
+
+ b.ToTable("AppGroupMessages");
+ });
+
+ modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.UserChatBlack", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime(6)");
+
+ b.Property("CreatorId")
+ .HasColumnType("char(36)");
+
+ b.Property("ShieldUserId")
+ .HasColumnType("char(36)");
+
+ b.Property("TenantId")
+ .HasColumnName("TenantId")
+ .HasColumnType("char(36)");
+
+ b.Property("UserId")
+ .HasColumnType("char(36)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("TenantId", "UserId");
+
+ b.ToTable("AppUserChatBlacks");
+ });
+
+ modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.UserChatGroup", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint");
+
+ b.Property("CreationTime")
+ .HasColumnName("CreationTime")
+ .HasColumnType("datetime(6)");
+
+ b.Property("CreatorId")
+ .HasColumnName("CreatorId")
+ .HasColumnType("char(36)");
+
+ b.Property("GroupId")
+ .HasColumnType("bigint");
+
+ b.Property("TenantId")
+ .HasColumnName("TenantId")
+ .HasColumnType("char(36)");
+
+ b.Property("UserId")
+ .HasColumnType("char(36)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("TenantId", "GroupId", "UserId");
+
+ b.ToTable("AppUserChatGroups");
+ });
+
+ modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.UserChatSetting", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint");
+
+ b.Property("AllowAddFriend")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("AllowAnonymous")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("AllowReceiveMessage")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("AllowSendMessage")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("RequireAddFriendValition")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("TenantId")
+ .HasColumnName("TenantId")
+ .HasColumnType("char(36)");
+
+ b.Property("UserId")
+ .HasColumnType("char(36)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("TenantId", "UserId");
+
+ b.ToTable("AppUserChatSettings");
+ });
+
+ modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.UserMessage", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint");
+
+ b.Property("Content")
+ .IsRequired()
+ .HasColumnType("longtext CHARACTER SET utf8mb4")
+ .HasMaxLength(1048576);
+
+ b.Property("CreationTime")
+ .HasColumnName("CreationTime")
+ .HasColumnType("datetime(6)");
+
+ b.Property("CreatorId")
+ .HasColumnType("char(36)");
+
+ b.Property("MessageId")
+ .HasColumnType("bigint");
+
+ b.Property