// 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 } } }