From a3073981724a1ec991c572b85f22cd1f1b1df89e Mon Sep 17 00:00:00 2001 From: kolosovpetro Date: Sun, 12 Mar 2023 13:05:45 +0100 Subject: [PATCH 01/71] chat and user chat entities updated --- .../Communities/ArchiveChatCommandHandler.cs | 2 +- .../CreateChannelCommandHandler.cs | 44 +- .../Communities/CreateChatCommandHandler.cs | 56 +- .../Communities/JoinChatCommandHandler.cs | 12 +- .../Communities/LeaveGroupCommandHandler.cs | 4 +- .../UpdateChannelPictureCommandHandler.cs | 8 +- .../Messages/DeleteMessageCommandHandler.cs | 42 +- .../Messages/EditMessageCommandHandler.cs | 27 +- .../Messages/SendMessageCommandHandler.cs | 16 +- .../Users/RegisterCommandHandler.cs | 86 +- .../UpdateUserAccountInfoCommandHandler.cs | 6 +- .../Constants/ResponseMessageCodes.cs | 14 +- MangoAPI.Domain/Entities/ChatEntity.cs | 112 +- MangoAPI.Domain/Entities/UserChatEntity.cs | 42 +- .../Configurations/ChatEntityConfiguration.cs | 274 +-- .../MessageEntityConfiguration.cs | 498 ++--- .../UserChatEntityConfiguration.cs | 374 ++-- .../UserContactEntityConfiguration.cs | 428 ++-- .../Configurations/UserEntityConfiguration.cs | 300 +-- .../UserInformationEntityConfiguration.cs | 238 +-- .../20221104214809_Initial.Designer.cs | 1822 ----------------- .../Migrations/20221104214809_Initial.cs | 749 ------- ..._PasswordRestoreRequestDeleted.Designer.cs | 1784 ---------------- ...306205653_PasswordRestoreRequestDeleted.cs | 1393 ------------- ...20230309161806_UserNameChanged.Designer.cs | 1784 ---------------- .../20230309161806_UserNameChanged.cs | 1386 ------------- ...11151701_MessageEntityFileName.Designer.cs | 1784 ---------------- .../20230311151701_MessageEntityFileName.cs | 1372 ------------- ...0230312114248_InitialMigration.Designer.cs | 676 ++++++ .../20230312114248_InitialMigration.cs | 534 +++++ .../Migrations/MangoDbContextModelSnapshot.cs | 1108 ---------- 31 files changed, 2574 insertions(+), 14401 deletions(-) delete mode 100644 MangoAPI.Infrastructure/Migrations/20221104214809_Initial.Designer.cs delete mode 100644 MangoAPI.Infrastructure/Migrations/20221104214809_Initial.cs delete mode 100644 MangoAPI.Infrastructure/Migrations/20230306205653_PasswordRestoreRequestDeleted.Designer.cs delete mode 100644 MangoAPI.Infrastructure/Migrations/20230306205653_PasswordRestoreRequestDeleted.cs delete mode 100644 MangoAPI.Infrastructure/Migrations/20230309161806_UserNameChanged.Designer.cs delete mode 100644 MangoAPI.Infrastructure/Migrations/20230309161806_UserNameChanged.cs delete mode 100644 MangoAPI.Infrastructure/Migrations/20230311151701_MessageEntityFileName.Designer.cs delete mode 100644 MangoAPI.Infrastructure/Migrations/20230311151701_MessageEntityFileName.cs create mode 100644 MangoAPI.Infrastructure/Migrations/20230312114248_InitialMigration.Designer.cs create mode 100644 MangoAPI.Infrastructure/Migrations/20230312114248_InitialMigration.cs diff --git a/MangoAPI.BusinessLogic/ApiCommands/Communities/ArchiveChatCommandHandler.cs b/MangoAPI.BusinessLogic/ApiCommands/Communities/ArchiveChatCommandHandler.cs index d51fbac3f..735f98494 100644 --- a/MangoAPI.BusinessLogic/ApiCommands/Communities/ArchiveChatCommandHandler.cs +++ b/MangoAPI.BusinessLogic/ApiCommands/Communities/ArchiveChatCommandHandler.cs @@ -40,7 +40,7 @@ public async Task> Handle( return responseFactory.ConflictResponse(errorMessage, details); } - chat.IsArchived = !chat.IsArchived; + chat.Archive(); dbContext.UserChats.Update(chat); diff --git a/MangoAPI.BusinessLogic/ApiCommands/Communities/CreateChannelCommandHandler.cs b/MangoAPI.BusinessLogic/ApiCommands/Communities/CreateChannelCommandHandler.cs index afbdde184..f1ac244da 100644 --- a/MangoAPI.BusinessLogic/ApiCommands/Communities/CreateChannelCommandHandler.cs +++ b/MangoAPI.BusinessLogic/ApiCommands/Communities/CreateChannelCommandHandler.cs @@ -18,6 +18,7 @@ namespace MangoAPI.BusinessLogic.ApiCommands.Communities; public class CreateChannelCommandHandler : IRequestHandler> { + private const string DefaultChannelImage = "default_group_logo.png"; private readonly MangoDbContext dbContext; private readonly IHubContext hubContext; private readonly ResponseFactory responseFactory; @@ -49,30 +50,35 @@ await dbContext.UserChats return responseFactory.ConflictResponse(errorMessage, description); } - var channel = new ChatEntity - { - CommunityType = CommunityType.PublicChannel, - Title = request.ChannelTitle, - CreatedAt = DateTime.UtcNow, - Description = request.ChannelDescription, - MembersCount = 1, - Image = "default_group_logo.png", - }; + // var channel = new ChatEntity + // { + // CommunityType = CommunityType.PublicChannel, + // Title = request.ChannelTitle, + // CreatedAt = DateTime.UtcNow, + // Description = request.ChannelDescription, + // MembersCount = 1, + // Image = "default_group_logo.png", + // }; - dbContext.Chats.Add(channel); + var chat = ChatEntity.Create( + request.ChannelTitle, + CommunityType.PublicChannel, + request.ChannelDescription, + DefaultChannelImage, + DateTime.UtcNow, + membersCount: 1); - dbContext.UserChats.Add(new UserChatEntity - { - ChatId = channel.Id, - RoleId = UserRole.Owner, - UserId = request.UserId, - }); + var userChat = UserChatEntity.Create(request.UserId, chat.Id, UserRole.Owner); + + dbContext.Chats.Add(chat); + + dbContext.UserChats.Add(userChat); await dbContext.SaveChangesAsync(cancellationToken); - var chatDto = channel.ToChatDto(); + var chatDto = chat.ToChatDto(); await hubContext.Clients.Group(request.UserId.ToString()).UpdateUserChatsAsync(chatDto); - return responseFactory.SuccessResponse(CreateCommunityResponse.FromSuccess(channel)); + return responseFactory.SuccessResponse(CreateCommunityResponse.FromSuccess(chat)); } -} +} \ No newline at end of file diff --git a/MangoAPI.BusinessLogic/ApiCommands/Communities/CreateChatCommandHandler.cs b/MangoAPI.BusinessLogic/ApiCommands/Communities/CreateChatCommandHandler.cs index 2e850e5dd..6b0512f38 100644 --- a/MangoAPI.BusinessLogic/ApiCommands/Communities/CreateChatCommandHandler.cs +++ b/MangoAPI.BusinessLogic/ApiCommands/Communities/CreateChatCommandHandler.cs @@ -74,30 +74,44 @@ public async Task> Handle( return responseFactory.SuccessResponse(CreateCommunityResponse.FromSuccess(existingChat)); } - var chatEntity = new ChatEntity - { - Id = Guid.NewGuid(), - CommunityType = CommunityType.DirectChat, - Title = $"{currentUserDisplayName} / {partner.DisplayName}", - CreatedAt = DateTime.UtcNow, - Description = $"Direct chat between {currentUserDisplayName} and {partner.DisplayName}", - MembersCount = 2, - }; - - var userChats = new[] - { - new UserChatEntity { ChatId = chatEntity.Id, RoleId = UserRole.User, UserId = request.UserId }, - new UserChatEntity { ChatId = chatEntity.Id, RoleId = UserRole.User, UserId = request.PartnerId }, - }; - - dbContext.Chats.Add(chatEntity); - dbContext.UserChats.AddRange(userChats); + // var chatEntity = new ChatEntity + // { + // Id = Guid.NewGuid(), + // CommunityType = CommunityType.DirectChat, + // Title = $"{currentUserDisplayName} / {partner.DisplayName}", + // CreatedAt = DateTime.UtcNow, + // Description = $"Direct chat between {currentUserDisplayName} and {partner.DisplayName}", + // MembersCount = 2, + // }; + + var title = $"{currentUserDisplayName} / {partner.DisplayName}"; + var description = $"Direct chat between {currentUserDisplayName} and {partner.DisplayName}"; + + var chat = ChatEntity.Create( + title, + CommunityType.DirectChat, + description, + image: null, + DateTime.UtcNow, + membersCount: 2); + + var senderUserChat = UserChatEntity.Create(request.UserId, chat.Id, UserRole.User); + var receiverUserChat = UserChatEntity.Create(request.PartnerId, chat.Id, UserRole.User); + + // var userChats = new[] + // { + // new UserChatEntity { ChatId = chat.Id, RoleId = UserRole.User, UserId = request.UserId }, + // new UserChatEntity { ChatId = chat.Id, RoleId = UserRole.User, UserId = request.PartnerId }, + // }; + + dbContext.Chats.Add(chat); + dbContext.UserChats.AddRange(senderUserChat, receiverUserChat); await dbContext.SaveChangesAsync(cancellationToken); - var chatDto = chatEntity.ToChatDto(); + var chatDto = chat.ToChatDto(); await hubContext.Clients.Group(request.UserId.ToString()).UpdateUserChatsAsync(chatDto); - return responseFactory.SuccessResponse(CreateCommunityResponse.FromSuccess(chatEntity)); + return responseFactory.SuccessResponse(CreateCommunityResponse.FromSuccess(chat)); } -} +} \ No newline at end of file diff --git a/MangoAPI.BusinessLogic/ApiCommands/Communities/JoinChatCommandHandler.cs b/MangoAPI.BusinessLogic/ApiCommands/Communities/JoinChatCommandHandler.cs index cbafae9ef..c310d3417 100644 --- a/MangoAPI.BusinessLogic/ApiCommands/Communities/JoinChatCommandHandler.cs +++ b/MangoAPI.BusinessLogic/ApiCommands/Communities/JoinChatCommandHandler.cs @@ -53,16 +53,12 @@ public async Task> Handle( return responseFactory.ConflictResponse(errorMessage, details); } + + var userChat = UserChatEntity.Create(request.UserId, request.ChatId, UserRole.User); - dbContext.UserChats.Add( - new UserChatEntity - { - ChatId = request.ChatId, - UserId = request.UserId, - RoleId = UserRole.User, - }); + dbContext.UserChats.Add(userChat); - chat.MembersCount += 1; + chat.IncrementMembersCount(1); dbContext.Update(chat); diff --git a/MangoAPI.BusinessLogic/ApiCommands/Communities/LeaveGroupCommandHandler.cs b/MangoAPI.BusinessLogic/ApiCommands/Communities/LeaveGroupCommandHandler.cs index e1cd4b899..b11678c6d 100644 --- a/MangoAPI.BusinessLogic/ApiCommands/Communities/LeaveGroupCommandHandler.cs +++ b/MangoAPI.BusinessLogic/ApiCommands/Communities/LeaveGroupCommandHandler.cs @@ -68,11 +68,11 @@ public async Task> Handle( } dbContext.UserChats.Remove(userChat); - chat.MembersCount--; + chat.IncrementMembersCount(-1); dbContext.Update(chat); await dbContext.SaveChangesAsync(cancellationToken); return responseFactory.SuccessResponse(LeaveGroupResponse.FromSuccess(chat.Id)); } -} +} \ No newline at end of file diff --git a/MangoAPI.BusinessLogic/ApiCommands/Communities/UpdateChannelPictureCommandHandler.cs b/MangoAPI.BusinessLogic/ApiCommands/Communities/UpdateChannelPictureCommandHandler.cs index e759e0ef2..f81eaafa8 100644 --- a/MangoAPI.BusinessLogic/ApiCommands/Communities/UpdateChannelPictureCommandHandler.cs +++ b/MangoAPI.BusinessLogic/ApiCommands/Communities/UpdateChannelPictureCommandHandler.cs @@ -72,14 +72,12 @@ public async Task> Handle( var newUserPicture = new DocumentEntity { - FileName = uniqueFileName, - UserId = request.UserId, - UploadedAt = DateTime.UtcNow, + FileName = uniqueFileName, UserId = request.UserId, UploadedAt = DateTime.UtcNow, }; dbContext.Documents.Add(newUserPicture); - userChat.Chat.Image = uniqueFileName; + userChat.Chat.ChangeChatImage(uniqueFileName); dbContext.Update(userChat.Chat); @@ -90,4 +88,4 @@ public async Task> Handle( return responseFactory.SuccessResponse(response); } -} +} \ No newline at end of file diff --git a/MangoAPI.BusinessLogic/ApiCommands/Messages/DeleteMessageCommandHandler.cs b/MangoAPI.BusinessLogic/ApiCommands/Messages/DeleteMessageCommandHandler.cs index 7860c589e..2591a5baa 100644 --- a/MangoAPI.BusinessLogic/ApiCommands/Messages/DeleteMessageCommandHandler.cs +++ b/MangoAPI.BusinessLogic/ApiCommands/Messages/DeleteMessageCommandHandler.cs @@ -33,10 +33,11 @@ public async Task> Handle( DeleteMessageCommand request, CancellationToken cancellationToken) { - var isMessageExists = await dbContext.Messages - .AnyAsync(t => t.Id == request.MessageId, cancellationToken); + var checkMessage = await dbContext.Messages + .Include(x => x.User) + .FirstOrDefaultAsync(t => t.Id == request.MessageId, cancellationToken); - if (!isMessageExists) + if (checkMessage == null) { const string errorMessage = ResponseMessageCodes.MessageNotFound; var errorDescription = ResponseMessageCodes.ErrorDictionary[errorMessage]; @@ -44,18 +45,23 @@ public async Task> Handle( return responseFactory.ConflictResponse(errorMessage, errorDescription); } + if (checkMessage.User.Id != request.UserId) + { + const string errorMessage = ResponseMessageCodes.Unauthorized; + var errorDescription = ResponseMessageCodes.ErrorDictionary[errorMessage]; + + return responseFactory.ConflictResponse(errorMessage, errorDescription); + } + var query = dbContext.UserChats .Include(x => x.Chat) .ThenInclude(x => x.Messages) .ThenInclude(x => x.User) .Where(x => x.ChatId == request.ChatId && x.UserId == request.UserId) - .Select(x => x.Chat) - .Where(x => isMessageExists); + .Select(x => x.Chat); var chat = await query.FirstOrDefaultAsync(cancellationToken); - // TODO: separate concerns, it is not immediately clear which is null, chat or message? - // TODO: update tests as well if (chat == null) { const string errorMessage = ResponseMessageCodes.ChatNotFound; @@ -65,12 +71,10 @@ public async Task> Handle( } var message = chat.Messages.First(x => x.Id == request.MessageId); + dbContext.Entry(message.User).State = EntityState.Detached; - var messageDeleteNotification = new MessageDeleteNotification - { - MessageId = request.MessageId, - }; + var messageDeleteNotification = new MessageDeleteNotification { MessageId = request.MessageId, }; var messageIsLast = chat.LastMessageId.HasValue && chat.LastMessageId == request.MessageId; @@ -84,10 +88,16 @@ public async Task> Handle( messageDeleteNotification.NewLastMessageText = newLastMessage?.Content; messageDeleteNotification.NewLastMessageTime = newLastMessage?.CreatedAt; - chat.LastMessageAuthor = newLastMessage?.User?.DisplayName; - chat.LastMessageId = newLastMessage?.Id; - chat.LastMessageText = newLastMessage?.Content; - chat.LastMessageTime = newLastMessage?.CreatedAt; + // chat.LastMessageAuthor = newLastMessage?.User?.DisplayName; + // chat.LastMessageId = newLastMessage?.Id; + // chat.LastMessageText = newLastMessage?.Content; + // chat.LastMessageTime = newLastMessage?.CreatedAt; + + chat.UpdateLastMessage( + lastMessageAuthor: newLastMessage?.User?.DisplayName, + lastMessageText: newLastMessage?.Content, + newLastMessage?.CreatedAt, + newLastMessage?.Id); } dbContext.Messages.Remove(message); @@ -99,4 +109,4 @@ public async Task> Handle( return responseFactory.SuccessResponse(DeleteMessageResponse.FromSuccess(message)); } -} +} \ No newline at end of file diff --git a/MangoAPI.BusinessLogic/ApiCommands/Messages/EditMessageCommandHandler.cs b/MangoAPI.BusinessLogic/ApiCommands/Messages/EditMessageCommandHandler.cs index f5375e81a..f704c193d 100644 --- a/MangoAPI.BusinessLogic/ApiCommands/Messages/EditMessageCommandHandler.cs +++ b/MangoAPI.BusinessLogic/ApiCommands/Messages/EditMessageCommandHandler.cs @@ -34,10 +34,11 @@ public async Task> Handle( EditMessageCommand request, CancellationToken cancellationToken) { - var isMessageExists = await dbContext.Messages - .AnyAsync(t => t.Id == request.MessageId, cancellationToken); + var checkMessage = await dbContext.Messages + .Include(x => x.User) + .FirstOrDefaultAsync(t => t.Id == request.MessageId, cancellationToken); - if (!isMessageExists) + if (checkMessage == null) { const string errorMessage = ResponseMessageCodes.MessageNotFound; var errorDescription = ResponseMessageCodes.ErrorDictionary[errorMessage]; @@ -45,13 +46,20 @@ public async Task> Handle( return responseFactory.ConflictResponse(errorMessage, errorDescription); } + if (checkMessage.User.Id != request.UserId) + { + const string errorMessage = ResponseMessageCodes.Unauthorized; + var errorDescription = ResponseMessageCodes.ErrorDictionary[errorMessage]; + + return responseFactory.ConflictResponse(errorMessage, errorDescription); + } + var query = dbContext.UserChats .Include(x => x.Chat) .ThenInclude(x => x.Messages) .ThenInclude(x => x.User) .Where(x => x.ChatId == request.ChatId && x.UserId == request.UserId) - .Select(x => x.Chat) - .Where(x => isMessageExists); + .Select(x => x.Chat); var chat = await query.FirstOrDefaultAsync(cancellationToken); @@ -70,12 +78,13 @@ public async Task> Handle( var updatedAt = DateTime.UtcNow; message.Content = request.ModifiedText; - message.UpdatedAt = DateTime.UtcNow; + message.UpdatedAt = updatedAt; if (messageIsLast) { - chat.LastMessageText = request.ModifiedText; - chat.LastMessageTime = updatedAt; + // chat.LastMessageText = request.ModifiedText; + // chat.LastMessageTime = updatedAt; + chat.UpdateLastMessage(request.ModifiedText, updatedAt); } dbContext.Messages.Update(message); @@ -96,4 +105,4 @@ await hubContext.Clients.Group(message.ChatId.ToString()) return responseFactory.SuccessResponse(DeleteMessageResponse.FromSuccess(message)); } -} +} \ No newline at end of file diff --git a/MangoAPI.BusinessLogic/ApiCommands/Messages/SendMessageCommandHandler.cs b/MangoAPI.BusinessLogic/ApiCommands/Messages/SendMessageCommandHandler.cs index 5559fa268..78c04cf8f 100644 --- a/MangoAPI.BusinessLogic/ApiCommands/Messages/SendMessageCommandHandler.cs +++ b/MangoAPI.BusinessLogic/ApiCommands/Messages/SendMessageCommandHandler.cs @@ -86,11 +86,17 @@ public async Task> Handle( InReplayToText = request.InReplayToText, }; - userChat.Chat.UpdatedAt = messageEntity.CreatedAt; - userChat.Chat.LastMessageAuthor = user.DisplayName; - userChat.Chat.LastMessageText = messageEntity.Content; - userChat.Chat.LastMessageTime = messageEntity.CreatedAt; - userChat.Chat.LastMessageId = messageEntity.Id; + // userChat.Chat.UpdatedAt = messageEntity.CreatedAt; + // userChat.Chat.LastMessageAuthor = user.DisplayName; + // userChat.Chat.LastMessageText = messageEntity.Content; + // userChat.Chat.LastMessageTime = messageEntity.CreatedAt; + // userChat.Chat.LastMessageId = messageEntity.Id; + + userChat.Chat.UpdateLastMessage( + lastMessageAuthor: user.DisplayName, + lastMessageText: messageEntity.Content, + messageEntity.CreatedAt, + messageEntity.Id); dbContext.Chats.Update(userChat.Chat); dbContext.Messages.Add(messageEntity); diff --git a/MangoAPI.BusinessLogic/ApiCommands/Users/RegisterCommandHandler.cs b/MangoAPI.BusinessLogic/ApiCommands/Users/RegisterCommandHandler.cs index 5af2e7a47..41439faaf 100644 --- a/MangoAPI.BusinessLogic/ApiCommands/Users/RegisterCommandHandler.cs +++ b/MangoAPI.BusinessLogic/ApiCommands/Users/RegisterCommandHandler.cs @@ -22,8 +22,8 @@ public class RegisterCommandHandler : IRequestHandler responseFactory, IBlobServiceSettings blobServiceSettings, - PasswordHashService passwordHashService, - IMangoUserSettings mangoUserSettings, + PasswordHashService passwordHashService, + IMangoUserSettings mangoUserSettings, IAvatarService avatarService) { this.userManager = userManager; @@ -78,7 +78,7 @@ public async Task> Handle(RegisterCommand request, Cancel var color = new Random().Next(11); var defaultAvatar = avatarService.GetRandomAvatar(); - + var newUser = new UserEntity { DisplayName = request.DisplayName, @@ -91,11 +91,7 @@ public async Task> Handle(RegisterCommand request, Cancel await userManager.CreateAsync(newUser, request.Password); - var userInfo = new UserInformationEntity - { - UserId = newUser.Id, - CreatedAt = DateTime.UtcNow, - }; + var userInfo = new UserInformationEntity { UserId = newUser.Id, CreatedAt = DateTime.UtcNow, }; dbContext.UserInformation.Add(userInfo); @@ -111,7 +107,8 @@ public async Task> Handle(RegisterCommand request, Cancel dbContext.Sessions.Add(session); - var isMangoUserExists = await dbContext.Users.AnyAsync(x => x.Id == SeedDataConstants.MangoId, cancellationToken); + var isMangoUserExists = + await dbContext.Users.AnyAsync(x => x.Id == SeedDataConstants.MangoId, cancellationToken); if (isMangoUserExists == false) { @@ -119,24 +116,29 @@ public async Task> Handle(RegisterCommand request, Cancel dbContext.Users.Add(mangoUser); } - var mangoChatEntity = new ChatEntity - { - Id = Guid.NewGuid(), - CommunityType = CommunityType.DirectChat, - Title = "Mango Messenger", - CreatedAt = DateTime.UtcNow, - Description = "Service notifications", - MembersCount = 2 - }; - - var userChats = new[] - { - new UserChatEntity { ChatId = mangoChatEntity.Id, RoleId = UserRole.User, UserId = newUser.Id }, - new UserChatEntity { ChatId = mangoChatEntity.Id, RoleId = UserRole.User, UserId = SeedDataConstants.MangoId } - }; - - dbContext.Chats.Add(mangoChatEntity); - dbContext.UserChats.AddRange(userChats); + // var mangoChatEntity = new ChatEntity + // { + // Id = Guid.NewGuid(), + // CommunityType = CommunityType.DirectChat, + // Title = "Mango Messenger", + // CreatedAt = DateTime.UtcNow, + // Description = "Service notifications", + // MembersCount = 2 + // }; + + const string title = "Mango Messenger"; + const string description = "Service notifications"; + + var mangoChatEntity = ChatEntity.Create( + title, + CommunityType.DirectChat, + description, + mangoUser.Image, + DateTime.UtcNow, + membersCount: 2); + + var senderChat = UserChatEntity.Create(newUser.Id, mangoChatEntity.Id, UserRole.User); + var receiverChat = UserChatEntity.Create(userId: SeedDataConstants.MangoId, mangoChatEntity.Id, UserRole.User); var firstMessage = new MessageEntity { @@ -145,7 +147,7 @@ public async Task> Handle(RegisterCommand request, Cancel ChatId = mangoChatEntity.Id, Content = GreetingsConstants.Hello, }; - + var secondMessage = new MessageEntity { Id = Guid.NewGuid(), @@ -153,16 +155,22 @@ public async Task> Handle(RegisterCommand request, Cancel ChatId = mangoChatEntity.Id, Content = GreetingsConstants.Guide, }; - - mangoChatEntity.LastMessageId = secondMessage.Id; - mangoChatEntity.LastMessageAuthor = mangoUser.DisplayName; - mangoChatEntity.LastMessageText = secondMessage.Content; - mangoChatEntity.LastMessageTime = secondMessage.CreatedAt; + + // mangoChatEntity.LastMessageId = secondMessage.Id; + // mangoChatEntity.LastMessageAuthor = mangoUser.DisplayName; + // mangoChatEntity.LastMessageText = secondMessage.Content; + // mangoChatEntity.LastMessageTime = secondMessage.CreatedAt; + + mangoChatEntity.UpdateLastMessage( + lastMessageAuthor: mangoUser.DisplayName, + lastMessageText: secondMessage.Content, + secondMessage.CreatedAt, + secondMessage.Id); dbContext.Chats.Add(mangoChatEntity); - dbContext.UserChats.AddRange(userChats); + dbContext.UserChats.AddRange(senderChat, receiverChat); dbContext.Messages.AddRange(firstMessage, secondMessage); - + await dbContext.SaveChangesAsync(cancellationToken); var expires = ((DateTimeOffset)session.ExpiresAt).ToUnixTimeSeconds(); @@ -181,4 +189,4 @@ public async Task> Handle(RegisterCommand request, Cancel return result; } -} +} \ No newline at end of file diff --git a/MangoAPI.BusinessLogic/ApiCommands/Users/UpdateUserAccountInfoCommandHandler.cs b/MangoAPI.BusinessLogic/ApiCommands/Users/UpdateUserAccountInfoCommandHandler.cs index d3a61bccc..e5abd30a0 100644 --- a/MangoAPI.BusinessLogic/ApiCommands/Users/UpdateUserAccountInfoCommandHandler.cs +++ b/MangoAPI.BusinessLogic/ApiCommands/Users/UpdateUserAccountInfoCommandHandler.cs @@ -54,7 +54,7 @@ public async Task> Handle( foreach (var chatEntity in userChats) { var newTitle = chatEntity.Title.Replace(user.DisplayName, request.DisplayName); - chatEntity.Title = newTitle; + chatEntity.UpdateTitle(newTitle); } user.DisplayName = request.DisplayName; @@ -69,7 +69,7 @@ public async Task> Handle( user.UserName = request.Username; user.UserNameChanged = true; - + user.Bio = request.Bio; user.UserInformation.Address = request.Address; @@ -82,4 +82,4 @@ public async Task> Handle( return responseFactory.SuccessResponse(ResponseBase.SuccessResponse); } -} +} \ No newline at end of file diff --git a/MangoAPI.Domain/Constants/ResponseMessageCodes.cs b/MangoAPI.Domain/Constants/ResponseMessageCodes.cs index a7a59c549..07dc699b9 100644 --- a/MangoAPI.Domain/Constants/ResponseMessageCodes.cs +++ b/MangoAPI.Domain/Constants/ResponseMessageCodes.cs @@ -13,7 +13,6 @@ public static class ResponseMessageCodes public const string UserAlreadyExists = "USER_ALREADY_EXISTS"; public const string InvalidCredentials = "INVALID_CREDENTIALS"; public const string UserNotFound = "USER_NOT_FOUND"; - public const string EmailAlreadyVerified = "EMAIL_ALREADY_VERIFIED"; public const string PermissionDenied = "PERMISSION_DENIED"; public const string ChatNotFound = "CHAT_NOT_FOUND"; public const string UserAlreadyJoinedGroup = "USER_ALREADY_JOINED_GROUP"; @@ -21,15 +20,10 @@ public static class ResponseMessageCodes public const string ContactNotFound = "CONTACT_NOT_FOUND"; public const string CannotAddSelfToContacts = "CANNOT_ADD_SELF_TO_CONTACTS"; public const string CannotCreateSelfChat = "CANNOT_CREATE_SELF_CHAT"; - public const string InvalidOrExpiredRestorePasswordRequest = "INVALID_OR_EXPIRED_RESTORE_PASSWORD_REQUEST"; public const string MaximumOwnerChatsExceeded100 = "MAXIMUM_OWNER_CHATS_EXCEEDED_100"; - public const string InvalidEmailConfirmationCode = "INVALID_EMAIL_CONFIRMATION_CODE"; public const string InvalidRequestModel = "INVALID_REQUEST_FORMAT"; - public const string ChangePasswordRequestExists = "CHANGE_PASSWORD_REQUEST_EXISTS_ALREADY"; public const string KeyExchangeRequestNotFound = "KEY_EXCHANGE_REQUEST_NOT_FOUND"; public const string UploadedDocumentsLimitReached10 = "UPLOADED_DOCUMENTS_LIMIT_REACHED"; - public const string EmailIsNotVerified = "EMAIL_IS_NOT_VERIFIED"; - public const string SessionNotFound = "SESSION_NOT_FOUND"; public const string MessageNotFound = "MESSAGE_NOT_FOUND"; public const string DhParameterNotFound = "DH_PARAMETER_NOT_FOUND"; public const string TokensNotFound = "TOKENS_NOT_FOUND"; @@ -42,7 +36,6 @@ public static class ResponseMessageCodes { UserAlreadyExists, "User already exists in the system." }, { InvalidCredentials, "Invalid credentials. Please, enter valid email and password." }, { UserNotFound, "User not found in the system." }, - { EmailAlreadyVerified, "Email address of your account is already confirmed." }, { PermissionDenied, "You are not authorized to perform this action." }, { ChatNotFound, "Cannot found this chat it the system." }, { UserAlreadyJoinedGroup, "You are already a member of the community." }, @@ -50,21 +43,16 @@ public static class ResponseMessageCodes { ContactNotFound, "User is not found in your contact list." }, { CannotAddSelfToContacts, "You cannot add yourself to the contacts." }, { CannotCreateSelfChat, "You cannot create a direct chat with yourself." }, - { InvalidOrExpiredRestorePasswordRequest, "Invalid or expired restore password request. Try again." }, { MaximumOwnerChatsExceeded100, "One user cannot create more than 100 channels." }, - { InvalidEmailConfirmationCode, "Email confirmation code is invalid. Try again." }, { InvalidRequestModel, "Invalid request format. Correct input data and try again." }, { KeyExchangeRequestNotFound, "Key exchange request not found. Either request is not submitted yet or declined." }, - { ChangePasswordRequestExists, "Change password request already sent. Verify your email." }, { UploadedDocumentsLimitReached10, "You have reached maximum amount of documents upload 10. Try again in 1 hour." }, - { EmailIsNotVerified, "Your email is not verified. Check your inbox for confirmation link." }, - { SessionNotFound, "Session not found." }, { MessageNotFound, "Message doesn't found in the system" }, { DhParameterNotFound, "Diffie-Hellman parameter is not initialized. Please initialize first." }, { TokensNotFound, "Tokens not found. Please login to the system first." }, @@ -72,4 +60,4 @@ public static class ResponseMessageCodes { KeyExchangeDoesNotBelongToUser, "Key exchange does not belong to you." }, { Unauthorized, "User not authorized, please, sign in." }, }; -} +} \ No newline at end of file diff --git a/MangoAPI.Domain/Entities/ChatEntity.cs b/MangoAPI.Domain/Entities/ChatEntity.cs index da8ff7bab..10d7f9f7a 100644 --- a/MangoAPI.Domain/Entities/ChatEntity.cs +++ b/MangoAPI.Domain/Entities/ChatEntity.cs @@ -6,31 +6,113 @@ namespace MangoAPI.Domain.Entities; public sealed class ChatEntity { - public Guid Id { get; set; } + public Guid Id { get; private set; } - public string Title { get; set; } + public string Title { get; private set; } - public CommunityType CommunityType { get; set; } + public CommunityType CommunityType { get; private set; } - public string Description { get; set; } + public string Description { get; private set; } - public string Image { get; set; } + public string Image { get; private set; } - public DateTime CreatedAt { get; set; } + public DateTime CreatedAt { get; private set; } - public DateTime? UpdatedAt { get; set; } + public DateTime? UpdatedAt { get; private set; } - public int MembersCount { get; set; } + public int MembersCount { get; private set; } - public string LastMessageAuthor { get; set; } + public string LastMessageAuthor { get; private set; } - public string LastMessageText { get; set; } + public string LastMessageText { get; private set; } - public DateTime? LastMessageTime { get; set; } + public DateTime? LastMessageTime { get; private set; } - public Guid? LastMessageId { get; set; } + public Guid? LastMessageId { get; private set; } - public ICollection Messages { get; set; } + public ICollection Messages => _messages; + private readonly List _messages; - public ICollection ChatUsers { get; set; } -} + public ICollection ChatUsers => _chatUsers; + private readonly List _chatUsers; + + private ChatEntity() + { + } + + private ChatEntity( + string title, + CommunityType communityType, + string description, + string image, + DateTime createdAt, + int membersCount) : base() + { + Title = title; + CommunityType = communityType; + Description = description; + Image = image; + CreatedAt = createdAt; + MembersCount = membersCount; + + _messages = new List(); + _chatUsers = new List(); + Id = Guid.NewGuid(); + } + + public static ChatEntity Create( + string title, + CommunityType communityType, + string description, + string image, + DateTime createdAt, + int membersCount) + { + var newChat = new ChatEntity(title, communityType, description, image, createdAt, membersCount); + + return newChat; + } + + public void IncrementMembersCount(int value) + { + MembersCount += value; + } + + public void ChangeChatImage(string fileName) + { + Image = fileName; + } + + public void UpdateLastMessage( + string lastMessageAuthor, + string lastMessageText, + DateTime? lastMessageTime, + Guid? lastMessageId) + { + LastMessageAuthor = lastMessageAuthor; + LastMessageText = lastMessageText; + LastMessageTime = lastMessageTime; + LastMessageId = lastMessageId; + } + + public void UpdateLastMessage(string lastMessageText, DateTime lastMessageDate) + { + LastMessageText = lastMessageText; + LastMessageTime = lastMessageDate; + } + + public void UpdateTitle(string title) + { + Title = title; + } + + // var channel = new ChatEntity + // { + // CommunityType = CommunityType.PublicChannel, + // Title = request.ChannelTitle, + // CreatedAt = DateTime.UtcNow, + // Description = request.ChannelDescription, + // MembersCount = 1, + // Image = "default_group_logo.png", + // }; +} \ No newline at end of file diff --git a/MangoAPI.Domain/Entities/UserChatEntity.cs b/MangoAPI.Domain/Entities/UserChatEntity.cs index 322f24c1e..c49172adc 100644 --- a/MangoAPI.Domain/Entities/UserChatEntity.cs +++ b/MangoAPI.Domain/Entities/UserChatEntity.cs @@ -5,15 +5,43 @@ namespace MangoAPI.Domain.Entities; public sealed class UserChatEntity { - public Guid UserId { get; set; } + public Guid UserId { get; private set; } - public Guid ChatId { get; set; } + public Guid ChatId { get; private set; } - public UserRole RoleId { get; set; } + public UserRole RoleId { get; private set; } - public bool IsArchived { get; set; } + public bool IsArchived { get; private set; } - public UserEntity User { get; set; } + public UserEntity User { get; private set; } - public ChatEntity Chat { get; set; } -} + public ChatEntity Chat { get; private set; } + + // dbContext.UserChats.Add(new UserChatEntity + // { + // ChatId = channel.Id, RoleId = UserRole.Owner, UserId = request.UserId, + // }); + + private UserChatEntity() + { + } + + private UserChatEntity(Guid userId, Guid chatId, UserRole roleId) + { + UserId = userId; + ChatId = chatId; + RoleId = roleId; + } + + public static UserChatEntity Create(Guid userId, Guid chatId, UserRole roleId) + { + var userChat = new UserChatEntity(userId, chatId, roleId); + + return userChat; + } + + public void Archive() + { + IsArchived = true; + } +} \ No newline at end of file diff --git a/MangoAPI.Infrastructure/Database/Configurations/ChatEntityConfiguration.cs b/MangoAPI.Infrastructure/Database/Configurations/ChatEntityConfiguration.cs index 185a97c33..bfcf0b370 100644 --- a/MangoAPI.Infrastructure/Database/Configurations/ChatEntityConfiguration.cs +++ b/MangoAPI.Infrastructure/Database/Configurations/ChatEntityConfiguration.cs @@ -23,141 +23,141 @@ public void Configure(EntityTypeBuilder builder) .WithOne(x => x.Chat) .HasForeignKey(x => x.ChatId); - builder.HasData( - new ChatEntity - { - Id = SeedDataConstants.WsbId, - Title = "WSB", - CommunityType = CommunityType.PublicChannel, - CreatedAt = DateTime.UtcNow, - UpdatedAt = DateTime.UtcNow, - Description = "WSB Public Group", - MembersCount = 5, - Image = "wsb_group_logo.png", - LastMessageAuthor = "Szymon Murawski", - LastMessageText = "Great! Good luck to all of you", - LastMessageTime = DateTime.UtcNow, - }, - new ChatEntity - { - Id = SeedDataConstants.ExtremeCodeMainId, - Title = "Extreme Code Main", - CommunityType = CommunityType.PublicChannel, - Description = "Extreme Code Main Public Group", - CreatedAt = DateTime.UtcNow, - UpdatedAt = DateTime.UtcNow, - MembersCount = 4, - Image = "extreme_code_main.jpg", - LastMessageAuthor = "Amelit", - LastMessageText = "TypeScript The Best", - LastMessageTime = DateTime.UtcNow, - }, - new ChatEntity - { - Id = SeedDataConstants.ExtremeCodeFloodId, - Title = "Extreme Code Flood", - CommunityType = CommunityType.PublicChannel, - Description = "Extreme Code Flood Public Group", - CreatedAt = DateTime.UtcNow, - UpdatedAt = DateTime.UtcNow, - MembersCount = 4, - Image = "extremecode_rest_logo.jpg", - LastMessageAuthor = "Amelit", - LastMessageText = "Слава Партии!!", - LastMessageTime = DateTime.UtcNow, - }, - new ChatEntity - { - Id = SeedDataConstants.ExtremeCodeCppId, - Title = "Extreme Code C++", - CommunityType = CommunityType.PublicChannel, - Description = "Extreme Code C++ Public Group", - CreatedAt = DateTime.UtcNow, - UpdatedAt = DateTime.UtcNow, - MembersCount = 4, - Image = "extremecode_cpp_logo.jpg", - LastMessageAuthor = "Amelit", - LastMessageText = "Hello world!", - LastMessageTime = DateTime.UtcNow, - }, - new ChatEntity - { - Id = SeedDataConstants.ExtremeCodeDotnetId, - Title = "Extreme Code .NET", - CommunityType = CommunityType.PublicChannel, - Description = "Extreme Code .NET Public Group", - CreatedAt = DateTime.UtcNow, - UpdatedAt = DateTime.UtcNow, - MembersCount = 4, - Image = "extremecode_dotnet.png", - LastMessageAuthor = "Amelit", - LastMessageText = "Hello world!", - LastMessageTime = DateTime.UtcNow, - }, - new ChatEntity - { - Id = SeedDataConstants.DirectKhachaturRazumovsky, - Title = "Khachatur Khachatryan / razumovsky r", - Description = "Direct chat between Khachatur Khachatryan and razumovsky r", - CreatedAt = DateTime.UtcNow, - UpdatedAt = DateTime.UtcNow, - CommunityType = CommunityType.DirectChat, - MembersCount = 2, - LastMessageAuthor = "razumovsky r", - LastMessageText = "Hello world!", - LastMessageTime = DateTime.UtcNow, - }, - new ChatEntity - { - Id = SeedDataConstants.DirectKolbasatorRazumovsky, - Title = "Мусяка Колбасяка / razumovsky r", - Description = "Direct chat between Мусяка Колбасяка and razumovsky r", - CreatedAt = DateTime.UtcNow, - UpdatedAt = DateTime.UtcNow, - CommunityType = CommunityType.DirectChat, - MembersCount = 2, - LastMessageAuthor = "razumovsky r", - LastMessageText = "Hello world!", - LastMessageTime = DateTime.UtcNow, - }, - new ChatEntity - { - Id = SeedDataConstants.DirectAmelitRazumovsky, - Title = "Amelit / razumovsky r", - Description = "Direct chat between Amelit and razumovsky r", - CreatedAt = DateTime.UtcNow, - UpdatedAt = DateTime.UtcNow, - CommunityType = CommunityType.DirectChat, - MembersCount = 2, - LastMessageAuthor = "razumovsky r", - LastMessageText = "Hello world!", - LastMessageTime = DateTime.UtcNow, - }, - new ChatEntity - { - Id = SeedDataConstants.DirectKhachaturKolbasator, - Title = "Khachatur Khachatryan / Мусяка Колбасяка", - Description = "Direct chat between Khachatur Khachatryan and Мусяка Колбасяка", - CreatedAt = DateTime.UtcNow, - UpdatedAt = DateTime.UtcNow, - CommunityType = CommunityType.DirectChat, - MembersCount = 2, - LastMessageAuthor = "Khachatur Khachatryan", - LastMessageText = "Hello world!", - LastMessageTime = DateTime.UtcNow, - }, - new ChatEntity - { - Id = SeedDataConstants.DirectPetroSzymon, - Title = "Petro Kolosov / Szymon Murawski", - Description = "Direct chat between Petro Kolosov and Szymon Murawski", - CreatedAt = DateTime.UtcNow, - UpdatedAt = DateTime.UtcNow, - CommunityType = CommunityType.DirectChat, - MembersCount = 2, - LastMessageAuthor = "Petro Kolosov", - LastMessageText = "Hello world!", - LastMessageTime = DateTime.UtcNow, - }); + // builder.HasData( + // new ChatEntity + // { + // Id = SeedDataConstants.WsbId, + // Title = "WSB", + // CommunityType = CommunityType.PublicChannel, + // CreatedAt = DateTime.UtcNow, + // UpdatedAt = DateTime.UtcNow, + // Description = "WSB Public Group", + // MembersCount = 5, + // Image = "wsb_group_logo.png", + // LastMessageAuthor = "Szymon Murawski", + // LastMessageText = "Great! Good luck to all of you", + // LastMessageTime = DateTime.UtcNow, + // }, + // new ChatEntity + // { + // Id = SeedDataConstants.ExtremeCodeMainId, + // Title = "Extreme Code Main", + // CommunityType = CommunityType.PublicChannel, + // Description = "Extreme Code Main Public Group", + // CreatedAt = DateTime.UtcNow, + // UpdatedAt = DateTime.UtcNow, + // MembersCount = 4, + // Image = "extreme_code_main.jpg", + // LastMessageAuthor = "Amelit", + // LastMessageText = "TypeScript The Best", + // LastMessageTime = DateTime.UtcNow, + // }, + // new ChatEntity + // { + // Id = SeedDataConstants.ExtremeCodeFloodId, + // Title = "Extreme Code Flood", + // CommunityType = CommunityType.PublicChannel, + // Description = "Extreme Code Flood Public Group", + // CreatedAt = DateTime.UtcNow, + // UpdatedAt = DateTime.UtcNow, + // MembersCount = 4, + // Image = "extremecode_rest_logo.jpg", + // LastMessageAuthor = "Amelit", + // LastMessageText = "Слава Партии!!", + // LastMessageTime = DateTime.UtcNow, + // }, + // new ChatEntity + // { + // Id = SeedDataConstants.ExtremeCodeCppId, + // Title = "Extreme Code C++", + // CommunityType = CommunityType.PublicChannel, + // Description = "Extreme Code C++ Public Group", + // CreatedAt = DateTime.UtcNow, + // UpdatedAt = DateTime.UtcNow, + // MembersCount = 4, + // Image = "extremecode_cpp_logo.jpg", + // LastMessageAuthor = "Amelit", + // LastMessageText = "Hello world!", + // LastMessageTime = DateTime.UtcNow, + // }, + // new ChatEntity + // { + // Id = SeedDataConstants.ExtremeCodeDotnetId, + // Title = "Extreme Code .NET", + // CommunityType = CommunityType.PublicChannel, + // Description = "Extreme Code .NET Public Group", + // CreatedAt = DateTime.UtcNow, + // UpdatedAt = DateTime.UtcNow, + // MembersCount = 4, + // Image = "extremecode_dotnet.png", + // LastMessageAuthor = "Amelit", + // LastMessageText = "Hello world!", + // LastMessageTime = DateTime.UtcNow, + // }, + // new ChatEntity + // { + // Id = SeedDataConstants.DirectKhachaturRazumovsky, + // Title = "Khachatur Khachatryan / razumovsky r", + // Description = "Direct chat between Khachatur Khachatryan and razumovsky r", + // CreatedAt = DateTime.UtcNow, + // UpdatedAt = DateTime.UtcNow, + // CommunityType = CommunityType.DirectChat, + // MembersCount = 2, + // LastMessageAuthor = "razumovsky r", + // LastMessageText = "Hello world!", + // LastMessageTime = DateTime.UtcNow, + // }, + // new ChatEntity + // { + // Id = SeedDataConstants.DirectKolbasatorRazumovsky, + // Title = "Мусяка Колбасяка / razumovsky r", + // Description = "Direct chat between Мусяка Колбасяка and razumovsky r", + // CreatedAt = DateTime.UtcNow, + // UpdatedAt = DateTime.UtcNow, + // CommunityType = CommunityType.DirectChat, + // MembersCount = 2, + // LastMessageAuthor = "razumovsky r", + // LastMessageText = "Hello world!", + // LastMessageTime = DateTime.UtcNow, + // }, + // new ChatEntity + // { + // Id = SeedDataConstants.DirectAmelitRazumovsky, + // Title = "Amelit / razumovsky r", + // Description = "Direct chat between Amelit and razumovsky r", + // CreatedAt = DateTime.UtcNow, + // UpdatedAt = DateTime.UtcNow, + // CommunityType = CommunityType.DirectChat, + // MembersCount = 2, + // LastMessageAuthor = "razumovsky r", + // LastMessageText = "Hello world!", + // LastMessageTime = DateTime.UtcNow, + // }, + // new ChatEntity + // { + // Id = SeedDataConstants.DirectKhachaturKolbasator, + // Title = "Khachatur Khachatryan / Мусяка Колбасяка", + // Description = "Direct chat between Khachatur Khachatryan and Мусяка Колбасяка", + // CreatedAt = DateTime.UtcNow, + // UpdatedAt = DateTime.UtcNow, + // CommunityType = CommunityType.DirectChat, + // MembersCount = 2, + // LastMessageAuthor = "Khachatur Khachatryan", + // LastMessageText = "Hello world!", + // LastMessageTime = DateTime.UtcNow, + // }, + // new ChatEntity + // { + // Id = SeedDataConstants.DirectPetroSzymon, + // Title = "Petro Kolosov / Szymon Murawski", + // Description = "Direct chat between Petro Kolosov and Szymon Murawski", + // CreatedAt = DateTime.UtcNow, + // UpdatedAt = DateTime.UtcNow, + // CommunityType = CommunityType.DirectChat, + // MembersCount = 2, + // LastMessageAuthor = "Petro Kolosov", + // LastMessageText = "Hello world!", + // LastMessageTime = DateTime.UtcNow, + // }); } -} +} \ No newline at end of file diff --git a/MangoAPI.Infrastructure/Database/Configurations/MessageEntityConfiguration.cs b/MangoAPI.Infrastructure/Database/Configurations/MessageEntityConfiguration.cs index 9fad1331c..cca91942f 100644 --- a/MangoAPI.Infrastructure/Database/Configurations/MessageEntityConfiguration.cs +++ b/MangoAPI.Infrastructure/Database/Configurations/MessageEntityConfiguration.cs @@ -25,254 +25,254 @@ public void Configure(EntityTypeBuilder builder) .WithMany(x => x.Messages) .HasForeignKey(x => x.ChatId); - builder.HasData( - new MessageEntity - { - Id = Guid.NewGuid(), - UserId = SeedDataConstants.SzymonId, - ChatId = SeedDataConstants.WsbId, - Content = "Hello guys, how your diploma project goes?", - CreatedAt = DateTime.UtcNow, - }, - new MessageEntity - { - Id = Guid.NewGuid(), - UserId = SeedDataConstants.IlliaId, - ChatId = SeedDataConstants.WsbId, - Content = "Well, I'm doing UI/UX part of the project", - CreatedAt = DateTime.UtcNow, - }, - new MessageEntity - { - Id = Guid.NewGuid(), - UserId = SeedDataConstants.ArslanbekId, - ChatId = SeedDataConstants.WsbId, - Content = "Hi teacher, I perform QA of the current version", - CreatedAt = DateTime.UtcNow, - }, - new MessageEntity - { - Id = Guid.NewGuid(), - UserId = SeedDataConstants.PetroId, - ChatId = SeedDataConstants.WsbId, - Content = "Greetings. I currently workout the back-end part", - CreatedAt = DateTime.UtcNow, - }, - new MessageEntity - { - Id = Guid.NewGuid(), - UserId = SeedDataConstants.SerhiiId, - ChatId = SeedDataConstants.WsbId, - Content = "I work with backend too...", - CreatedAt = DateTime.UtcNow, - }, - new MessageEntity - { - Id = Guid.NewGuid(), - UserId = SeedDataConstants.SzymonId, - ChatId = SeedDataConstants.WsbId, - Content = "Great! Good luck to all of you", - CreatedAt = DateTime.UtcNow, - }, - new MessageEntity - { - Id = Guid.NewGuid(), - UserId = SeedDataConstants.KhachaturId, - ChatId = SeedDataConstants.ExtremeCodeMainId, - Content = "Hello World", - CreatedAt = DateTime.UtcNow, - }, - new MessageEntity - { - Id = Guid.NewGuid(), - UserId = SeedDataConstants.RazumovskyId, - ChatId = SeedDataConstants.ExtremeCodeMainId, - Content = "F# The Best", - CreatedAt = DateTime.UtcNow, - }, - new MessageEntity - { - Id = Guid.NewGuid(), - UserId = SeedDataConstants.KolbasatorId, - ChatId = SeedDataConstants.ExtremeCodeMainId, - Content = "C# The Best", - CreatedAt = DateTime.UtcNow, - }, - new MessageEntity - { - Id = Guid.NewGuid(), - UserId = SeedDataConstants.AmelitId, - ChatId = SeedDataConstants.ExtremeCodeMainId, - Content = "TypeScript The Best", - CreatedAt = DateTime.UtcNow, - }, - new MessageEntity - { - Id = Guid.NewGuid(), - UserId = SeedDataConstants.KhachaturId, - ChatId = SeedDataConstants.ExtremeCodeFloodId, - Content = "Слава Партии!!", - CreatedAt = DateTime.UtcNow, - }, - new MessageEntity - { - Id = Guid.NewGuid(), - UserId = SeedDataConstants.RazumovskyId, - ChatId = SeedDataConstants.ExtremeCodeFloodId, - Content = "Слава Партии!!", - CreatedAt = DateTime.UtcNow, - }, - new MessageEntity - { - Id = Guid.NewGuid(), - UserId = SeedDataConstants.KolbasatorId, - ChatId = SeedDataConstants.ExtremeCodeFloodId, - Content = "Слава Партии!!", - CreatedAt = DateTime.UtcNow, - }, - new MessageEntity - { - Id = Guid.NewGuid(), - UserId = SeedDataConstants.AmelitId, - ChatId = SeedDataConstants.ExtremeCodeFloodId, - Content = "Слава Партии!!", - CreatedAt = DateTime.UtcNow, - }, - new MessageEntity - { - Id = Guid.NewGuid(), - UserId = SeedDataConstants.KhachaturId, - ChatId = SeedDataConstants.ExtremeCodeCppId, - Content = "Hello World", - CreatedAt = DateTime.UtcNow, - }, - new MessageEntity - { - Id = Guid.NewGuid(), - UserId = SeedDataConstants.RazumovskyId, - ChatId = SeedDataConstants.ExtremeCodeCppId, - Content = "Hello World", - CreatedAt = DateTime.UtcNow, - }, - new MessageEntity - { - Id = Guid.NewGuid(), - UserId = SeedDataConstants.KolbasatorId, - ChatId = SeedDataConstants.ExtremeCodeCppId, - Content = "Hello World", - CreatedAt = DateTime.UtcNow, - }, - new MessageEntity - { - Id = Guid.NewGuid(), - UserId = SeedDataConstants.AmelitId, - ChatId = SeedDataConstants.ExtremeCodeCppId, - Content = "Hello World", - CreatedAt = DateTime.UtcNow, - }, - new MessageEntity - { - Id = Guid.NewGuid(), - UserId = SeedDataConstants.KhachaturId, - ChatId = SeedDataConstants.ExtremeCodeDotnetId, - Content = "Hello World", - CreatedAt = DateTime.UtcNow, - }, - new MessageEntity - { - Id = Guid.NewGuid(), - UserId = SeedDataConstants.RazumovskyId, - ChatId = SeedDataConstants.ExtremeCodeDotnetId, - Content = "Hello World", - CreatedAt = DateTime.UtcNow, - }, - new MessageEntity - { - Id = Guid.NewGuid(), - UserId = SeedDataConstants.KolbasatorId, - ChatId = SeedDataConstants.ExtremeCodeDotnetId, - Content = "Hello World", - CreatedAt = DateTime.UtcNow, - }, - new MessageEntity - { - Id = Guid.NewGuid(), - UserId = SeedDataConstants.AmelitId, - ChatId = SeedDataConstants.ExtremeCodeDotnetId, - Content = "Hello World", - CreatedAt = DateTime.UtcNow, - }, - new MessageEntity - { - Id = Guid.NewGuid(), - UserId = SeedDataConstants.KhachaturId, - ChatId = SeedDataConstants.DirectKhachaturRazumovsky, - Content = "Hello World", - CreatedAt = DateTime.UtcNow, - }, - new MessageEntity - { - Id = Guid.NewGuid(), - UserId = SeedDataConstants.RazumovskyId, - ChatId = SeedDataConstants.DirectKhachaturRazumovsky, - Content = "Hello World", - CreatedAt = DateTime.UtcNow, - }, - new MessageEntity - { - Id = Guid.NewGuid(), - UserId = SeedDataConstants.KolbasatorId, - ChatId = SeedDataConstants.DirectKolbasatorRazumovsky, - Content = "Hello World", - CreatedAt = DateTime.UtcNow, - }, - new MessageEntity - { - Id = Guid.NewGuid(), - UserId = SeedDataConstants.RazumovskyId, - ChatId = SeedDataConstants.DirectKolbasatorRazumovsky, - Content = "Hello World", - CreatedAt = DateTime.UtcNow, - }, - new MessageEntity - { - Id = Guid.NewGuid(), - UserId = SeedDataConstants.AmelitId, - ChatId = SeedDataConstants.DirectAmelitRazumovsky, - Content = "Hello World", - CreatedAt = DateTime.UtcNow, - }, - new MessageEntity - { - Id = Guid.NewGuid(), - UserId = SeedDataConstants.RazumovskyId, - ChatId = SeedDataConstants.DirectAmelitRazumovsky, - Content = "Hello World", - CreatedAt = DateTime.UtcNow, - }, - new MessageEntity - { - Id = Guid.NewGuid(), - UserId = SeedDataConstants.KhachaturId, - ChatId = SeedDataConstants.DirectKhachaturKolbasator, - Content = "Hello World", - CreatedAt = DateTime.UtcNow, - }, - new MessageEntity - { - Id = Guid.NewGuid(), - UserId = SeedDataConstants.KolbasatorId, - ChatId = SeedDataConstants.DirectKhachaturKolbasator, - Content = "Hello World", - CreatedAt = DateTime.UtcNow, - }, - new MessageEntity - { - Id = Guid.NewGuid(), - UserId = SeedDataConstants.PetroId, - ChatId = SeedDataConstants.DirectPetroSzymon, - Content = "Hi teacher", - CreatedAt = DateTime.UtcNow, - }); + // builder.HasData( + // new MessageEntity + // { + // Id = Guid.NewGuid(), + // UserId = SeedDataConstants.SzymonId, + // ChatId = SeedDataConstants.WsbId, + // Content = "Hello guys, how your diploma project goes?", + // CreatedAt = DateTime.UtcNow, + // }, + // new MessageEntity + // { + // Id = Guid.NewGuid(), + // UserId = SeedDataConstants.IlliaId, + // ChatId = SeedDataConstants.WsbId, + // Content = "Well, I'm doing UI/UX part of the project", + // CreatedAt = DateTime.UtcNow, + // }, + // new MessageEntity + // { + // Id = Guid.NewGuid(), + // UserId = SeedDataConstants.ArslanbekId, + // ChatId = SeedDataConstants.WsbId, + // Content = "Hi teacher, I perform QA of the current version", + // CreatedAt = DateTime.UtcNow, + // }, + // new MessageEntity + // { + // Id = Guid.NewGuid(), + // UserId = SeedDataConstants.PetroId, + // ChatId = SeedDataConstants.WsbId, + // Content = "Greetings. I currently workout the back-end part", + // CreatedAt = DateTime.UtcNow, + // }, + // new MessageEntity + // { + // Id = Guid.NewGuid(), + // UserId = SeedDataConstants.SerhiiId, + // ChatId = SeedDataConstants.WsbId, + // Content = "I work with backend too...", + // CreatedAt = DateTime.UtcNow, + // }, + // new MessageEntity + // { + // Id = Guid.NewGuid(), + // UserId = SeedDataConstants.SzymonId, + // ChatId = SeedDataConstants.WsbId, + // Content = "Great! Good luck to all of you", + // CreatedAt = DateTime.UtcNow, + // }, + // new MessageEntity + // { + // Id = Guid.NewGuid(), + // UserId = SeedDataConstants.KhachaturId, + // ChatId = SeedDataConstants.ExtremeCodeMainId, + // Content = "Hello World", + // CreatedAt = DateTime.UtcNow, + // }, + // new MessageEntity + // { + // Id = Guid.NewGuid(), + // UserId = SeedDataConstants.RazumovskyId, + // ChatId = SeedDataConstants.ExtremeCodeMainId, + // Content = "F# The Best", + // CreatedAt = DateTime.UtcNow, + // }, + // new MessageEntity + // { + // Id = Guid.NewGuid(), + // UserId = SeedDataConstants.KolbasatorId, + // ChatId = SeedDataConstants.ExtremeCodeMainId, + // Content = "C# The Best", + // CreatedAt = DateTime.UtcNow, + // }, + // new MessageEntity + // { + // Id = Guid.NewGuid(), + // UserId = SeedDataConstants.AmelitId, + // ChatId = SeedDataConstants.ExtremeCodeMainId, + // Content = "TypeScript The Best", + // CreatedAt = DateTime.UtcNow, + // }, + // new MessageEntity + // { + // Id = Guid.NewGuid(), + // UserId = SeedDataConstants.KhachaturId, + // ChatId = SeedDataConstants.ExtremeCodeFloodId, + // Content = "Слава Партии!!", + // CreatedAt = DateTime.UtcNow, + // }, + // new MessageEntity + // { + // Id = Guid.NewGuid(), + // UserId = SeedDataConstants.RazumovskyId, + // ChatId = SeedDataConstants.ExtremeCodeFloodId, + // Content = "Слава Партии!!", + // CreatedAt = DateTime.UtcNow, + // }, + // new MessageEntity + // { + // Id = Guid.NewGuid(), + // UserId = SeedDataConstants.KolbasatorId, + // ChatId = SeedDataConstants.ExtremeCodeFloodId, + // Content = "Слава Партии!!", + // CreatedAt = DateTime.UtcNow, + // }, + // new MessageEntity + // { + // Id = Guid.NewGuid(), + // UserId = SeedDataConstants.AmelitId, + // ChatId = SeedDataConstants.ExtremeCodeFloodId, + // Content = "Слава Партии!!", + // CreatedAt = DateTime.UtcNow, + // }, + // new MessageEntity + // { + // Id = Guid.NewGuid(), + // UserId = SeedDataConstants.KhachaturId, + // ChatId = SeedDataConstants.ExtremeCodeCppId, + // Content = "Hello World", + // CreatedAt = DateTime.UtcNow, + // }, + // new MessageEntity + // { + // Id = Guid.NewGuid(), + // UserId = SeedDataConstants.RazumovskyId, + // ChatId = SeedDataConstants.ExtremeCodeCppId, + // Content = "Hello World", + // CreatedAt = DateTime.UtcNow, + // }, + // new MessageEntity + // { + // Id = Guid.NewGuid(), + // UserId = SeedDataConstants.KolbasatorId, + // ChatId = SeedDataConstants.ExtremeCodeCppId, + // Content = "Hello World", + // CreatedAt = DateTime.UtcNow, + // }, + // new MessageEntity + // { + // Id = Guid.NewGuid(), + // UserId = SeedDataConstants.AmelitId, + // ChatId = SeedDataConstants.ExtremeCodeCppId, + // Content = "Hello World", + // CreatedAt = DateTime.UtcNow, + // }, + // new MessageEntity + // { + // Id = Guid.NewGuid(), + // UserId = SeedDataConstants.KhachaturId, + // ChatId = SeedDataConstants.ExtremeCodeDotnetId, + // Content = "Hello World", + // CreatedAt = DateTime.UtcNow, + // }, + // new MessageEntity + // { + // Id = Guid.NewGuid(), + // UserId = SeedDataConstants.RazumovskyId, + // ChatId = SeedDataConstants.ExtremeCodeDotnetId, + // Content = "Hello World", + // CreatedAt = DateTime.UtcNow, + // }, + // new MessageEntity + // { + // Id = Guid.NewGuid(), + // UserId = SeedDataConstants.KolbasatorId, + // ChatId = SeedDataConstants.ExtremeCodeDotnetId, + // Content = "Hello World", + // CreatedAt = DateTime.UtcNow, + // }, + // new MessageEntity + // { + // Id = Guid.NewGuid(), + // UserId = SeedDataConstants.AmelitId, + // ChatId = SeedDataConstants.ExtremeCodeDotnetId, + // Content = "Hello World", + // CreatedAt = DateTime.UtcNow, + // }, + // new MessageEntity + // { + // Id = Guid.NewGuid(), + // UserId = SeedDataConstants.KhachaturId, + // ChatId = SeedDataConstants.DirectKhachaturRazumovsky, + // Content = "Hello World", + // CreatedAt = DateTime.UtcNow, + // }, + // new MessageEntity + // { + // Id = Guid.NewGuid(), + // UserId = SeedDataConstants.RazumovskyId, + // ChatId = SeedDataConstants.DirectKhachaturRazumovsky, + // Content = "Hello World", + // CreatedAt = DateTime.UtcNow, + // }, + // new MessageEntity + // { + // Id = Guid.NewGuid(), + // UserId = SeedDataConstants.KolbasatorId, + // ChatId = SeedDataConstants.DirectKolbasatorRazumovsky, + // Content = "Hello World", + // CreatedAt = DateTime.UtcNow, + // }, + // new MessageEntity + // { + // Id = Guid.NewGuid(), + // UserId = SeedDataConstants.RazumovskyId, + // ChatId = SeedDataConstants.DirectKolbasatorRazumovsky, + // Content = "Hello World", + // CreatedAt = DateTime.UtcNow, + // }, + // new MessageEntity + // { + // Id = Guid.NewGuid(), + // UserId = SeedDataConstants.AmelitId, + // ChatId = SeedDataConstants.DirectAmelitRazumovsky, + // Content = "Hello World", + // CreatedAt = DateTime.UtcNow, + // }, + // new MessageEntity + // { + // Id = Guid.NewGuid(), + // UserId = SeedDataConstants.RazumovskyId, + // ChatId = SeedDataConstants.DirectAmelitRazumovsky, + // Content = "Hello World", + // CreatedAt = DateTime.UtcNow, + // }, + // new MessageEntity + // { + // Id = Guid.NewGuid(), + // UserId = SeedDataConstants.KhachaturId, + // ChatId = SeedDataConstants.DirectKhachaturKolbasator, + // Content = "Hello World", + // CreatedAt = DateTime.UtcNow, + // }, + // new MessageEntity + // { + // Id = Guid.NewGuid(), + // UserId = SeedDataConstants.KolbasatorId, + // ChatId = SeedDataConstants.DirectKhachaturKolbasator, + // Content = "Hello World", + // CreatedAt = DateTime.UtcNow, + // }, + // new MessageEntity + // { + // Id = Guid.NewGuid(), + // UserId = SeedDataConstants.PetroId, + // ChatId = SeedDataConstants.DirectPetroSzymon, + // Content = "Hi teacher", + // CreatedAt = DateTime.UtcNow, + // }); } } \ No newline at end of file diff --git a/MangoAPI.Infrastructure/Database/Configurations/UserChatEntityConfiguration.cs b/MangoAPI.Infrastructure/Database/Configurations/UserChatEntityConfiguration.cs index 91335d5f4..16dd812d1 100644 --- a/MangoAPI.Infrastructure/Database/Configurations/UserChatEntityConfiguration.cs +++ b/MangoAPI.Infrastructure/Database/Configurations/UserChatEntityConfiguration.cs @@ -24,192 +24,192 @@ public void Configure(EntityTypeBuilder builder) .WithMany(x => x.UserChats) .HasForeignKey(x => x.UserId); - builder.HasData( - new UserChatEntity - { - UserId = SeedDataConstants.PetroId, - ChatId = SeedDataConstants.WsbId, - RoleId = UserRole.Moderator, - }, - new UserChatEntity - { - UserId = SeedDataConstants.SzymonId, - ChatId = SeedDataConstants.WsbId, - RoleId = UserRole.Owner, - }, - new UserChatEntity - { - UserId = SeedDataConstants.IlliaId, - ChatId = SeedDataConstants.WsbId, - RoleId = UserRole.User, - }, - new UserChatEntity - { - UserId = SeedDataConstants.ArslanbekId, - ChatId = SeedDataConstants.WsbId, - RoleId = UserRole.User, - }, - new UserChatEntity - { - UserId = SeedDataConstants.SerhiiId, - ChatId = SeedDataConstants.WsbId, - RoleId = UserRole.User, - }, - new UserChatEntity - { - UserId = SeedDataConstants.KhachaturId, - ChatId = SeedDataConstants.ExtremeCodeMainId, - RoleId = UserRole.User, - }, - new UserChatEntity - { - UserId = SeedDataConstants.RazumovskyId, - ChatId = SeedDataConstants.ExtremeCodeMainId, - RoleId = UserRole.Admin, - }, - new UserChatEntity - { - UserId = SeedDataConstants.KolbasatorId, - ChatId = SeedDataConstants.ExtremeCodeMainId, - RoleId = UserRole.Moderator, - }, - new UserChatEntity - { - UserId = SeedDataConstants.AmelitId, - ChatId = SeedDataConstants.ExtremeCodeMainId, - RoleId = UserRole.Owner, - }, - new UserChatEntity - { - UserId = SeedDataConstants.RazumovskyId, - ChatId = SeedDataConstants.ExtremeCodeFloodId, - RoleId = UserRole.Owner, - }, - new UserChatEntity - { - UserId = SeedDataConstants.KolbasatorId, - ChatId = SeedDataConstants.ExtremeCodeFloodId, - RoleId = UserRole.Moderator, - }, - new UserChatEntity - { - UserId = SeedDataConstants.KhachaturId, - ChatId = SeedDataConstants.ExtremeCodeFloodId, - RoleId = UserRole.User, - }, - new UserChatEntity - { - UserId = SeedDataConstants.AmelitId, - ChatId = SeedDataConstants.ExtremeCodeFloodId, - RoleId = UserRole.User, - }, - new UserChatEntity - { - UserId = SeedDataConstants.AmelitId, - ChatId = SeedDataConstants.ExtremeCodeCppId, - RoleId = UserRole.Owner, - }, - new UserChatEntity - { - UserId = SeedDataConstants.RazumovskyId, - ChatId = SeedDataConstants.ExtremeCodeCppId, - RoleId = UserRole.Admin, - }, - new UserChatEntity - { - UserId = SeedDataConstants.KhachaturId, - ChatId = SeedDataConstants.ExtremeCodeCppId, - RoleId = UserRole.User, - }, - new UserChatEntity - { - UserId = SeedDataConstants.KolbasatorId, - ChatId = SeedDataConstants.ExtremeCodeCppId, - RoleId = UserRole.User, - }, - new UserChatEntity - { - UserId = SeedDataConstants.RazumovskyId, - ChatId = SeedDataConstants.ExtremeCodeDotnetId, - RoleId = UserRole.Owner, - }, - new UserChatEntity - { - UserId = SeedDataConstants.KolbasatorId, - ChatId = SeedDataConstants.ExtremeCodeDotnetId, - RoleId = UserRole.User, - }, - new UserChatEntity - { - UserId = SeedDataConstants.KhachaturId, - ChatId = SeedDataConstants.ExtremeCodeDotnetId, - RoleId = UserRole.User, - }, - new UserChatEntity - { - UserId = SeedDataConstants.AmelitId, - ChatId = SeedDataConstants.ExtremeCodeDotnetId, - RoleId = UserRole.User, - }, - new UserChatEntity - { - UserId = SeedDataConstants.KhachaturId, - ChatId = SeedDataConstants.DirectKhachaturRazumovsky, - RoleId = UserRole.User, - }, - new UserChatEntity - { - UserId = SeedDataConstants.RazumovskyId, - ChatId = SeedDataConstants.DirectKhachaturRazumovsky, - RoleId = UserRole.User, - }, - new UserChatEntity - { - UserId = SeedDataConstants.KolbasatorId, - ChatId = SeedDataConstants.DirectKolbasatorRazumovsky, - RoleId = UserRole.User, - }, - new UserChatEntity - { - UserId = SeedDataConstants.RazumovskyId, - ChatId = SeedDataConstants.DirectKolbasatorRazumovsky, - RoleId = UserRole.User, - }, - new UserChatEntity - { - UserId = SeedDataConstants.AmelitId, - ChatId = SeedDataConstants.DirectAmelitRazumovsky, - RoleId = UserRole.User, - }, - new UserChatEntity - { - UserId = SeedDataConstants.RazumovskyId, - ChatId = SeedDataConstants.DirectAmelitRazumovsky, - RoleId = UserRole.User, - }, - new UserChatEntity - { - UserId = SeedDataConstants.KhachaturId, - ChatId = SeedDataConstants.DirectKhachaturKolbasator, - RoleId = UserRole.User, - }, - new UserChatEntity - { - UserId = SeedDataConstants.KolbasatorId, - ChatId = SeedDataConstants.DirectKhachaturKolbasator, - RoleId = UserRole.User, - }, - new UserChatEntity - { - UserId = SeedDataConstants.PetroId, - ChatId = SeedDataConstants.DirectPetroSzymon, - RoleId = UserRole.User, - }, - new UserChatEntity - { - UserId = SeedDataConstants.SzymonId, - ChatId = SeedDataConstants.DirectPetroSzymon, - RoleId = UserRole.User, - }); + // builder.HasData( + // new UserChatEntity + // { + // UserId = SeedDataConstants.PetroId, + // ChatId = SeedDataConstants.WsbId, + // RoleId = UserRole.Moderator, + // }, + // new UserChatEntity + // { + // UserId = SeedDataConstants.SzymonId, + // ChatId = SeedDataConstants.WsbId, + // RoleId = UserRole.Owner, + // }, + // new UserChatEntity + // { + // UserId = SeedDataConstants.IlliaId, + // ChatId = SeedDataConstants.WsbId, + // RoleId = UserRole.User, + // }, + // new UserChatEntity + // { + // UserId = SeedDataConstants.ArslanbekId, + // ChatId = SeedDataConstants.WsbId, + // RoleId = UserRole.User, + // }, + // new UserChatEntity + // { + // UserId = SeedDataConstants.SerhiiId, + // ChatId = SeedDataConstants.WsbId, + // RoleId = UserRole.User, + // }, + // new UserChatEntity + // { + // UserId = SeedDataConstants.KhachaturId, + // ChatId = SeedDataConstants.ExtremeCodeMainId, + // RoleId = UserRole.User, + // }, + // new UserChatEntity + // { + // UserId = SeedDataConstants.RazumovskyId, + // ChatId = SeedDataConstants.ExtremeCodeMainId, + // RoleId = UserRole.Admin, + // }, + // new UserChatEntity + // { + // UserId = SeedDataConstants.KolbasatorId, + // ChatId = SeedDataConstants.ExtremeCodeMainId, + // RoleId = UserRole.Moderator, + // }, + // new UserChatEntity + // { + // UserId = SeedDataConstants.AmelitId, + // ChatId = SeedDataConstants.ExtremeCodeMainId, + // RoleId = UserRole.Owner, + // }, + // new UserChatEntity + // { + // UserId = SeedDataConstants.RazumovskyId, + // ChatId = SeedDataConstants.ExtremeCodeFloodId, + // RoleId = UserRole.Owner, + // }, + // new UserChatEntity + // { + // UserId = SeedDataConstants.KolbasatorId, + // ChatId = SeedDataConstants.ExtremeCodeFloodId, + // RoleId = UserRole.Moderator, + // }, + // new UserChatEntity + // { + // UserId = SeedDataConstants.KhachaturId, + // ChatId = SeedDataConstants.ExtremeCodeFloodId, + // RoleId = UserRole.User, + // }, + // new UserChatEntity + // { + // UserId = SeedDataConstants.AmelitId, + // ChatId = SeedDataConstants.ExtremeCodeFloodId, + // RoleId = UserRole.User, + // }, + // new UserChatEntity + // { + // UserId = SeedDataConstants.AmelitId, + // ChatId = SeedDataConstants.ExtremeCodeCppId, + // RoleId = UserRole.Owner, + // }, + // new UserChatEntity + // { + // UserId = SeedDataConstants.RazumovskyId, + // ChatId = SeedDataConstants.ExtremeCodeCppId, + // RoleId = UserRole.Admin, + // }, + // new UserChatEntity + // { + // UserId = SeedDataConstants.KhachaturId, + // ChatId = SeedDataConstants.ExtremeCodeCppId, + // RoleId = UserRole.User, + // }, + // new UserChatEntity + // { + // UserId = SeedDataConstants.KolbasatorId, + // ChatId = SeedDataConstants.ExtremeCodeCppId, + // RoleId = UserRole.User, + // }, + // new UserChatEntity + // { + // UserId = SeedDataConstants.RazumovskyId, + // ChatId = SeedDataConstants.ExtremeCodeDotnetId, + // RoleId = UserRole.Owner, + // }, + // new UserChatEntity + // { + // UserId = SeedDataConstants.KolbasatorId, + // ChatId = SeedDataConstants.ExtremeCodeDotnetId, + // RoleId = UserRole.User, + // }, + // new UserChatEntity + // { + // UserId = SeedDataConstants.KhachaturId, + // ChatId = SeedDataConstants.ExtremeCodeDotnetId, + // RoleId = UserRole.User, + // }, + // new UserChatEntity + // { + // UserId = SeedDataConstants.AmelitId, + // ChatId = SeedDataConstants.ExtremeCodeDotnetId, + // RoleId = UserRole.User, + // }, + // new UserChatEntity + // { + // UserId = SeedDataConstants.KhachaturId, + // ChatId = SeedDataConstants.DirectKhachaturRazumovsky, + // RoleId = UserRole.User, + // }, + // new UserChatEntity + // { + // UserId = SeedDataConstants.RazumovskyId, + // ChatId = SeedDataConstants.DirectKhachaturRazumovsky, + // RoleId = UserRole.User, + // }, + // new UserChatEntity + // { + // UserId = SeedDataConstants.KolbasatorId, + // ChatId = SeedDataConstants.DirectKolbasatorRazumovsky, + // RoleId = UserRole.User, + // }, + // new UserChatEntity + // { + // UserId = SeedDataConstants.RazumovskyId, + // ChatId = SeedDataConstants.DirectKolbasatorRazumovsky, + // RoleId = UserRole.User, + // }, + // new UserChatEntity + // { + // UserId = SeedDataConstants.AmelitId, + // ChatId = SeedDataConstants.DirectAmelitRazumovsky, + // RoleId = UserRole.User, + // }, + // new UserChatEntity + // { + // UserId = SeedDataConstants.RazumovskyId, + // ChatId = SeedDataConstants.DirectAmelitRazumovsky, + // RoleId = UserRole.User, + // }, + // new UserChatEntity + // { + // UserId = SeedDataConstants.KhachaturId, + // ChatId = SeedDataConstants.DirectKhachaturKolbasator, + // RoleId = UserRole.User, + // }, + // new UserChatEntity + // { + // UserId = SeedDataConstants.KolbasatorId, + // ChatId = SeedDataConstants.DirectKhachaturKolbasator, + // RoleId = UserRole.User, + // }, + // new UserChatEntity + // { + // UserId = SeedDataConstants.PetroId, + // ChatId = SeedDataConstants.DirectPetroSzymon, + // RoleId = UserRole.User, + // }, + // new UserChatEntity + // { + // UserId = SeedDataConstants.SzymonId, + // ChatId = SeedDataConstants.DirectPetroSzymon, + // RoleId = UserRole.User, + // }); } } diff --git a/MangoAPI.Infrastructure/Database/Configurations/UserContactEntityConfiguration.cs b/MangoAPI.Infrastructure/Database/Configurations/UserContactEntityConfiguration.cs index 168ff32d3..2247fa77c 100644 --- a/MangoAPI.Infrastructure/Database/Configurations/UserContactEntityConfiguration.cs +++ b/MangoAPI.Infrastructure/Database/Configurations/UserContactEntityConfiguration.cs @@ -14,219 +14,219 @@ public void Configure(EntityTypeBuilder builder) builder.HasKey(x => x.Id); - builder.HasData( - // Petro Contacts - new UserContactEntity - { - Id = Guid.NewGuid(), - ContactId = SeedDataConstants.SzymonId, - UserId = SeedDataConstants.PetroId, - CreatedAt = DateTime.UtcNow, - }, - new UserContactEntity - { - Id = Guid.NewGuid(), - ContactId = SeedDataConstants.IlliaId, - UserId = SeedDataConstants.PetroId, - CreatedAt = DateTime.UtcNow, - }, - new UserContactEntity - { - Id = Guid.NewGuid(), - ContactId = SeedDataConstants.ArslanbekId, - UserId = SeedDataConstants.PetroId, - CreatedAt = DateTime.UtcNow, - }, - new UserContactEntity - { - Id = Guid.NewGuid(), - ContactId = SeedDataConstants.SerhiiId, - UserId = SeedDataConstants.PetroId, - CreatedAt = DateTime.UtcNow, - }, - - // Szymon Contacts - new UserContactEntity - { - Id = Guid.NewGuid(), - ContactId = SeedDataConstants.PetroId, - UserId = SeedDataConstants.SzymonId, - CreatedAt = DateTime.UtcNow, - }, - new UserContactEntity - { - Id = Guid.NewGuid(), - ContactId = SeedDataConstants.IlliaId, - UserId = SeedDataConstants.SzymonId, - CreatedAt = DateTime.UtcNow, - }, - new UserContactEntity - { - Id = Guid.NewGuid(), - ContactId = SeedDataConstants.ArslanbekId, - UserId = SeedDataConstants.SzymonId, - CreatedAt = DateTime.UtcNow, - }, - new UserContactEntity - { - Id = Guid.NewGuid(), - ContactId = SeedDataConstants.SerhiiId, - UserId = SeedDataConstants.SzymonId, - CreatedAt = DateTime.UtcNow, - }, - - // Illia Contacts - new UserContactEntity - { - Id = Guid.NewGuid(), - ContactId = SeedDataConstants.PetroId, - UserId = SeedDataConstants.IlliaId, - CreatedAt = DateTime.UtcNow, - }, - new UserContactEntity - { - Id = Guid.NewGuid(), - ContactId = SeedDataConstants.SzymonId, - UserId = SeedDataConstants.IlliaId, - CreatedAt = DateTime.UtcNow, - }, - new UserContactEntity - { - Id = Guid.NewGuid(), - ContactId = SeedDataConstants.ArslanbekId, - UserId = SeedDataConstants.IlliaId, - CreatedAt = DateTime.UtcNow, - }, - new UserContactEntity - { - Id = Guid.NewGuid(), - ContactId = SeedDataConstants.SerhiiId, - UserId = SeedDataConstants.IlliaId, - CreatedAt = DateTime.UtcNow, - }, - - // Serhii Contacts - new UserContactEntity - { - Id = Guid.NewGuid(), - ContactId = SeedDataConstants.PetroId, - UserId = SeedDataConstants.SerhiiId, - CreatedAt = DateTime.UtcNow, - }, - new UserContactEntity - { - Id = Guid.NewGuid(), - ContactId = SeedDataConstants.SzymonId, - UserId = SeedDataConstants.SerhiiId, - CreatedAt = DateTime.UtcNow, - }, - new UserContactEntity - { - Id = Guid.NewGuid(), - ContactId = SeedDataConstants.ArslanbekId, - UserId = SeedDataConstants.SerhiiId, - CreatedAt = DateTime.UtcNow, - }, - new UserContactEntity - { - Id = Guid.NewGuid(), - ContactId = SeedDataConstants.IlliaId, - UserId = SeedDataConstants.SerhiiId, - CreatedAt = DateTime.UtcNow, - }, - - // Arslanbek Contacts - new UserContactEntity - { - Id = Guid.NewGuid(), - ContactId = SeedDataConstants.PetroId, - UserId = SeedDataConstants.ArslanbekId, - CreatedAt = DateTime.UtcNow, - }, - new UserContactEntity - { - Id = Guid.NewGuid(), - ContactId = SeedDataConstants.SzymonId, - UserId = SeedDataConstants.ArslanbekId, - CreatedAt = DateTime.UtcNow, - }, - new UserContactEntity - { - Id = Guid.NewGuid(), - ContactId = SeedDataConstants.SerhiiId, - UserId = SeedDataConstants.ArslanbekId, - CreatedAt = DateTime.UtcNow, - }, - new UserContactEntity - { - Id = Guid.NewGuid(), - ContactId = SeedDataConstants.IlliaId, - UserId = SeedDataConstants.ArslanbekId, - CreatedAt = DateTime.UtcNow, - }, - - // Khachatur Contacts - new UserContactEntity - { - Id = Guid.NewGuid(), - ContactId = SeedDataConstants.RazumovskyId, - UserId = SeedDataConstants.KhachaturId, - CreatedAt = DateTime.UtcNow, - }, - - // Razumovsky Contacts - new UserContactEntity - { - Id = Guid.NewGuid(), - ContactId = SeedDataConstants.KhachaturId, - UserId = SeedDataConstants.RazumovskyId, - CreatedAt = DateTime.UtcNow, - }, - new UserContactEntity - { - Id = Guid.NewGuid(), - ContactId = SeedDataConstants.SzymonId, - UserId = SeedDataConstants.RazumovskyId, - CreatedAt = DateTime.UtcNow, - }, - new UserContactEntity - { - Id = Guid.NewGuid(), - ContactId = SeedDataConstants.IlliaId, - UserId = SeedDataConstants.RazumovskyId, - CreatedAt = DateTime.UtcNow, - }, - new UserContactEntity - { - Id = Guid.NewGuid(), - ContactId = SeedDataConstants.KolbasatorId, - UserId = SeedDataConstants.RazumovskyId, - CreatedAt = DateTime.UtcNow, - }, - new UserContactEntity - { - Id = Guid.NewGuid(), - ContactId = SeedDataConstants.AmelitId, - UserId = SeedDataConstants.RazumovskyId, - CreatedAt = DateTime.UtcNow, - }, - - // Kolbasator Contacts - new UserContactEntity - { - Id = Guid.NewGuid(), - ContactId = SeedDataConstants.KhachaturId, - UserId = SeedDataConstants.KolbasatorId, - CreatedAt = DateTime.UtcNow, - }, - - // Amelit Contacts - new UserContactEntity - { - Id = Guid.NewGuid(), - ContactId = SeedDataConstants.RazumovskyId, - UserId = SeedDataConstants.AmelitId, - CreatedAt = DateTime.UtcNow, - }); + // builder.HasData( + // // Petro Contacts + // new UserContactEntity + // { + // Id = Guid.NewGuid(), + // ContactId = SeedDataConstants.SzymonId, + // UserId = SeedDataConstants.PetroId, + // CreatedAt = DateTime.UtcNow, + // }, + // new UserContactEntity + // { + // Id = Guid.NewGuid(), + // ContactId = SeedDataConstants.IlliaId, + // UserId = SeedDataConstants.PetroId, + // CreatedAt = DateTime.UtcNow, + // }, + // new UserContactEntity + // { + // Id = Guid.NewGuid(), + // ContactId = SeedDataConstants.ArslanbekId, + // UserId = SeedDataConstants.PetroId, + // CreatedAt = DateTime.UtcNow, + // }, + // new UserContactEntity + // { + // Id = Guid.NewGuid(), + // ContactId = SeedDataConstants.SerhiiId, + // UserId = SeedDataConstants.PetroId, + // CreatedAt = DateTime.UtcNow, + // }, + // + // // Szymon Contacts + // new UserContactEntity + // { + // Id = Guid.NewGuid(), + // ContactId = SeedDataConstants.PetroId, + // UserId = SeedDataConstants.SzymonId, + // CreatedAt = DateTime.UtcNow, + // }, + // new UserContactEntity + // { + // Id = Guid.NewGuid(), + // ContactId = SeedDataConstants.IlliaId, + // UserId = SeedDataConstants.SzymonId, + // CreatedAt = DateTime.UtcNow, + // }, + // new UserContactEntity + // { + // Id = Guid.NewGuid(), + // ContactId = SeedDataConstants.ArslanbekId, + // UserId = SeedDataConstants.SzymonId, + // CreatedAt = DateTime.UtcNow, + // }, + // new UserContactEntity + // { + // Id = Guid.NewGuid(), + // ContactId = SeedDataConstants.SerhiiId, + // UserId = SeedDataConstants.SzymonId, + // CreatedAt = DateTime.UtcNow, + // }, + // + // // Illia Contacts + // new UserContactEntity + // { + // Id = Guid.NewGuid(), + // ContactId = SeedDataConstants.PetroId, + // UserId = SeedDataConstants.IlliaId, + // CreatedAt = DateTime.UtcNow, + // }, + // new UserContactEntity + // { + // Id = Guid.NewGuid(), + // ContactId = SeedDataConstants.SzymonId, + // UserId = SeedDataConstants.IlliaId, + // CreatedAt = DateTime.UtcNow, + // }, + // new UserContactEntity + // { + // Id = Guid.NewGuid(), + // ContactId = SeedDataConstants.ArslanbekId, + // UserId = SeedDataConstants.IlliaId, + // CreatedAt = DateTime.UtcNow, + // }, + // new UserContactEntity + // { + // Id = Guid.NewGuid(), + // ContactId = SeedDataConstants.SerhiiId, + // UserId = SeedDataConstants.IlliaId, + // CreatedAt = DateTime.UtcNow, + // }, + // + // // Serhii Contacts + // new UserContactEntity + // { + // Id = Guid.NewGuid(), + // ContactId = SeedDataConstants.PetroId, + // UserId = SeedDataConstants.SerhiiId, + // CreatedAt = DateTime.UtcNow, + // }, + // new UserContactEntity + // { + // Id = Guid.NewGuid(), + // ContactId = SeedDataConstants.SzymonId, + // UserId = SeedDataConstants.SerhiiId, + // CreatedAt = DateTime.UtcNow, + // }, + // new UserContactEntity + // { + // Id = Guid.NewGuid(), + // ContactId = SeedDataConstants.ArslanbekId, + // UserId = SeedDataConstants.SerhiiId, + // CreatedAt = DateTime.UtcNow, + // }, + // new UserContactEntity + // { + // Id = Guid.NewGuid(), + // ContactId = SeedDataConstants.IlliaId, + // UserId = SeedDataConstants.SerhiiId, + // CreatedAt = DateTime.UtcNow, + // }, + // + // // Arslanbek Contacts + // new UserContactEntity + // { + // Id = Guid.NewGuid(), + // ContactId = SeedDataConstants.PetroId, + // UserId = SeedDataConstants.ArslanbekId, + // CreatedAt = DateTime.UtcNow, + // }, + // new UserContactEntity + // { + // Id = Guid.NewGuid(), + // ContactId = SeedDataConstants.SzymonId, + // UserId = SeedDataConstants.ArslanbekId, + // CreatedAt = DateTime.UtcNow, + // }, + // new UserContactEntity + // { + // Id = Guid.NewGuid(), + // ContactId = SeedDataConstants.SerhiiId, + // UserId = SeedDataConstants.ArslanbekId, + // CreatedAt = DateTime.UtcNow, + // }, + // new UserContactEntity + // { + // Id = Guid.NewGuid(), + // ContactId = SeedDataConstants.IlliaId, + // UserId = SeedDataConstants.ArslanbekId, + // CreatedAt = DateTime.UtcNow, + // }, + // + // // Khachatur Contacts + // new UserContactEntity + // { + // Id = Guid.NewGuid(), + // ContactId = SeedDataConstants.RazumovskyId, + // UserId = SeedDataConstants.KhachaturId, + // CreatedAt = DateTime.UtcNow, + // }, + // + // // Razumovsky Contacts + // new UserContactEntity + // { + // Id = Guid.NewGuid(), + // ContactId = SeedDataConstants.KhachaturId, + // UserId = SeedDataConstants.RazumovskyId, + // CreatedAt = DateTime.UtcNow, + // }, + // new UserContactEntity + // { + // Id = Guid.NewGuid(), + // ContactId = SeedDataConstants.SzymonId, + // UserId = SeedDataConstants.RazumovskyId, + // CreatedAt = DateTime.UtcNow, + // }, + // new UserContactEntity + // { + // Id = Guid.NewGuid(), + // ContactId = SeedDataConstants.IlliaId, + // UserId = SeedDataConstants.RazumovskyId, + // CreatedAt = DateTime.UtcNow, + // }, + // new UserContactEntity + // { + // Id = Guid.NewGuid(), + // ContactId = SeedDataConstants.KolbasatorId, + // UserId = SeedDataConstants.RazumovskyId, + // CreatedAt = DateTime.UtcNow, + // }, + // new UserContactEntity + // { + // Id = Guid.NewGuid(), + // ContactId = SeedDataConstants.AmelitId, + // UserId = SeedDataConstants.RazumovskyId, + // CreatedAt = DateTime.UtcNow, + // }, + // + // // Kolbasator Contacts + // new UserContactEntity + // { + // Id = Guid.NewGuid(), + // ContactId = SeedDataConstants.KhachaturId, + // UserId = SeedDataConstants.KolbasatorId, + // CreatedAt = DateTime.UtcNow, + // }, + // + // // Amelit Contacts + // new UserContactEntity + // { + // Id = Guid.NewGuid(), + // ContactId = SeedDataConstants.RazumovskyId, + // UserId = SeedDataConstants.AmelitId, + // CreatedAt = DateTime.UtcNow, + // }); } } \ No newline at end of file diff --git a/MangoAPI.Infrastructure/Database/Configurations/UserEntityConfiguration.cs b/MangoAPI.Infrastructure/Database/Configurations/UserEntityConfiguration.cs index 4efa4de19..94ad8acd0 100644 --- a/MangoAPI.Infrastructure/Database/Configurations/UserEntityConfiguration.cs +++ b/MangoAPI.Infrastructure/Database/Configurations/UserEntityConfiguration.cs @@ -29,155 +29,155 @@ public void Configure(EntityTypeBuilder builder) .WithOne(x => x.User) .HasForeignKey(x => x.UserId); - var user1 = new UserEntity - { - PhoneNumber = "374775554310", - DisplayName = "Khachatur Khachatryan", - DisplayNameColour = DisplayNameColour.BrightYellow, - Bio = "13 y. o. | C# pozer, Hearts Of Iron IV noob", - Id = SeedDataConstants.KhachaturId, - UserName = "KHACHATUR228", - Email = "xachulxx@gmail.com", - NormalizedEmail = "XACHULXX@GMAIL.COM", - EmailConfirmed = true, - PhoneNumberConfirmed = true, - Image = "khachatur_picture.jpg", - }; - - var user2 = new UserEntity - { - PhoneNumber = "48743615532", - DisplayName = "razumovsky r", - DisplayNameColour = DisplayNameColour.Pink, - Bio = "11011 y.o Dotnet Developer from $\"{cityName}\"", - Id = SeedDataConstants.RazumovskyId, - UserName = "razumovsky_r", - Email = "kolosovp95@gmail.com", - NormalizedEmail = "KOLOSOVP94@GMAIL.COM", - EmailConfirmed = true, - PhoneNumberConfirmed = true, - Image = "razumovsky_picture.jpg", - }; - - var user3 = new UserEntity - { - PhoneNumber = "77017506265", - DisplayName = "Мусяка Колбасяка", - DisplayNameColour = DisplayNameColour.Green, - Bio = "Колбасятор.", - Id = SeedDataConstants.KolbasatorId, - UserName = "kolbasator", - Email = "kolbasator@gmail.com", - NormalizedEmail = "KOLBASATOR@GMAIL.COM", - EmailConfirmed = true, - PhoneNumberConfirmed = true, - Image = "musyaka_picture.jpg", - }; - - var user4 = new UserEntity - { - PhoneNumber = "12025550152", - DisplayName = "Amelit", - DisplayNameColour = DisplayNameColour.Yellow, - Bio = "Дипломат", - Id = SeedDataConstants.AmelitId, - UserName = "TheMoonlightSonata", - Email = "amelit@gmail.com", - NormalizedEmail = "AMELIT@GMAIL.COM", - EmailConfirmed = true, - PhoneNumberConfirmed = true, - Image = "amelit_picture.jpg", - }; - - var user5 = new UserEntity - { - PhoneNumber = "48743615532", - DisplayName = "Petro Kolosov", - DisplayNameColour = DisplayNameColour.White, - Bio = "Third year student of WSB at Poznan", - Id = SeedDataConstants.PetroId, - UserName = "petro.kolosov", - Email = "petro.kolosov@wp.pl", - NormalizedEmail = "PETRO.KOLOSOV@WP.PL", - EmailConfirmed = true, - PhoneNumberConfirmed = true, - Image = "razumovsky_picture.jpg", - }; - - var user6 = new UserEntity - { - PhoneNumber = "48743615532", - DisplayName = "Szymon Murawski", - DisplayNameColour = DisplayNameColour.Aqua, - Bio = "Teacher of Computer Science at WSB Poznan", - Id = SeedDataConstants.SzymonId, - UserName = "szymon.murawski", - Email = "szymon.murawski@wp.pl", - NormalizedEmail = "SZYMON.MURAWSKI@WP.PL", - EmailConfirmed = true, - PhoneNumberConfirmed = true, - Image = "szymon_picture.png", - }; - - var user7 = new UserEntity - { - PhoneNumber = "48352643123", - DisplayName = "Illia Zubachov", - DisplayNameColour = DisplayNameColour.Orange, - Bio = "Third year student of WSB at Poznan", - Id = SeedDataConstants.IlliaId, - UserName = "illia.zubachov", - Email = "illia.zubachov@wp.pl", - NormalizedEmail = "ILLIA.ZUBACHOW@WP.PL", - EmailConfirmed = true, - PhoneNumberConfirmed = true, - Image = "illia_picture.png", - }; - - var user8 = new UserEntity - { - PhoneNumber = "48278187781", - DisplayName = "Arslanbek Temirbekov", - DisplayNameColour = DisplayNameColour.Blue, - Bio = "Third year student of WSB at Poznan", - Id = SeedDataConstants.ArslanbekId, - UserName = "arslanbek.temirbekov", - Email = "arslanbek.temirbekov@wp.pl", - NormalizedEmail = "ARSLANBEK.TEMIRBEKOV@WP.PL", - EmailConfirmed = true, - PhoneNumberConfirmed = true, - Image = "arslan_picture.png", - }; - - var user9 = new UserEntity - { - PhoneNumber = "48175481653", - DisplayName = "Serhii Holishevskii", - DisplayNameColour = DisplayNameColour.Violet, - Bio = "Third year student of WSB at Poznan", - Id = SeedDataConstants.SerhiiId, - UserName = "serhii.holishevskii", - Email = "serhii.holishevskii@wp.pl", - NormalizedEmail = "SERHII.HOLISHEVSKII@WP.PL", - EmailConfirmed = true, - PhoneNumberConfirmed = true, - Image = "serhii_picture.png", - }; - - var passwordHasher = new PasswordHashService(); - - const string seedPassword = "Dn2-~bRPw+*vR9(cw^84"; - - passwordHasher.HashPassword(user1, seedPassword); - passwordHasher.HashPassword(user2, seedPassword); - passwordHasher.HashPassword(user3, seedPassword); - passwordHasher.HashPassword(user4, seedPassword); - passwordHasher.HashPassword(user5, seedPassword); - passwordHasher.HashPassword(user6, seedPassword); - passwordHasher.HashPassword(user7, seedPassword); - passwordHasher.HashPassword(user8, seedPassword); - passwordHasher.HashPassword(user9, seedPassword); - - builder.HasData(user1, user2, user3, user4, user5, user6, user7, user8, user9); + // var user1 = new UserEntity + // { + // PhoneNumber = "374775554310", + // DisplayName = "Khachatur Khachatryan", + // DisplayNameColour = DisplayNameColour.BrightYellow, + // Bio = "13 y. o. | C# pozer, Hearts Of Iron IV noob", + // Id = SeedDataConstants.KhachaturId, + // UserName = "KHACHATUR228", + // Email = "xachulxx@gmail.com", + // NormalizedEmail = "XACHULXX@GMAIL.COM", + // EmailConfirmed = true, + // PhoneNumberConfirmed = true, + // Image = "khachatur_picture.jpg", + // }; + // + // var user2 = new UserEntity + // { + // PhoneNumber = "48743615532", + // DisplayName = "razumovsky r", + // DisplayNameColour = DisplayNameColour.Pink, + // Bio = "11011 y.o Dotnet Developer from $\"{cityName}\"", + // Id = SeedDataConstants.RazumovskyId, + // UserName = "razumovsky_r", + // Email = "kolosovp95@gmail.com", + // NormalizedEmail = "KOLOSOVP94@GMAIL.COM", + // EmailConfirmed = true, + // PhoneNumberConfirmed = true, + // Image = "razumovsky_picture.jpg", + // }; + // + // var user3 = new UserEntity + // { + // PhoneNumber = "77017506265", + // DisplayName = "Мусяка Колбасяка", + // DisplayNameColour = DisplayNameColour.Green, + // Bio = "Колбасятор.", + // Id = SeedDataConstants.KolbasatorId, + // UserName = "kolbasator", + // Email = "kolbasator@gmail.com", + // NormalizedEmail = "KOLBASATOR@GMAIL.COM", + // EmailConfirmed = true, + // PhoneNumberConfirmed = true, + // Image = "musyaka_picture.jpg", + // }; + // + // var user4 = new UserEntity + // { + // PhoneNumber = "12025550152", + // DisplayName = "Amelit", + // DisplayNameColour = DisplayNameColour.Yellow, + // Bio = "Дипломат", + // Id = SeedDataConstants.AmelitId, + // UserName = "TheMoonlightSonata", + // Email = "amelit@gmail.com", + // NormalizedEmail = "AMELIT@GMAIL.COM", + // EmailConfirmed = true, + // PhoneNumberConfirmed = true, + // Image = "amelit_picture.jpg", + // }; + // + // var user5 = new UserEntity + // { + // PhoneNumber = "48743615532", + // DisplayName = "Petro Kolosov", + // DisplayNameColour = DisplayNameColour.White, + // Bio = "Third year student of WSB at Poznan", + // Id = SeedDataConstants.PetroId, + // UserName = "petro.kolosov", + // Email = "petro.kolosov@wp.pl", + // NormalizedEmail = "PETRO.KOLOSOV@WP.PL", + // EmailConfirmed = true, + // PhoneNumberConfirmed = true, + // Image = "razumovsky_picture.jpg", + // }; + // + // var user6 = new UserEntity + // { + // PhoneNumber = "48743615532", + // DisplayName = "Szymon Murawski", + // DisplayNameColour = DisplayNameColour.Aqua, + // Bio = "Teacher of Computer Science at WSB Poznan", + // Id = SeedDataConstants.SzymonId, + // UserName = "szymon.murawski", + // Email = "szymon.murawski@wp.pl", + // NormalizedEmail = "SZYMON.MURAWSKI@WP.PL", + // EmailConfirmed = true, + // PhoneNumberConfirmed = true, + // Image = "szymon_picture.png", + // }; + // + // var user7 = new UserEntity + // { + // PhoneNumber = "48352643123", + // DisplayName = "Illia Zubachov", + // DisplayNameColour = DisplayNameColour.Orange, + // Bio = "Third year student of WSB at Poznan", + // Id = SeedDataConstants.IlliaId, + // UserName = "illia.zubachov", + // Email = "illia.zubachov@wp.pl", + // NormalizedEmail = "ILLIA.ZUBACHOW@WP.PL", + // EmailConfirmed = true, + // PhoneNumberConfirmed = true, + // Image = "illia_picture.png", + // }; + // + // var user8 = new UserEntity + // { + // PhoneNumber = "48278187781", + // DisplayName = "Arslanbek Temirbekov", + // DisplayNameColour = DisplayNameColour.Blue, + // Bio = "Third year student of WSB at Poznan", + // Id = SeedDataConstants.ArslanbekId, + // UserName = "arslanbek.temirbekov", + // Email = "arslanbek.temirbekov@wp.pl", + // NormalizedEmail = "ARSLANBEK.TEMIRBEKOV@WP.PL", + // EmailConfirmed = true, + // PhoneNumberConfirmed = true, + // Image = "arslan_picture.png", + // }; + // + // var user9 = new UserEntity + // { + // PhoneNumber = "48175481653", + // DisplayName = "Serhii Holishevskii", + // DisplayNameColour = DisplayNameColour.Violet, + // Bio = "Third year student of WSB at Poznan", + // Id = SeedDataConstants.SerhiiId, + // UserName = "serhii.holishevskii", + // Email = "serhii.holishevskii@wp.pl", + // NormalizedEmail = "SERHII.HOLISHEVSKII@WP.PL", + // EmailConfirmed = true, + // PhoneNumberConfirmed = true, + // Image = "serhii_picture.png", + // }; + // + // var passwordHasher = new PasswordHashService(); + // + // const string seedPassword = "Dn2-~bRPw+*vR9(cw^84"; + // + // passwordHasher.HashPassword(user1, seedPassword); + // passwordHasher.HashPassword(user2, seedPassword); + // passwordHasher.HashPassword(user3, seedPassword); + // passwordHasher.HashPassword(user4, seedPassword); + // passwordHasher.HashPassword(user5, seedPassword); + // passwordHasher.HashPassword(user6, seedPassword); + // passwordHasher.HashPassword(user7, seedPassword); + // passwordHasher.HashPassword(user8, seedPassword); + // passwordHasher.HashPassword(user9, seedPassword); + // + // builder.HasData(user1, user2, user3, user4, user5, user6, user7, user8, user9); } } diff --git a/MangoAPI.Infrastructure/Database/Configurations/UserInformationEntityConfiguration.cs b/MangoAPI.Infrastructure/Database/Configurations/UserInformationEntityConfiguration.cs index 3cac7228a..48192e9ad 100644 --- a/MangoAPI.Infrastructure/Database/Configurations/UserInformationEntityConfiguration.cs +++ b/MangoAPI.Infrastructure/Database/Configurations/UserInformationEntityConfiguration.cs @@ -14,124 +14,124 @@ public void Configure(EntityTypeBuilder builder) builder.HasKey(x => x.Id); - builder.HasData( - new UserInformationEntity - { - Id = Guid.NewGuid(), - UserId = SeedDataConstants.PetroId, - BirthDay = DateTime.UtcNow, - UpdatedAt = DateTime.UtcNow, - CreatedAt = DateTime.UtcNow, - Website = "petro.kolosov.com", - Instagram = "petro.kolosov", - LinkedIn = "petro.kolosov", - Facebook = "petro.kolosov", - Twitter = "petro.kolosov", - Address = "Poznan, Poland", - }, - new UserInformationEntity - { - Id = Guid.NewGuid(), - UserId = SeedDataConstants.IlliaId, - BirthDay = DateTime.UtcNow, - UpdatedAt = DateTime.UtcNow, - CreatedAt = DateTime.UtcNow, - Website = "illia.zubachov.com", - Instagram = "illia.zubachov", - LinkedIn = "illia.zubachov", - Facebook = "illia.zubachov", - Twitter = "illia.zubachov", - Address = "Poznan, Poland", - }, new UserInformationEntity - { - Id = Guid.NewGuid(), - UserId = SeedDataConstants.SerhiiId, - BirthDay = DateTime.UtcNow, - UpdatedAt = DateTime.UtcNow, - CreatedAt = DateTime.UtcNow, - Website = "serhii.holishevskii.com", - Instagram = "serhii.holishevskii", - LinkedIn = "serhii.holishevskii", - Facebook = "serhii.holishevskii", - Twitter = "serhii.holishevskii", - Address = "Poznan, Poland", - }, new UserInformationEntity - { - Id = Guid.NewGuid(), - UserId = SeedDataConstants.ArslanbekId, - BirthDay = DateTime.UtcNow, - UpdatedAt = DateTime.UtcNow, - CreatedAt = DateTime.UtcNow, - Website = "arslan.temirbekov.com", - Instagram = "arslan.temirbekov", - LinkedIn = "arslan.temirbekov", - Facebook = "arslan.temirbekov", - Twitter = "arslan.temirbekov", - Address = "Poznan, Poland", - }, - new UserInformationEntity - { - Id = Guid.NewGuid(), - UserId = SeedDataConstants.SzymonId, - BirthDay = DateTime.UtcNow, - UpdatedAt = DateTime.UtcNow, - CreatedAt = DateTime.UtcNow, - Website = "szymon.murawski.com", - Instagram = "szymon.murawski", - LinkedIn = "szymon.murawski", - Facebook = "szymon.murawski", - Twitter = "szymon.murawski", - Address = "Poznan, Poland", - }, - new UserInformationEntity - { - Id = Guid.NewGuid(), - UserId = SeedDataConstants.KhachaturId, - BirthDay = DateTime.UtcNow, - UpdatedAt = DateTime.UtcNow, - CreatedAt = DateTime.UtcNow, - Website = "khachapur.com", - Instagram = "khachapur.mudrenych", - LinkedIn = "khachapur.mudrenych", - Address = "Moscow, Russia", - }, - new UserInformationEntity - { - Id = Guid.NewGuid(), - UserId = SeedDataConstants.RazumovskyId, - BirthDay = DateTime.UtcNow, - UpdatedAt = DateTime.UtcNow, - CreatedAt = DateTime.UtcNow, - Address = "Odessa, Ukraine", - Website = "razumovsky.com", - Twitter = "razumovsky_r", - Facebook = "razumovsky_r", - Instagram = "razumovsky_r", - LinkedIn = "razumovsky_r", - }, - new UserInformationEntity - { - Id = Guid.NewGuid(), - UserId = SeedDataConstants.KolbasatorId, - BirthDay = DateTime.UtcNow, - UpdatedAt = DateTime.UtcNow, - CreatedAt = DateTime.UtcNow, - Website = "kolbasator.com", - Facebook = "kolbasator", - ProfilePicture = "profile.png", - Address = "Saint-Petersburg, Russia", - }, - new UserInformationEntity - { - Id = Guid.NewGuid(), - UserId = SeedDataConstants.AmelitId, - BirthDay = DateTime.UtcNow, - UpdatedAt = DateTime.UtcNow, - CreatedAt = DateTime.UtcNow, - Facebook = "TheMoonlightSonata", - Instagram = "TheMoonlightSonata", - Twitter = "TheMoonlightSonata", - Address = "Moscow, Russia", - }); + // builder.HasData( + // new UserInformationEntity + // { + // Id = Guid.NewGuid(), + // UserId = SeedDataConstants.PetroId, + // BirthDay = DateTime.UtcNow, + // UpdatedAt = DateTime.UtcNow, + // CreatedAt = DateTime.UtcNow, + // Website = "petro.kolosov.com", + // Instagram = "petro.kolosov", + // LinkedIn = "petro.kolosov", + // Facebook = "petro.kolosov", + // Twitter = "petro.kolosov", + // Address = "Poznan, Poland", + // }, + // new UserInformationEntity + // { + // Id = Guid.NewGuid(), + // UserId = SeedDataConstants.IlliaId, + // BirthDay = DateTime.UtcNow, + // UpdatedAt = DateTime.UtcNow, + // CreatedAt = DateTime.UtcNow, + // Website = "illia.zubachov.com", + // Instagram = "illia.zubachov", + // LinkedIn = "illia.zubachov", + // Facebook = "illia.zubachov", + // Twitter = "illia.zubachov", + // Address = "Poznan, Poland", + // }, new UserInformationEntity + // { + // Id = Guid.NewGuid(), + // UserId = SeedDataConstants.SerhiiId, + // BirthDay = DateTime.UtcNow, + // UpdatedAt = DateTime.UtcNow, + // CreatedAt = DateTime.UtcNow, + // Website = "serhii.holishevskii.com", + // Instagram = "serhii.holishevskii", + // LinkedIn = "serhii.holishevskii", + // Facebook = "serhii.holishevskii", + // Twitter = "serhii.holishevskii", + // Address = "Poznan, Poland", + // }, new UserInformationEntity + // { + // Id = Guid.NewGuid(), + // UserId = SeedDataConstants.ArslanbekId, + // BirthDay = DateTime.UtcNow, + // UpdatedAt = DateTime.UtcNow, + // CreatedAt = DateTime.UtcNow, + // Website = "arslan.temirbekov.com", + // Instagram = "arslan.temirbekov", + // LinkedIn = "arslan.temirbekov", + // Facebook = "arslan.temirbekov", + // Twitter = "arslan.temirbekov", + // Address = "Poznan, Poland", + // }, + // new UserInformationEntity + // { + // Id = Guid.NewGuid(), + // UserId = SeedDataConstants.SzymonId, + // BirthDay = DateTime.UtcNow, + // UpdatedAt = DateTime.UtcNow, + // CreatedAt = DateTime.UtcNow, + // Website = "szymon.murawski.com", + // Instagram = "szymon.murawski", + // LinkedIn = "szymon.murawski", + // Facebook = "szymon.murawski", + // Twitter = "szymon.murawski", + // Address = "Poznan, Poland", + // }, + // new UserInformationEntity + // { + // Id = Guid.NewGuid(), + // UserId = SeedDataConstants.KhachaturId, + // BirthDay = DateTime.UtcNow, + // UpdatedAt = DateTime.UtcNow, + // CreatedAt = DateTime.UtcNow, + // Website = "khachapur.com", + // Instagram = "khachapur.mudrenych", + // LinkedIn = "khachapur.mudrenych", + // Address = "Moscow, Russia", + // }, + // new UserInformationEntity + // { + // Id = Guid.NewGuid(), + // UserId = SeedDataConstants.RazumovskyId, + // BirthDay = DateTime.UtcNow, + // UpdatedAt = DateTime.UtcNow, + // CreatedAt = DateTime.UtcNow, + // Address = "Odessa, Ukraine", + // Website = "razumovsky.com", + // Twitter = "razumovsky_r", + // Facebook = "razumovsky_r", + // Instagram = "razumovsky_r", + // LinkedIn = "razumovsky_r", + // }, + // new UserInformationEntity + // { + // Id = Guid.NewGuid(), + // UserId = SeedDataConstants.KolbasatorId, + // BirthDay = DateTime.UtcNow, + // UpdatedAt = DateTime.UtcNow, + // CreatedAt = DateTime.UtcNow, + // Website = "kolbasator.com", + // Facebook = "kolbasator", + // ProfilePicture = "profile.png", + // Address = "Saint-Petersburg, Russia", + // }, + // new UserInformationEntity + // { + // Id = Guid.NewGuid(), + // UserId = SeedDataConstants.AmelitId, + // BirthDay = DateTime.UtcNow, + // UpdatedAt = DateTime.UtcNow, + // CreatedAt = DateTime.UtcNow, + // Facebook = "TheMoonlightSonata", + // Instagram = "TheMoonlightSonata", + // Twitter = "TheMoonlightSonata", + // Address = "Moscow, Russia", + // }); } } \ No newline at end of file diff --git a/MangoAPI.Infrastructure/Migrations/20221104214809_Initial.Designer.cs b/MangoAPI.Infrastructure/Migrations/20221104214809_Initial.Designer.cs deleted file mode 100644 index d06472c08..000000000 --- a/MangoAPI.Infrastructure/Migrations/20221104214809_Initial.Designer.cs +++ /dev/null @@ -1,1822 +0,0 @@ -// -using System; -using MangoAPI.Infrastructure.Database; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace MangoAPI.Infrastructure.Migrations -{ - [DbContext(typeof(MangoDbContext))] - [Migration("20221104214809_Initial")] - partial class Initial - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "6.0.10") - .HasAnnotation("Relational:MaxIdentifierLength", 128); - - SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1); - - modelBuilder.Entity("MangoAPI.Domain.Entities.ChatEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("CommunityType") - .HasColumnType("int"); - - b.Property("CreatedAt") - .HasColumnType("datetime2"); - - b.Property("Description") - .HasColumnType("nvarchar(max)"); - - b.Property("Image") - .HasColumnType("nvarchar(max)"); - - b.Property("LastMessageAuthor") - .HasColumnType("nvarchar(max)"); - - b.Property("LastMessageId") - .HasColumnType("uniqueidentifier"); - - b.Property("LastMessageText") - .HasColumnType("nvarchar(max)"); - - b.Property("LastMessageTime") - .HasColumnType("datetime2"); - - b.Property("MembersCount") - .HasColumnType("int"); - - b.Property("Title") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("UpdatedAt") - .HasColumnType("datetime2"); - - b.HasKey("Id"); - - b.ToTable("ChatEntity", "mango"); - - b.HasData( - new - { - Id = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - CommunityType = 2, - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2254), - Description = "WSB Public Group", - Image = "wsb_group_logo.png", - LastMessageAuthor = "Szymon Murawski", - LastMessageText = "Great! Good luck to all of you", - LastMessageTime = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2258), - MembersCount = 5, - Title = "WSB", - UpdatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2256) - }, - new - { - Id = new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), - CommunityType = 2, - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2260), - Description = "Extreme Code Main Public Group", - Image = "extreme_code_main.jpg", - LastMessageAuthor = "Amelit", - LastMessageText = "TypeScript The Best", - LastMessageTime = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2261), - MembersCount = 4, - Title = "Extreme Code Main", - UpdatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2260) - }, - new - { - Id = new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), - CommunityType = 2, - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2262), - Description = "Extreme Code Flood Public Group", - Image = "extremecode_rest_logo.jpg", - LastMessageAuthor = "Amelit", - LastMessageText = "Слава Партии!!", - LastMessageTime = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2263), - MembersCount = 4, - Title = "Extreme Code Flood", - UpdatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2262) - }, - new - { - Id = new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), - CommunityType = 2, - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2264), - Description = "Extreme Code C++ Public Group", - Image = "extremecode_cpp_logo.jpg", - LastMessageAuthor = "Amelit", - LastMessageText = "Hello world!", - LastMessageTime = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2265), - MembersCount = 4, - Title = "Extreme Code C++", - UpdatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2264) - }, - new - { - Id = new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), - CommunityType = 2, - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2266), - Description = "Extreme Code .NET Public Group", - Image = "extremecode_dotnet.png", - LastMessageAuthor = "Amelit", - LastMessageText = "Hello world!", - LastMessageTime = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2267), - MembersCount = 4, - Title = "Extreme Code .NET", - UpdatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2266) - }, - new - { - Id = new Guid("f5b7824f-e52b-4246-9984-06fc8e964f0c"), - CommunityType = 1, - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2268), - Description = "Direct chat between Khachatur Khachatryan and razumovsky r", - LastMessageAuthor = "razumovsky r", - LastMessageText = "Hello world!", - LastMessageTime = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2269), - MembersCount = 2, - Title = "Khachatur Khachatryan / razumovsky r", - UpdatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2269) - }, - new - { - Id = new Guid("f8729a12-5746-443f-ad31-378d846fce30"), - CommunityType = 1, - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2270), - Description = "Direct chat between Мусяка Колбасяка and razumovsky r", - LastMessageAuthor = "razumovsky r", - LastMessageText = "Hello world!", - LastMessageTime = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2271), - MembersCount = 2, - Title = "Мусяка Колбасяка / razumovsky r", - UpdatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2270) - }, - new - { - Id = new Guid("b119914a-6d95-4047-bf8a-db27deeb7dc9"), - CommunityType = 1, - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2272), - Description = "Direct chat between Amelit and razumovsky r", - LastMessageAuthor = "razumovsky r", - LastMessageText = "Hello world!", - LastMessageTime = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2273), - MembersCount = 2, - Title = "Amelit / razumovsky r", - UpdatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2272) - }, - new - { - Id = new Guid("9f205dde-0ddc-401f-8fe9-6c794b661f5d"), - CommunityType = 1, - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2327), - Description = "Direct chat between Khachatur Khachatryan and Мусяка Колбасяка", - LastMessageAuthor = "Khachatur Khachatryan", - LastMessageText = "Hello world!", - LastMessageTime = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2328), - MembersCount = 2, - Title = "Khachatur Khachatryan / Мусяка Колбасяка", - UpdatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2327) - }, - new - { - Id = new Guid("3fce8b2c-252d-4514-a1bb-fbdf73c47b78"), - CommunityType = 1, - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2329), - Description = "Direct chat between Petro Kolosov and Szymon Murawski", - LastMessageAuthor = "Petro Kolosov", - LastMessageText = "Hello world!", - LastMessageTime = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2330), - MembersCount = 2, - Title = "Petro Kolosov / Szymon Murawski", - UpdatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2329) - }); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.DiffieHellmanKeyExchangeEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("CreatedAt") - .HasColumnType("datetime2"); - - b.Property("IsConfirmed") - .HasColumnType("bit"); - - b.Property("KeyExchangeType") - .HasColumnType("int"); - - b.Property("ReceiverId") - .HasColumnType("uniqueidentifier"); - - b.Property("ReceiverPublicKey") - .HasColumnType("varbinary(max)"); - - b.Property("SenderId") - .HasColumnType("uniqueidentifier"); - - b.Property("SenderPublicKey") - .IsRequired() - .HasColumnType("varbinary(max)"); - - b.Property("UpdatedAt") - .HasColumnType("datetime2"); - - b.HasKey("Id"); - - b.ToTable("DiffieHellmanKeyExchangeEntity", "mango"); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.DiffieHellmanParameterEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("CreatedAt") - .HasColumnType("datetime2"); - - b.Property("CreatedBy") - .HasColumnType("uniqueidentifier"); - - b.Property("OpenSslDhParameter") - .IsRequired() - .HasColumnType("varbinary(max)"); - - b.HasKey("Id"); - - b.ToTable("DiffieHellmanParameterEntity", "mango"); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.DocumentEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("FileName") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("UploadedAt") - .HasColumnType("datetime2"); - - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("DocumentEntity", "mango"); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.MessageEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("Attachment") - .HasColumnType("nvarchar(max)"); - - b.Property("ChatId") - .HasColumnType("uniqueidentifier"); - - b.Property("Content") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("CreatedAt") - .HasColumnType("datetime2"); - - b.Property("InReplayToAuthor") - .HasColumnType("nvarchar(max)"); - - b.Property("InReplayToText") - .HasColumnType("nvarchar(max)"); - - b.Property("UpdatedAt") - .HasColumnType("datetime2"); - - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("ChatId"); - - b.HasIndex("UserId"); - - b.ToTable("MessageEntity", "mango"); - - b.HasData( - new - { - Id = new Guid("1c03dd4e-a1dd-4e52-8d68-9862c95101bf"), - ChatId = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - Content = "Hello guys, how your diploma project goes?", - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5541), - UserId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") - }, - new - { - Id = new Guid("eab3e30d-54ae-4869-9f2e-b54162a8de7d"), - ChatId = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - Content = "Well, I'm doing UI/UX part of the project", - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5543), - UserId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") - }, - new - { - Id = new Guid("7c8e1119-cec2-47da-9d96-a1896958eebc"), - ChatId = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - Content = "Hi teacher, I perform QA of the current version", - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5545), - UserId = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") - }, - new - { - Id = new Guid("37968de3-48a3-495a-a749-41c77714a192"), - ChatId = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - Content = "Greetings. I currently workout the back-end part", - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5546), - UserId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") - }, - new - { - Id = new Guid("373c335f-9187-4f3c-83ea-bfc5e4e9e8fa"), - ChatId = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - Content = "I work with backend too...", - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5547), - UserId = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") - }, - new - { - Id = new Guid("5ab96662-f709-4b91-af3e-ccfdd8e6b953"), - ChatId = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - Content = "Great! Good luck to all of you", - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5548), - UserId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") - }, - new - { - Id = new Guid("f443334d-0638-4630-a365-073fc9d96489"), - ChatId = new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), - Content = "Hello World", - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5549), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") - }, - new - { - Id = new Guid("86e20fcb-11b4-4f2e-a7ba-6e255660116b"), - ChatId = new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), - Content = "F# The Best", - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5550), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("2a820834-1ee6-477c-8ce1-a25fb638b5fa"), - ChatId = new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), - Content = "C# The Best", - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5553), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") - }, - new - { - Id = new Guid("472dd368-5d38-425b-896c-53102d71ebe6"), - ChatId = new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), - Content = "TypeScript The Best", - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5554), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") - }, - new - { - Id = new Guid("1ac7cf8d-f488-486a-8c7d-a07aca7c5438"), - ChatId = new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), - Content = "Слава Партии!!", - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5555), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") - }, - new - { - Id = new Guid("2b230ae7-366a-44ab-93ac-c874bf34d26c"), - ChatId = new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), - Content = "Слава Партии!!", - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5556), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("bd61cf2d-def0-4e46-b107-0a299c44a235"), - ChatId = new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), - Content = "Слава Партии!!", - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5557), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") - }, - new - { - Id = new Guid("3e07d86e-809b-4cb6-a628-19a23422764a"), - ChatId = new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), - Content = "Слава Партии!!", - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5558), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") - }, - new - { - Id = new Guid("21df2608-e233-4d5b-bfe6-ae923aceef59"), - ChatId = new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), - Content = "Hello World", - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5559), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") - }, - new - { - Id = new Guid("da595b51-c294-4ba1-910f-e87089f1cef5"), - ChatId = new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), - Content = "Hello World", - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5560), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("47285cd9-3a12-4db8-bece-eaad8d45ee4f"), - ChatId = new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), - Content = "Hello World", - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5562), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") - }, - new - { - Id = new Guid("8a57d2fd-7d70-41ed-ab25-a2e43a490567"), - ChatId = new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), - Content = "Hello World", - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5563), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") - }, - new - { - Id = new Guid("f3c7feac-a4cc-43de-b56e-11ac67210589"), - ChatId = new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), - Content = "Hello World", - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5564), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") - }, - new - { - Id = new Guid("cbb49dd0-0004-4d96-8d47-df3956b5c69d"), - ChatId = new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), - Content = "Hello World", - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5565), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("b814bdb3-58a1-43e7-82b6-b1bf259ca795"), - ChatId = new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), - Content = "Hello World", - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5566), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") - }, - new - { - Id = new Guid("6c7cdfa2-f07a-44a3-a0f8-79266d9d3e2b"), - ChatId = new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), - Content = "Hello World", - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5567), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") - }, - new - { - Id = new Guid("edf796ea-e49c-436c-a637-dee09a25b249"), - ChatId = new Guid("f5b7824f-e52b-4246-9984-06fc8e964f0c"), - Content = "Hello World", - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5567), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") - }, - new - { - Id = new Guid("6c58a80d-a2aa-404f-b896-ec1bdca0e02f"), - ChatId = new Guid("f5b7824f-e52b-4246-9984-06fc8e964f0c"), - Content = "Hello World", - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5568), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("d600aa80-853b-4e6d-b0fa-b70161c063b8"), - ChatId = new Guid("f8729a12-5746-443f-ad31-378d846fce30"), - Content = "Hello World", - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5570), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") - }, - new - { - Id = new Guid("268c3cb9-cb40-4b4c-8fb1-e7f872eb9f27"), - ChatId = new Guid("f8729a12-5746-443f-ad31-378d846fce30"), - Content = "Hello World", - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5571), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("896ad499-29b1-4636-8a35-aea6a186bcdd"), - ChatId = new Guid("b119914a-6d95-4047-bf8a-db27deeb7dc9"), - Content = "Hello World", - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5572), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") - }, - new - { - Id = new Guid("eb41b14a-1631-438e-b448-b5ff963d1a81"), - ChatId = new Guid("b119914a-6d95-4047-bf8a-db27deeb7dc9"), - Content = "Hello World", - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5573), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("faeabdee-f6bf-47b7-afe2-5fb15be2342d"), - ChatId = new Guid("9f205dde-0ddc-401f-8fe9-6c794b661f5d"), - Content = "Hello World", - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5574), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") - }, - new - { - Id = new Guid("96eb8a64-2e4f-4f20-b4d3-5f7e86e6f8cb"), - ChatId = new Guid("9f205dde-0ddc-401f-8fe9-6c794b661f5d"), - Content = "Hello World", - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5575), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") - }, - new - { - Id = new Guid("3650c2e3-c1bd-47a0-9015-778fb7925dde"), - ChatId = new Guid("3fce8b2c-252d-4514-a1bb-fbdf73c47b78"), - Content = "Hi teacher", - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5602), - UserId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") - }); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.PasswordRestoreRequestEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("CreatedAt") - .HasColumnType("datetime2"); - - b.Property("Email") - .HasColumnType("nvarchar(max)"); - - b.Property("ExpiresAt") - .HasColumnType("datetime2"); - - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("PasswordRestoreRequestEntity", "mango"); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.RoleEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("nvarchar(max)"); - - b.Property("Name") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("NormalizedName") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName") - .IsUnique() - .HasDatabaseName("RoleNameIndex") - .HasFilter("[NormalizedName] IS NOT NULL"); - - b.ToTable("AspNetRoles", (string)null); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.SessionEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("CreatedAt") - .HasColumnType("datetime2"); - - b.Property("ExpiresAt") - .HasColumnType("datetime2"); - - b.Property("RefreshToken") - .HasColumnType("uniqueidentifier"); - - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("SessionEntity", "mango"); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.UserChatEntity", b => - { - b.Property("ChatId") - .HasColumnType("uniqueidentifier"); - - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.Property("IsArchived") - .HasColumnType("bit"); - - b.Property("RoleId") - .HasColumnType("int"); - - b.HasKey("ChatId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("UserChatEntity", "mango"); - - b.HasData( - new - { - ChatId = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - UserId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), - IsArchived = false, - RoleId = 2 - }, - new - { - ChatId = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - UserId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), - IsArchived = false, - RoleId = 4 - }, - new - { - ChatId = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - UserId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - UserId = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - UserId = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - IsArchived = false, - RoleId = 3 - }, - new - { - ChatId = new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), - IsArchived = false, - RoleId = 2 - }, - new - { - ChatId = new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), - IsArchived = false, - RoleId = 4 - }, - new - { - ChatId = new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - IsArchived = false, - RoleId = 4 - }, - new - { - ChatId = new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), - IsArchived = false, - RoleId = 2 - }, - new - { - ChatId = new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), - IsArchived = false, - RoleId = 4 - }, - new - { - ChatId = new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - IsArchived = false, - RoleId = 3 - }, - new - { - ChatId = new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - IsArchived = false, - RoleId = 4 - }, - new - { - ChatId = new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("f5b7824f-e52b-4246-9984-06fc8e964f0c"), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("f5b7824f-e52b-4246-9984-06fc8e964f0c"), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("f8729a12-5746-443f-ad31-378d846fce30"), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("f8729a12-5746-443f-ad31-378d846fce30"), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("b119914a-6d95-4047-bf8a-db27deeb7dc9"), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("b119914a-6d95-4047-bf8a-db27deeb7dc9"), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("9f205dde-0ddc-401f-8fe9-6c794b661f5d"), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("9f205dde-0ddc-401f-8fe9-6c794b661f5d"), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("3fce8b2c-252d-4514-a1bb-fbdf73c47b78"), - UserId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("3fce8b2c-252d-4514-a1bb-fbdf73c47b78"), - UserId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), - IsArchived = false, - RoleId = 1 - }); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.UserContactEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("ContactId") - .HasColumnType("uniqueidentifier"); - - b.Property("CreatedAt") - .HasColumnType("datetime2"); - - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("UserContactEntity", "mango"); - - b.HasData( - new - { - Id = new Guid("aa62f6a0-bf42-4e67-8f69-4a5b7c74c599"), - ContactId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9398), - UserId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") - }, - new - { - Id = new Guid("cfcc5a3a-16b0-49c9-82ae-4ef92737c1d4"), - ContactId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9404), - UserId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") - }, - new - { - Id = new Guid("28cbadd0-74e9-4ae0-a6b7-e8f1c5c034b7"), - ContactId = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9405), - UserId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") - }, - new - { - Id = new Guid("bf269103-8486-4a9f-98af-516896403edc"), - ContactId = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9406), - UserId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") - }, - new - { - Id = new Guid("39dcf9d7-6334-41f4-9ec9-5ba7bf6fea94"), - ContactId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9408), - UserId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") - }, - new - { - Id = new Guid("6903a014-7cc1-4218-9e67-0ac301da66a0"), - ContactId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9408), - UserId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") - }, - new - { - Id = new Guid("b3a08dd2-6188-4c60-94d9-a4489773b31e"), - ContactId = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9409), - UserId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") - }, - new - { - Id = new Guid("7df79375-20b7-4288-b3f0-3a031bb382b5"), - ContactId = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9410), - UserId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") - }, - new - { - Id = new Guid("4e43a6d8-9df4-4d66-9466-1ac90f55773d"), - ContactId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9411), - UserId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") - }, - new - { - Id = new Guid("de23a206-edb7-49df-b381-f6d7b82a4cb8"), - ContactId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9413), - UserId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") - }, - new - { - Id = new Guid("dcdfdde7-fb04-4890-9056-912df2b64a9e"), - ContactId = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9415), - UserId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") - }, - new - { - Id = new Guid("c5e4f63e-4822-4c84-ad96-b66343546bdd"), - ContactId = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9416), - UserId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") - }, - new - { - Id = new Guid("03eb362d-08a3-4a0e-a0a9-89af8893f8d5"), - ContactId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9417), - UserId = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") - }, - new - { - Id = new Guid("ce8ba232-f16d-420c-a4fb-4111b62d0711"), - ContactId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9418), - UserId = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") - }, - new - { - Id = new Guid("b37b49e0-4576-421d-ad88-e9085ea7a313"), - ContactId = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9419), - UserId = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") - }, - new - { - Id = new Guid("ce6034f5-ad9c-4bdc-b8f4-d987d7dc761b"), - ContactId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9420), - UserId = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") - }, - new - { - Id = new Guid("83332d37-0c99-458a-8d45-008baa5ac3b1"), - ContactId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9420), - UserId = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") - }, - new - { - Id = new Guid("d10f7700-66de-4afa-b3ac-6addf5495019"), - ContactId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9422), - UserId = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") - }, - new - { - Id = new Guid("9ed9697e-66e2-45be-bf1b-eca257b0f9c4"), - ContactId = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9424), - UserId = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") - }, - new - { - Id = new Guid("a3898646-4e37-4cc0-969f-27b611013b9a"), - ContactId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9424), - UserId = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") - }, - new - { - Id = new Guid("e7eebf8f-00b4-4dd4-9928-90c90f7547dc"), - ContactId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9425), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") - }, - new - { - Id = new Guid("119387eb-49cb-47b0-aa55-32e2b3e0a355"), - ContactId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9428), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("e4af34b0-d832-4b6c-9f87-0e6e918faa8e"), - ContactId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9429), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("98aa09c0-2f5f-4bce-b868-201f73c018df"), - ContactId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9429), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("3be8cc49-8a56-4d93-b0cb-c5e0e9fd4957"), - ContactId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9430), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("2944e8fd-3e7e-4de2-8172-147a4f283242"), - ContactId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9432), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("a8a7e3a3-6c45-4ce2-b4a0-8f62c763f05c"), - ContactId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9433), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") - }, - new - { - Id = new Guid("81fb56e4-a6cc-41bd-80d0-6dea2ea53ef8"), - ContactId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9434), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") - }); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.UserEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("AccessFailedCount") - .HasColumnType("int"); - - b.Property("Bio") - .HasColumnType("nvarchar(max)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("nvarchar(max)"); - - b.Property("DisplayName") - .HasColumnType("nvarchar(max)"); - - b.Property("DisplayNameColour") - .HasColumnType("int"); - - b.Property("Email") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("EmailCode") - .HasColumnType("uniqueidentifier"); - - b.Property("EmailConfirmed") - .HasColumnType("bit"); - - b.Property("Image") - .HasColumnType("nvarchar(max)"); - - b.Property("LockoutEnabled") - .HasColumnType("bit"); - - b.Property("LockoutEnd") - .HasColumnType("datetimeoffset"); - - b.Property("NormalizedEmail") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("NormalizedUserName") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("PasswordHash") - .HasColumnType("nvarchar(max)"); - - b.Property("PhoneNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("PhoneNumberConfirmed") - .HasColumnType("bit"); - - b.Property("SecurityStamp") - .HasColumnType("nvarchar(max)"); - - b.Property("TwoFactorEnabled") - .HasColumnType("bit"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedEmail") - .HasDatabaseName("EmailIndex"); - - b.HasIndex("NormalizedUserName") - .IsUnique() - .HasDatabaseName("UserNameIndex") - .HasFilter("[NormalizedUserName] IS NOT NULL"); - - b.ToTable("UserEntity", "mango"); - - b.HasData( - new - { - Id = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), - AccessFailedCount = 0, - Bio = "13 y. o. | C# pozer, Hearts Of Iron IV noob", - ConcurrencyStamp = "522e4786-32bd-4a97-92c5-5365359f68e6", - DisplayName = "Khachatur Khachatryan", - DisplayNameColour = 6, - Email = "xachulxx@gmail.com", - EmailCode = new Guid("00000000-0000-0000-0000-000000000000"), - EmailConfirmed = true, - Image = "khachatur_picture.jpg", - LockoutEnabled = false, - NormalizedEmail = "XACHULXX@GMAIL.COM", - PasswordHash = "AQAAAAEAACcQAAAAEObkorKRuKUxlmCe59Y9FwPwMtlySvMKYvS3PcWO9/HYenjLQFKPXNebrvs4kmy2Sg==", - PhoneNumber = "374775554310", - PhoneNumberConfirmed = true, - TwoFactorEnabled = false, - UserName = "KHACHATUR228" - }, - new - { - Id = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - AccessFailedCount = 0, - Bio = "11011 y.o Dotnet Developer from $\"{cityName}\"", - ConcurrencyStamp = "afc55cbd-39a1-4f7a-8d3a-475c2812b669", - DisplayName = "razumovsky r", - DisplayNameColour = 9, - Email = "kolosovp95@gmail.com", - EmailCode = new Guid("00000000-0000-0000-0000-000000000000"), - EmailConfirmed = true, - Image = "razumovsky_picture.jpg", - LockoutEnabled = false, - NormalizedEmail = "KOLOSOVP94@GMAIL.COM", - PasswordHash = "AQAAAAEAACcQAAAAENvkbhWy0Z/XTv66FxwtQJqxFO2CdJ4n58o8hg6uOnyedzVPx7FuBlnYG0Ks/OuwIQ==", - PhoneNumber = "48743615532", - PhoneNumberConfirmed = true, - TwoFactorEnabled = false, - UserName = "razumovsky_r" - }, - new - { - Id = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), - AccessFailedCount = 0, - Bio = "Колбасятор.", - ConcurrencyStamp = "1011864e-f6b5-4bb2-a33e-3591f2aa00b3", - DisplayName = "Мусяка Колбасяка", - DisplayNameColour = 5, - Email = "kolbasator@gmail.com", - EmailCode = new Guid("00000000-0000-0000-0000-000000000000"), - EmailConfirmed = true, - Image = "musyaka_picture.jpg", - LockoutEnabled = false, - NormalizedEmail = "KOLBASATOR@GMAIL.COM", - PasswordHash = "AQAAAAEAACcQAAAAELCYFMvrwXaAEjP+52VmJ297CzY7Ig5r2Lm8rYZFm7dCYEgRaPkBuyOg48BGoEEkXA==", - PhoneNumber = "77017506265", - PhoneNumberConfirmed = true, - TwoFactorEnabled = false, - UserName = "kolbasator" - }, - new - { - Id = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), - AccessFailedCount = 0, - Bio = "Дипломат", - ConcurrencyStamp = "f07bd515-95aa-43b8-b941-c207277ae261", - DisplayName = "Amelit", - DisplayNameColour = 4, - Email = "amelit@gmail.com", - EmailCode = new Guid("00000000-0000-0000-0000-000000000000"), - EmailConfirmed = true, - Image = "amelit_picture.jpg", - LockoutEnabled = false, - NormalizedEmail = "AMELIT@GMAIL.COM", - PasswordHash = "AQAAAAEAACcQAAAAEGmH6ZXxVl/jLbBckatgaHmvARAt+RTnPAW4643/2rdPHpkj4gKpiIud5Tjx8siWVQ==", - PhoneNumber = "12025550152", - PhoneNumberConfirmed = true, - TwoFactorEnabled = false, - UserName = "TheMoonlightSonata" - }, - new - { - Id = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), - AccessFailedCount = 0, - Bio = "Third year student of WSB at Poznan", - ConcurrencyStamp = "e9703c4c-d8fe-4503-9208-18c7da552acc", - DisplayName = "Petro Kolosov", - DisplayNameColour = 1, - Email = "petro.kolosov@wp.pl", - EmailCode = new Guid("00000000-0000-0000-0000-000000000000"), - EmailConfirmed = true, - Image = "razumovsky_picture.jpg", - LockoutEnabled = false, - NormalizedEmail = "PETRO.KOLOSOV@WP.PL", - PasswordHash = "AQAAAAEAACcQAAAAEHJpIe+MnFlRx+oStyj205ivIYYtdYcZr5skI4vwKTowKxvtv4lLRNtvuz/e0Tpayg==", - PhoneNumber = "48743615532", - PhoneNumberConfirmed = true, - TwoFactorEnabled = false, - UserName = "petro.kolosov" - }, - new - { - Id = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), - AccessFailedCount = 0, - Bio = "Teacher of Computer Science at WSB Poznan", - ConcurrencyStamp = "1e9481a0-d03c-4127-ad2f-90effb4a07ee", - DisplayName = "Szymon Murawski", - DisplayNameColour = 7, - Email = "szymon.murawski@wp.pl", - EmailCode = new Guid("00000000-0000-0000-0000-000000000000"), - EmailConfirmed = true, - Image = "szymon_picture.png", - LockoutEnabled = false, - NormalizedEmail = "SZYMON.MURAWSKI@WP.PL", - PasswordHash = "AQAAAAEAACcQAAAAEPf1jxtSitoC3F2EtXVTffpjqPW3HSW7gcCizF348OGeEI0zXoM42yekeBen02zxUA==", - PhoneNumber = "48743615532", - PhoneNumberConfirmed = true, - TwoFactorEnabled = false, - UserName = "szymon.murawski" - }, - new - { - Id = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), - AccessFailedCount = 0, - Bio = "Third year student of WSB at Poznan", - ConcurrencyStamp = "64f45956-4411-4b43-b866-e0dba4128de7", - DisplayName = "Illia Zubachov", - DisplayNameColour = 10, - Email = "illia.zubachov@wp.pl", - EmailCode = new Guid("00000000-0000-0000-0000-000000000000"), - EmailConfirmed = true, - Image = "illia_picture.png", - LockoutEnabled = false, - NormalizedEmail = "ILLIA.ZUBACHOW@WP.PL", - PasswordHash = "AQAAAAEAACcQAAAAEHZQXltQSYg7bG71CwqVWSIMv95gSoNd4Hpab7taHLTErJs/3Q7ra0XQeZbwL2aqEg==", - PhoneNumber = "48352643123", - PhoneNumberConfirmed = true, - TwoFactorEnabled = false, - UserName = "illia.zubachov" - }, - new - { - Id = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), - AccessFailedCount = 0, - Bio = "Third year student of WSB at Poznan", - ConcurrencyStamp = "96007c9a-08db-4cc0-8203-f0bbdff53a06", - DisplayName = "Arslanbek Temirbekov", - DisplayNameColour = 2, - Email = "arslanbek.temirbekov@wp.pl", - EmailCode = new Guid("00000000-0000-0000-0000-000000000000"), - EmailConfirmed = true, - Image = "arslan_picture.png", - LockoutEnabled = false, - NormalizedEmail = "ARSLANBEK.TEMIRBEKOV@WP.PL", - PasswordHash = "AQAAAAEAACcQAAAAEG2aBxBUR4W2FT4vKbhDAruvgsVXEQv4D6LpCA44x4Iuwi+jBDwJ9ChBX8tLZrzKLw==", - PhoneNumber = "48278187781", - PhoneNumberConfirmed = true, - TwoFactorEnabled = false, - UserName = "arslanbek.temirbekov" - }, - new - { - Id = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), - AccessFailedCount = 0, - Bio = "Third year student of WSB at Poznan", - ConcurrencyStamp = "81bff22d-9c9a-44b2-bbf2-89df3031d25a", - DisplayName = "Serhii Holishevskii", - DisplayNameColour = 8, - Email = "serhii.holishevskii@wp.pl", - EmailCode = new Guid("00000000-0000-0000-0000-000000000000"), - EmailConfirmed = true, - Image = "serhii_picture.png", - LockoutEnabled = false, - NormalizedEmail = "SERHII.HOLISHEVSKII@WP.PL", - PasswordHash = "AQAAAAEAACcQAAAAEJ2+FLvSrlcZmqmgEwhIVWInWCF9WQKuGhEGG32CXzYnqMjiFmgalvmupEzAfXmjwQ==", - PhoneNumber = "48175481653", - PhoneNumberConfirmed = true, - TwoFactorEnabled = false, - UserName = "serhii.holishevskii" - }); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.UserInformationEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("Address") - .HasColumnType("nvarchar(max)"); - - b.Property("BirthDay") - .HasColumnType("datetime2"); - - b.Property("CreatedAt") - .HasColumnType("datetime2"); - - b.Property("Facebook") - .HasColumnType("nvarchar(max)"); - - b.Property("Instagram") - .HasColumnType("nvarchar(max)"); - - b.Property("LinkedIn") - .HasColumnType("nvarchar(max)"); - - b.Property("ProfilePicture") - .HasColumnType("nvarchar(max)"); - - b.Property("Twitter") - .HasColumnType("nvarchar(max)"); - - b.Property("UpdatedAt") - .HasColumnType("datetime2"); - - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.Property("Website") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("UserId") - .IsUnique(); - - b.ToTable("UserInformationEntity", "mango"); - - b.HasData( - new - { - Id = new Guid("b2bbbff1-9b12-4402-bbed-e0315ff73ed0"), - Address = "Poznan, Poland", - BirthDay = new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8122), - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8124), - Facebook = "petro.kolosov", - Instagram = "petro.kolosov", - LinkedIn = "petro.kolosov", - Twitter = "petro.kolosov", - UpdatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8124), - UserId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), - Website = "petro.kolosov.com" - }, - new - { - Id = new Guid("18395258-dc14-468b-b219-d31428d4ccf1"), - Address = "Poznan, Poland", - BirthDay = new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8127), - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8128), - Facebook = "illia.zubachov", - Instagram = "illia.zubachov", - LinkedIn = "illia.zubachov", - Twitter = "illia.zubachov", - UpdatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8128), - UserId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), - Website = "illia.zubachov.com" - }, - new - { - Id = new Guid("de20380f-1156-4fd5-a16c-1b93bab7aee2"), - Address = "Poznan, Poland", - BirthDay = new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8130), - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8131), - Facebook = "serhii.holishevskii", - Instagram = "serhii.holishevskii", - LinkedIn = "serhii.holishevskii", - Twitter = "serhii.holishevskii", - UpdatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8131), - UserId = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), - Website = "serhii.holishevskii.com" - }, - new - { - Id = new Guid("82862776-1f88-426a-ae46-c1613ee3f72a"), - Address = "Poznan, Poland", - BirthDay = new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8136), - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8137), - Facebook = "arslan.temirbekov", - Instagram = "arslan.temirbekov", - LinkedIn = "arslan.temirbekov", - Twitter = "arslan.temirbekov", - UpdatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8136), - UserId = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), - Website = "arslan.temirbekov.com" - }, - new - { - Id = new Guid("61c371d9-bc79-4ad7-b77b-43a5a129cd45"), - Address = "Poznan, Poland", - BirthDay = new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8138), - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8139), - Facebook = "szymon.murawski", - Instagram = "szymon.murawski", - LinkedIn = "szymon.murawski", - Twitter = "szymon.murawski", - UpdatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8139), - UserId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), - Website = "szymon.murawski.com" - }, - new - { - Id = new Guid("1090ae1a-9f98-46e6-9259-7ee4c95e9430"), - Address = "Moscow, Russia", - BirthDay = new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8140), - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8141), - Instagram = "khachapur.mudrenych", - LinkedIn = "khachapur.mudrenych", - UpdatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8141), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), - Website = "khachapur.com" - }, - new - { - Id = new Guid("363b03b0-21a0-46a8-b3ff-3c6d5169b698"), - Address = "Odessa, Ukraine", - BirthDay = new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8143), - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8144), - Facebook = "razumovsky_r", - Instagram = "razumovsky_r", - LinkedIn = "razumovsky_r", - Twitter = "razumovsky_r", - UpdatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8143), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - Website = "razumovsky.com" - }, - new - { - Id = new Guid("cc3f7cb4-bd75-4ddd-8faa-5e5e8e8d9839"), - Address = "Saint-Petersburg, Russia", - BirthDay = new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8145), - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8146), - Facebook = "kolbasator", - ProfilePicture = "profile.png", - UpdatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8145), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), - Website = "kolbasator.com" - }, - new - { - Id = new Guid("2b76d688-dd54-4dcd-a960-35a29d4ee2be"), - Address = "Moscow, Russia", - BirthDay = new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8147), - CreatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8148), - Facebook = "TheMoonlightSonata", - Instagram = "TheMoonlightSonata", - Twitter = "TheMoonlightSonata", - UpdatedAt = new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8147), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") - }); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1); - - b.Property("ClaimType") - .HasColumnType("nvarchar(max)"); - - b.Property("ClaimValue") - .HasColumnType("nvarchar(max)"); - - b.Property("RoleId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetRoleClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1); - - b.Property("ClaimType") - .HasColumnType("nvarchar(max)"); - - b.Property("ClaimValue") - .HasColumnType("nvarchar(max)"); - - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.Property("LoginProvider") - .HasColumnType("nvarchar(450)"); - - b.Property("ProviderKey") - .HasColumnType("nvarchar(450)"); - - b.Property("ProviderDisplayName") - .HasColumnType("nvarchar(max)"); - - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("LoginProvider", "ProviderKey"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserLogins", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.Property("RoleId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetUserRoles", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.Property("LoginProvider") - .HasColumnType("nvarchar(450)"); - - b.Property("Name") - .HasColumnType("nvarchar(450)"); - - b.Property("Value") - .HasColumnType("nvarchar(max)"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AspNetUserTokens", (string)null); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.DocumentEntity", b => - { - b.HasOne("MangoAPI.Domain.Entities.UserEntity", "User") - .WithMany("Documents") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("User"); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.MessageEntity", b => - { - b.HasOne("MangoAPI.Domain.Entities.ChatEntity", "Chat") - .WithMany("Messages") - .HasForeignKey("ChatId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("MangoAPI.Domain.Entities.UserEntity", "User") - .WithMany("Messages") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Chat"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.PasswordRestoreRequestEntity", b => - { - b.HasOne("MangoAPI.Domain.Entities.UserEntity", "UserEntity") - .WithMany("PasswordRestoreRequests") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("UserEntity"); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.SessionEntity", b => - { - b.HasOne("MangoAPI.Domain.Entities.UserEntity", "UserEntity") - .WithMany("Sessions") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("UserEntity"); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.UserChatEntity", b => - { - b.HasOne("MangoAPI.Domain.Entities.ChatEntity", "Chat") - .WithMany("ChatUsers") - .HasForeignKey("ChatId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("MangoAPI.Domain.Entities.UserEntity", "User") - .WithMany("UserChats") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Chat"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.UserContactEntity", b => - { - b.HasOne("MangoAPI.Domain.Entities.UserEntity", "User") - .WithMany("Contacts") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("User"); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.UserInformationEntity", b => - { - b.HasOne("MangoAPI.Domain.Entities.UserEntity", "User") - .WithOne("UserInformation") - .HasForeignKey("MangoAPI.Domain.Entities.UserInformationEntity", "UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("User"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.HasOne("MangoAPI.Domain.Entities.RoleEntity", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.HasOne("MangoAPI.Domain.Entities.UserEntity", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.HasOne("MangoAPI.Domain.Entities.UserEntity", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.HasOne("MangoAPI.Domain.Entities.RoleEntity", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("MangoAPI.Domain.Entities.UserEntity", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.HasOne("MangoAPI.Domain.Entities.UserEntity", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.ChatEntity", b => - { - b.Navigation("ChatUsers"); - - b.Navigation("Messages"); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.UserEntity", b => - { - b.Navigation("Contacts"); - - b.Navigation("Documents"); - - b.Navigation("Messages"); - - b.Navigation("PasswordRestoreRequests"); - - b.Navigation("Sessions"); - - b.Navigation("UserChats"); - - b.Navigation("UserInformation"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/MangoAPI.Infrastructure/Migrations/20221104214809_Initial.cs b/MangoAPI.Infrastructure/Migrations/20221104214809_Initial.cs deleted file mode 100644 index d3f815ea2..000000000 --- a/MangoAPI.Infrastructure/Migrations/20221104214809_Initial.cs +++ /dev/null @@ -1,749 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace MangoAPI.Infrastructure.Migrations -{ - public partial class Initial : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.EnsureSchema( - name: "mango"); - - migrationBuilder.CreateTable( - name: "AspNetRoles", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - NormalizedName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AspNetRoles", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "ChatEntity", - schema: "mango", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Title = table.Column(type: "nvarchar(max)", nullable: false), - CommunityType = table.Column(type: "int", nullable: false), - Description = table.Column(type: "nvarchar(max)", nullable: true), - Image = table.Column(type: "nvarchar(max)", nullable: true), - CreatedAt = table.Column(type: "datetime2", nullable: false), - UpdatedAt = table.Column(type: "datetime2", nullable: true), - MembersCount = table.Column(type: "int", nullable: false), - LastMessageAuthor = table.Column(type: "nvarchar(max)", nullable: true), - LastMessageText = table.Column(type: "nvarchar(max)", nullable: true), - LastMessageTime = table.Column(type: "datetime2", nullable: true), - LastMessageId = table.Column(type: "uniqueidentifier", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_ChatEntity", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "DiffieHellmanKeyExchangeEntity", - schema: "mango", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - SenderId = table.Column(type: "uniqueidentifier", nullable: false), - ReceiverId = table.Column(type: "uniqueidentifier", nullable: false), - SenderPublicKey = table.Column(type: "varbinary(max)", nullable: false), - ReceiverPublicKey = table.Column(type: "varbinary(max)", nullable: true), - IsConfirmed = table.Column(type: "bit", nullable: false), - CreatedAt = table.Column(type: "datetime2", nullable: false), - UpdatedAt = table.Column(type: "datetime2", nullable: true), - KeyExchangeType = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_DiffieHellmanKeyExchangeEntity", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "DiffieHellmanParameterEntity", - schema: "mango", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - OpenSslDhParameter = table.Column(type: "varbinary(max)", nullable: false), - CreatedBy = table.Column(type: "uniqueidentifier", nullable: false), - CreatedAt = table.Column(type: "datetime2", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_DiffieHellmanParameterEntity", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "UserEntity", - schema: "mango", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - DisplayName = table.Column(type: "nvarchar(max)", nullable: true), - Image = table.Column(type: "nvarchar(max)", nullable: true), - Bio = table.Column(type: "nvarchar(max)", nullable: true), - EmailCode = table.Column(type: "uniqueidentifier", nullable: false), - DisplayNameColour = table.Column(type: "int", nullable: false), - UserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - NormalizedUserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - Email = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - NormalizedEmail = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - EmailConfirmed = table.Column(type: "bit", nullable: false), - PasswordHash = table.Column(type: "nvarchar(max)", nullable: true), - SecurityStamp = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(max)", nullable: true), - PhoneNumber = table.Column(type: "nvarchar(max)", nullable: true), - PhoneNumberConfirmed = table.Column(type: "bit", nullable: false), - TwoFactorEnabled = table.Column(type: "bit", nullable: false), - LockoutEnd = table.Column(type: "datetimeoffset", nullable: true), - LockoutEnabled = table.Column(type: "bit", nullable: false), - AccessFailedCount = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_UserEntity", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AspNetRoleClaims", - columns: table => new - { - Id = table.Column(type: "int", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - RoleId = table.Column(type: "uniqueidentifier", nullable: false), - ClaimType = table.Column(type: "nvarchar(max)", nullable: true), - ClaimValue = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AspNetRoleClaims", x => x.Id); - table.ForeignKey( - name: "FK_AspNetRoleClaims_AspNetRoles_RoleId", - column: x => x.RoleId, - principalTable: "AspNetRoles", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AspNetUserClaims", - columns: table => new - { - Id = table.Column(type: "int", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - UserId = table.Column(type: "uniqueidentifier", nullable: false), - ClaimType = table.Column(type: "nvarchar(max)", nullable: true), - ClaimValue = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AspNetUserClaims", x => x.Id); - table.ForeignKey( - name: "FK_AspNetUserClaims_UserEntity_UserId", - column: x => x.UserId, - principalSchema: "mango", - principalTable: "UserEntity", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AspNetUserLogins", - columns: table => new - { - LoginProvider = table.Column(type: "nvarchar(450)", nullable: false), - ProviderKey = table.Column(type: "nvarchar(450)", nullable: false), - ProviderDisplayName = table.Column(type: "nvarchar(max)", nullable: true), - UserId = table.Column(type: "uniqueidentifier", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AspNetUserLogins", x => new { x.LoginProvider, x.ProviderKey }); - table.ForeignKey( - name: "FK_AspNetUserLogins_UserEntity_UserId", - column: x => x.UserId, - principalSchema: "mango", - principalTable: "UserEntity", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AspNetUserRoles", - columns: table => new - { - UserId = table.Column(type: "uniqueidentifier", nullable: false), - RoleId = table.Column(type: "uniqueidentifier", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AspNetUserRoles", x => new { x.UserId, x.RoleId }); - table.ForeignKey( - name: "FK_AspNetUserRoles_AspNetRoles_RoleId", - column: x => x.RoleId, - principalTable: "AspNetRoles", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_AspNetUserRoles_UserEntity_UserId", - column: x => x.UserId, - principalSchema: "mango", - principalTable: "UserEntity", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AspNetUserTokens", - columns: table => new - { - UserId = table.Column(type: "uniqueidentifier", nullable: false), - LoginProvider = table.Column(type: "nvarchar(450)", nullable: false), - Name = table.Column(type: "nvarchar(450)", nullable: false), - Value = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AspNetUserTokens", x => new { x.UserId, x.LoginProvider, x.Name }); - table.ForeignKey( - name: "FK_AspNetUserTokens_UserEntity_UserId", - column: x => x.UserId, - principalSchema: "mango", - principalTable: "UserEntity", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "DocumentEntity", - schema: "mango", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - UserId = table.Column(type: "uniqueidentifier", nullable: false), - FileName = table.Column(type: "nvarchar(max)", nullable: false), - UploadedAt = table.Column(type: "datetime2", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_DocumentEntity", x => x.Id); - table.ForeignKey( - name: "FK_DocumentEntity_UserEntity_UserId", - column: x => x.UserId, - principalSchema: "mango", - principalTable: "UserEntity", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "MessageEntity", - schema: "mango", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - UserId = table.Column(type: "uniqueidentifier", nullable: false), - ChatId = table.Column(type: "uniqueidentifier", nullable: false), - Content = table.Column(type: "nvarchar(max)", nullable: false), - InReplayToAuthor = table.Column(type: "nvarchar(max)", nullable: true), - InReplayToText = table.Column(type: "nvarchar(max)", nullable: true), - Attachment = table.Column(type: "nvarchar(max)", nullable: true), - CreatedAt = table.Column(type: "datetime2", nullable: false), - UpdatedAt = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_MessageEntity", x => x.Id); - table.ForeignKey( - name: "FK_MessageEntity_ChatEntity_ChatId", - column: x => x.ChatId, - principalSchema: "mango", - principalTable: "ChatEntity", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_MessageEntity_UserEntity_UserId", - column: x => x.UserId, - principalSchema: "mango", - principalTable: "UserEntity", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "PasswordRestoreRequestEntity", - schema: "mango", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - UserId = table.Column(type: "uniqueidentifier", nullable: false), - Email = table.Column(type: "nvarchar(max)", nullable: true), - CreatedAt = table.Column(type: "datetime2", nullable: false), - ExpiresAt = table.Column(type: "datetime2", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_PasswordRestoreRequestEntity", x => x.Id); - table.ForeignKey( - name: "FK_PasswordRestoreRequestEntity_UserEntity_UserId", - column: x => x.UserId, - principalSchema: "mango", - principalTable: "UserEntity", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "SessionEntity", - schema: "mango", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - UserId = table.Column(type: "uniqueidentifier", nullable: false), - RefreshToken = table.Column(type: "uniqueidentifier", nullable: false), - CreatedAt = table.Column(type: "datetime2", nullable: false), - ExpiresAt = table.Column(type: "datetime2", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_SessionEntity", x => x.Id); - table.ForeignKey( - name: "FK_SessionEntity_UserEntity_UserId", - column: x => x.UserId, - principalSchema: "mango", - principalTable: "UserEntity", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "UserChatEntity", - schema: "mango", - columns: table => new - { - UserId = table.Column(type: "uniqueidentifier", nullable: false), - ChatId = table.Column(type: "uniqueidentifier", nullable: false), - RoleId = table.Column(type: "int", nullable: false), - IsArchived = table.Column(type: "bit", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_UserChatEntity", x => new { x.ChatId, x.UserId }); - table.ForeignKey( - name: "FK_UserChatEntity_ChatEntity_ChatId", - column: x => x.ChatId, - principalSchema: "mango", - principalTable: "ChatEntity", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_UserChatEntity_UserEntity_UserId", - column: x => x.UserId, - principalSchema: "mango", - principalTable: "UserEntity", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "UserContactEntity", - schema: "mango", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - ContactId = table.Column(type: "uniqueidentifier", nullable: false), - UserId = table.Column(type: "uniqueidentifier", nullable: false), - CreatedAt = table.Column(type: "datetime2", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_UserContactEntity", x => x.Id); - table.ForeignKey( - name: "FK_UserContactEntity_UserEntity_UserId", - column: x => x.UserId, - principalSchema: "mango", - principalTable: "UserEntity", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "UserInformationEntity", - schema: "mango", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - UserId = table.Column(type: "uniqueidentifier", nullable: false), - BirthDay = table.Column(type: "datetime2", nullable: true), - Website = table.Column(type: "nvarchar(max)", nullable: true), - Address = table.Column(type: "nvarchar(max)", nullable: true), - Facebook = table.Column(type: "nvarchar(max)", nullable: true), - Twitter = table.Column(type: "nvarchar(max)", nullable: true), - Instagram = table.Column(type: "nvarchar(max)", nullable: true), - LinkedIn = table.Column(type: "nvarchar(max)", nullable: true), - ProfilePicture = table.Column(type: "nvarchar(max)", nullable: true), - CreatedAt = table.Column(type: "datetime2", nullable: false), - UpdatedAt = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_UserInformationEntity", x => x.Id); - table.ForeignKey( - name: "FK_UserInformationEntity_UserEntity_UserId", - column: x => x.UserId, - principalSchema: "mango", - principalTable: "UserEntity", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.InsertData( - schema: "mango", - table: "ChatEntity", - columns: new[] { "Id", "CommunityType", "CreatedAt", "Description", "Image", "LastMessageAuthor", "LastMessageId", "LastMessageText", "LastMessageTime", "MembersCount", "Title", "UpdatedAt" }, - values: new object[,] - { - { new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), 2, new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2260), "Extreme Code Main Public Group", "extreme_code_main.jpg", "Amelit", null, "TypeScript The Best", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2261), 4, "Extreme Code Main", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2260) }, - { new Guid("3fce8b2c-252d-4514-a1bb-fbdf73c47b78"), 1, new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2329), "Direct chat between Petro Kolosov and Szymon Murawski", null, "Petro Kolosov", null, "Hello world!", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2330), 2, "Petro Kolosov / Szymon Murawski", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2329) }, - { new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), 2, new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2262), "Extreme Code Flood Public Group", "extremecode_rest_logo.jpg", "Amelit", null, "Слава Партии!!", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2263), 4, "Extreme Code Flood", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2262) }, - { new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), 2, new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2266), "Extreme Code .NET Public Group", "extremecode_dotnet.png", "Amelit", null, "Hello world!", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2267), 4, "Extreme Code .NET", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2266) }, - { new Guid("9f205dde-0ddc-401f-8fe9-6c794b661f5d"), 1, new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2327), "Direct chat between Khachatur Khachatryan and Мусяка Колбасяка", null, "Khachatur Khachatryan", null, "Hello world!", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2328), 2, "Khachatur Khachatryan / Мусяка Колбасяка", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2327) }, - { new Guid("b119914a-6d95-4047-bf8a-db27deeb7dc9"), 1, new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2272), "Direct chat between Amelit and razumovsky r", null, "razumovsky r", null, "Hello world!", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2273), 2, "Amelit / razumovsky r", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2272) }, - { new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), 2, new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2254), "WSB Public Group", "wsb_group_logo.png", "Szymon Murawski", null, "Great! Good luck to all of you", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2258), 5, "WSB", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2256) }, - { new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), 2, new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2264), "Extreme Code C++ Public Group", "extremecode_cpp_logo.jpg", "Amelit", null, "Hello world!", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2265), 4, "Extreme Code C++", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2264) }, - { new Guid("f5b7824f-e52b-4246-9984-06fc8e964f0c"), 1, new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2268), "Direct chat between Khachatur Khachatryan and razumovsky r", null, "razumovsky r", null, "Hello world!", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2269), 2, "Khachatur Khachatryan / razumovsky r", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2269) }, - { new Guid("f8729a12-5746-443f-ad31-378d846fce30"), 1, new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2270), "Direct chat between Мусяка Колбасяка and razumovsky r", null, "razumovsky r", null, "Hello world!", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2271), 2, "Мусяка Колбасяка / razumovsky r", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2270) } - }); - - migrationBuilder.InsertData( - schema: "mango", - table: "UserEntity", - columns: new[] { "Id", "AccessFailedCount", "Bio", "ConcurrencyStamp", "DisplayName", "DisplayNameColour", "Email", "EmailCode", "EmailConfirmed", "Image", "LockoutEnabled", "LockoutEnd", "NormalizedEmail", "NormalizedUserName", "PasswordHash", "PhoneNumber", "PhoneNumberConfirmed", "SecurityStamp", "TwoFactorEnabled", "UserName" }, - values: new object[,] - { - { new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), 0, "Third year student of WSB at Poznan", "e9703c4c-d8fe-4503-9208-18c7da552acc", "Petro Kolosov", 1, "petro.kolosov@wp.pl", new Guid("00000000-0000-0000-0000-000000000000"), true, "razumovsky_picture.jpg", false, null, "PETRO.KOLOSOV@WP.PL", null, "AQAAAAEAACcQAAAAEHJpIe+MnFlRx+oStyj205ivIYYtdYcZr5skI4vwKTowKxvtv4lLRNtvuz/e0Tpayg==", "48743615532", true, null, false, "petro.kolosov" }, - { new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), 0, "Third year student of WSB at Poznan", "96007c9a-08db-4cc0-8203-f0bbdff53a06", "Arslanbek Temirbekov", 2, "arslanbek.temirbekov@wp.pl", new Guid("00000000-0000-0000-0000-000000000000"), true, "arslan_picture.png", false, null, "ARSLANBEK.TEMIRBEKOV@WP.PL", null, "AQAAAAEAACcQAAAAEG2aBxBUR4W2FT4vKbhDAruvgsVXEQv4D6LpCA44x4Iuwi+jBDwJ9ChBX8tLZrzKLw==", "48278187781", true, null, false, "arslanbek.temirbekov" }, - { new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), 0, "Колбасятор.", "1011864e-f6b5-4bb2-a33e-3591f2aa00b3", "Мусяка Колбасяка", 5, "kolbasator@gmail.com", new Guid("00000000-0000-0000-0000-000000000000"), true, "musyaka_picture.jpg", false, null, "KOLBASATOR@GMAIL.COM", null, "AQAAAAEAACcQAAAAELCYFMvrwXaAEjP+52VmJ297CzY7Ig5r2Lm8rYZFm7dCYEgRaPkBuyOg48BGoEEkXA==", "77017506265", true, null, false, "kolbasator" }, - { new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), 0, "Teacher of Computer Science at WSB Poznan", "1e9481a0-d03c-4127-ad2f-90effb4a07ee", "Szymon Murawski", 7, "szymon.murawski@wp.pl", new Guid("00000000-0000-0000-0000-000000000000"), true, "szymon_picture.png", false, null, "SZYMON.MURAWSKI@WP.PL", null, "AQAAAAEAACcQAAAAEPf1jxtSitoC3F2EtXVTffpjqPW3HSW7gcCizF348OGeEI0zXoM42yekeBen02zxUA==", "48743615532", true, null, false, "szymon.murawski" }, - { new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), 0, "Third year student of WSB at Poznan", "64f45956-4411-4b43-b866-e0dba4128de7", "Illia Zubachov", 10, "illia.zubachov@wp.pl", new Guid("00000000-0000-0000-0000-000000000000"), true, "illia_picture.png", false, null, "ILLIA.ZUBACHOW@WP.PL", null, "AQAAAAEAACcQAAAAEHZQXltQSYg7bG71CwqVWSIMv95gSoNd4Hpab7taHLTErJs/3Q7ra0XQeZbwL2aqEg==", "48352643123", true, null, false, "illia.zubachov" }, - { new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), 0, "Third year student of WSB at Poznan", "81bff22d-9c9a-44b2-bbf2-89df3031d25a", "Serhii Holishevskii", 8, "serhii.holishevskii@wp.pl", new Guid("00000000-0000-0000-0000-000000000000"), true, "serhii_picture.png", false, null, "SERHII.HOLISHEVSKII@WP.PL", null, "AQAAAAEAACcQAAAAEJ2+FLvSrlcZmqmgEwhIVWInWCF9WQKuGhEGG32CXzYnqMjiFmgalvmupEzAfXmjwQ==", "48175481653", true, null, false, "serhii.holishevskii" }, - { new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), 0, "Дипломат", "f07bd515-95aa-43b8-b941-c207277ae261", "Amelit", 4, "amelit@gmail.com", new Guid("00000000-0000-0000-0000-000000000000"), true, "amelit_picture.jpg", false, null, "AMELIT@GMAIL.COM", null, "AQAAAAEAACcQAAAAEGmH6ZXxVl/jLbBckatgaHmvARAt+RTnPAW4643/2rdPHpkj4gKpiIud5Tjx8siWVQ==", "12025550152", true, null, false, "TheMoonlightSonata" }, - { new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), 0, "13 y. o. | C# pozer, Hearts Of Iron IV noob", "522e4786-32bd-4a97-92c5-5365359f68e6", "Khachatur Khachatryan", 6, "xachulxx@gmail.com", new Guid("00000000-0000-0000-0000-000000000000"), true, "khachatur_picture.jpg", false, null, "XACHULXX@GMAIL.COM", null, "AQAAAAEAACcQAAAAEObkorKRuKUxlmCe59Y9FwPwMtlySvMKYvS3PcWO9/HYenjLQFKPXNebrvs4kmy2Sg==", "374775554310", true, null, false, "KHACHATUR228" }, - { new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), 0, "11011 y.o Dotnet Developer from $\"{cityName}\"", "afc55cbd-39a1-4f7a-8d3a-475c2812b669", "razumovsky r", 9, "kolosovp95@gmail.com", new Guid("00000000-0000-0000-0000-000000000000"), true, "razumovsky_picture.jpg", false, null, "KOLOSOVP94@GMAIL.COM", null, "AQAAAAEAACcQAAAAENvkbhWy0Z/XTv66FxwtQJqxFO2CdJ4n58o8hg6uOnyedzVPx7FuBlnYG0Ks/OuwIQ==", "48743615532", true, null, false, "razumovsky_r" } - }); - - migrationBuilder.InsertData( - schema: "mango", - table: "MessageEntity", - columns: new[] { "Id", "Attachment", "ChatId", "Content", "CreatedAt", "InReplayToAuthor", "InReplayToText", "UpdatedAt", "UserId" }, - values: new object[,] - { - { new Guid("1ac7cf8d-f488-486a-8c7d-a07aca7c5438"), null, new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), "Слава Партии!!", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5555), null, null, null, new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") }, - { new Guid("1c03dd4e-a1dd-4e52-8d68-9862c95101bf"), null, new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), "Hello guys, how your diploma project goes?", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5541), null, null, null, new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") }, - { new Guid("21df2608-e233-4d5b-bfe6-ae923aceef59"), null, new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), "Hello World", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5559), null, null, null, new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") }, - { new Guid("268c3cb9-cb40-4b4c-8fb1-e7f872eb9f27"), null, new Guid("f8729a12-5746-443f-ad31-378d846fce30"), "Hello World", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5571), null, null, null, new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("2a820834-1ee6-477c-8ce1-a25fb638b5fa"), null, new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), "C# The Best", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5553), null, null, null, new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") }, - { new Guid("2b230ae7-366a-44ab-93ac-c874bf34d26c"), null, new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), "Слава Партии!!", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5556), null, null, null, new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("3650c2e3-c1bd-47a0-9015-778fb7925dde"), null, new Guid("3fce8b2c-252d-4514-a1bb-fbdf73c47b78"), "Hi teacher", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5602), null, null, null, new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") }, - { new Guid("373c335f-9187-4f3c-83ea-bfc5e4e9e8fa"), null, new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), "I work with backend too...", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5547), null, null, null, new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") }, - { new Guid("37968de3-48a3-495a-a749-41c77714a192"), null, new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), "Greetings. I currently workout the back-end part", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5546), null, null, null, new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") }, - { new Guid("3e07d86e-809b-4cb6-a628-19a23422764a"), null, new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), "Слава Партии!!", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5558), null, null, null, new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") }, - { new Guid("47285cd9-3a12-4db8-bece-eaad8d45ee4f"), null, new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), "Hello World", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5562), null, null, null, new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") }, - { new Guid("472dd368-5d38-425b-896c-53102d71ebe6"), null, new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), "TypeScript The Best", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5554), null, null, null, new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") }, - { new Guid("5ab96662-f709-4b91-af3e-ccfdd8e6b953"), null, new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), "Great! Good luck to all of you", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5548), null, null, null, new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") }, - { new Guid("6c58a80d-a2aa-404f-b896-ec1bdca0e02f"), null, new Guid("f5b7824f-e52b-4246-9984-06fc8e964f0c"), "Hello World", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5568), null, null, null, new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("6c7cdfa2-f07a-44a3-a0f8-79266d9d3e2b"), null, new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), "Hello World", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5567), null, null, null, new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") }, - { new Guid("7c8e1119-cec2-47da-9d96-a1896958eebc"), null, new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), "Hi teacher, I perform QA of the current version", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5545), null, null, null, new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") }, - { new Guid("86e20fcb-11b4-4f2e-a7ba-6e255660116b"), null, new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), "F# The Best", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5550), null, null, null, new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("896ad499-29b1-4636-8a35-aea6a186bcdd"), null, new Guid("b119914a-6d95-4047-bf8a-db27deeb7dc9"), "Hello World", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5572), null, null, null, new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") }, - { new Guid("8a57d2fd-7d70-41ed-ab25-a2e43a490567"), null, new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), "Hello World", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5563), null, null, null, new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") }, - { new Guid("96eb8a64-2e4f-4f20-b4d3-5f7e86e6f8cb"), null, new Guid("9f205dde-0ddc-401f-8fe9-6c794b661f5d"), "Hello World", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5575), null, null, null, new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") }, - { new Guid("b814bdb3-58a1-43e7-82b6-b1bf259ca795"), null, new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), "Hello World", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5566), null, null, null, new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") }, - { new Guid("bd61cf2d-def0-4e46-b107-0a299c44a235"), null, new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), "Слава Партии!!", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5557), null, null, null, new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") }, - { new Guid("cbb49dd0-0004-4d96-8d47-df3956b5c69d"), null, new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), "Hello World", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5565), null, null, null, new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("d600aa80-853b-4e6d-b0fa-b70161c063b8"), null, new Guid("f8729a12-5746-443f-ad31-378d846fce30"), "Hello World", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5570), null, null, null, new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") }, - { new Guid("da595b51-c294-4ba1-910f-e87089f1cef5"), null, new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), "Hello World", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5560), null, null, null, new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("eab3e30d-54ae-4869-9f2e-b54162a8de7d"), null, new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), "Well, I'm doing UI/UX part of the project", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5543), null, null, null, new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") }, - { new Guid("eb41b14a-1631-438e-b448-b5ff963d1a81"), null, new Guid("b119914a-6d95-4047-bf8a-db27deeb7dc9"), "Hello World", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5573), null, null, null, new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("edf796ea-e49c-436c-a637-dee09a25b249"), null, new Guid("f5b7824f-e52b-4246-9984-06fc8e964f0c"), "Hello World", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5567), null, null, null, new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") }, - { new Guid("f3c7feac-a4cc-43de-b56e-11ac67210589"), null, new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), "Hello World", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5564), null, null, null, new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") }, - { new Guid("f443334d-0638-4630-a365-073fc9d96489"), null, new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), "Hello World", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5549), null, null, null, new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") }, - { new Guid("faeabdee-f6bf-47b7-afe2-5fb15be2342d"), null, new Guid("9f205dde-0ddc-401f-8fe9-6c794b661f5d"), "Hello World", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5574), null, null, null, new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") } - }); - - migrationBuilder.InsertData( - schema: "mango", - table: "UserChatEntity", - columns: new[] { "ChatId", "UserId", "IsArchived", "RoleId" }, - values: new object[,] - { - { new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), false, 2 }, - { new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), false, 4 }, - { new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), false, 1 }, - { new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), false, 3 }, - { new Guid("3fce8b2c-252d-4514-a1bb-fbdf73c47b78"), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), false, 1 }, - { new Guid("3fce8b2c-252d-4514-a1bb-fbdf73c47b78"), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), false, 1 }, - { new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), false, 2 }, - { new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), false, 1 }, - { new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), false, 1 }, - { new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), false, 4 }, - { new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), false, 1 } - }); - - migrationBuilder.InsertData( - schema: "mango", - table: "UserChatEntity", - columns: new[] { "ChatId", "UserId", "IsArchived", "RoleId" }, - values: new object[,] - { - { new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), false, 1 }, - { new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), false, 1 }, - { new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), false, 4 }, - { new Guid("9f205dde-0ddc-401f-8fe9-6c794b661f5d"), new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), false, 1 }, - { new Guid("9f205dde-0ddc-401f-8fe9-6c794b661f5d"), new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), false, 1 }, - { new Guid("b119914a-6d95-4047-bf8a-db27deeb7dc9"), new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), false, 1 }, - { new Guid("b119914a-6d95-4047-bf8a-db27deeb7dc9"), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), false, 1 }, - { new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), false, 2 }, - { new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), false, 1 }, - { new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), false, 4 }, - { new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), false, 1 }, - { new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), false, 1 }, - { new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), false, 1 }, - { new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), false, 4 }, - { new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), false, 1 }, - { new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), false, 3 }, - { new Guid("f5b7824f-e52b-4246-9984-06fc8e964f0c"), new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), false, 1 }, - { new Guid("f5b7824f-e52b-4246-9984-06fc8e964f0c"), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), false, 1 }, - { new Guid("f8729a12-5746-443f-ad31-378d846fce30"), new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), false, 1 }, - { new Guid("f8729a12-5746-443f-ad31-378d846fce30"), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), false, 1 } - }); - - migrationBuilder.InsertData( - schema: "mango", - table: "UserContactEntity", - columns: new[] { "Id", "ContactId", "CreatedAt", "UserId" }, - values: new object[,] - { - { new Guid("03eb362d-08a3-4a0e-a0a9-89af8893f8d5"), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9417), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") }, - { new Guid("119387eb-49cb-47b0-aa55-32e2b3e0a355"), new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9428), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("28cbadd0-74e9-4ae0-a6b7-e8f1c5c034b7"), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9405), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") }, - { new Guid("2944e8fd-3e7e-4de2-8172-147a4f283242"), new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9432), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("39dcf9d7-6334-41f4-9ec9-5ba7bf6fea94"), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9408), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") }, - { new Guid("3be8cc49-8a56-4d93-b0cb-c5e0e9fd4957"), new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9430), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("4e43a6d8-9df4-4d66-9466-1ac90f55773d"), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9411), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") }, - { new Guid("6903a014-7cc1-4218-9e67-0ac301da66a0"), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9408), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") }, - { new Guid("7df79375-20b7-4288-b3f0-3a031bb382b5"), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9410), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") }, - { new Guid("81fb56e4-a6cc-41bd-80d0-6dea2ea53ef8"), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9434), new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") }, - { new Guid("83332d37-0c99-458a-8d45-008baa5ac3b1"), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9420), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") }, - { new Guid("98aa09c0-2f5f-4bce-b868-201f73c018df"), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9429), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("9ed9697e-66e2-45be-bf1b-eca257b0f9c4"), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9424), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") }, - { new Guid("a3898646-4e37-4cc0-969f-27b611013b9a"), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9424), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") }, - { new Guid("a8a7e3a3-6c45-4ce2-b4a0-8f62c763f05c"), new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9433), new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") }, - { new Guid("aa62f6a0-bf42-4e67-8f69-4a5b7c74c599"), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9398), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") }, - { new Guid("b37b49e0-4576-421d-ad88-e9085ea7a313"), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9419), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") }, - { new Guid("b3a08dd2-6188-4c60-94d9-a4489773b31e"), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9409), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") }, - { new Guid("bf269103-8486-4a9f-98af-516896403edc"), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9406), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") }, - { new Guid("c5e4f63e-4822-4c84-ad96-b66343546bdd"), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9416), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") }, - { new Guid("ce6034f5-ad9c-4bdc-b8f4-d987d7dc761b"), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9420), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") }, - { new Guid("ce8ba232-f16d-420c-a4fb-4111b62d0711"), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9418), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") } - }); - - migrationBuilder.InsertData( - schema: "mango", - table: "UserContactEntity", - columns: new[] { "Id", "ContactId", "CreatedAt", "UserId" }, - values: new object[,] - { - { new Guid("cfcc5a3a-16b0-49c9-82ae-4ef92737c1d4"), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9404), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") }, - { new Guid("d10f7700-66de-4afa-b3ac-6addf5495019"), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9422), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") }, - { new Guid("dcdfdde7-fb04-4890-9056-912df2b64a9e"), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9415), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") }, - { new Guid("de23a206-edb7-49df-b381-f6d7b82a4cb8"), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9413), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") }, - { new Guid("e4af34b0-d832-4b6c-9f87-0e6e918faa8e"), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9429), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("e7eebf8f-00b4-4dd4-9928-90c90f7547dc"), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9425), new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") } - }); - - migrationBuilder.InsertData( - schema: "mango", - table: "UserInformationEntity", - columns: new[] { "Id", "Address", "BirthDay", "CreatedAt", "Facebook", "Instagram", "LinkedIn", "ProfilePicture", "Twitter", "UpdatedAt", "UserId", "Website" }, - values: new object[,] - { - { new Guid("1090ae1a-9f98-46e6-9259-7ee4c95e9430"), "Moscow, Russia", new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8140), new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8141), null, "khachapur.mudrenych", "khachapur.mudrenych", null, null, new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8141), new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), "khachapur.com" }, - { new Guid("18395258-dc14-468b-b219-d31428d4ccf1"), "Poznan, Poland", new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8127), new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8128), "illia.zubachov", "illia.zubachov", "illia.zubachov", null, "illia.zubachov", new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8128), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), "illia.zubachov.com" }, - { new Guid("2b76d688-dd54-4dcd-a960-35a29d4ee2be"), "Moscow, Russia", new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8147), new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8148), "TheMoonlightSonata", "TheMoonlightSonata", null, null, "TheMoonlightSonata", new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8147), new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), null }, - { new Guid("363b03b0-21a0-46a8-b3ff-3c6d5169b698"), "Odessa, Ukraine", new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8143), new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8144), "razumovsky_r", "razumovsky_r", "razumovsky_r", null, "razumovsky_r", new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8143), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), "razumovsky.com" }, - { new Guid("61c371d9-bc79-4ad7-b77b-43a5a129cd45"), "Poznan, Poland", new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8138), new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8139), "szymon.murawski", "szymon.murawski", "szymon.murawski", null, "szymon.murawski", new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8139), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), "szymon.murawski.com" }, - { new Guid("82862776-1f88-426a-ae46-c1613ee3f72a"), "Poznan, Poland", new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8136), new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8137), "arslan.temirbekov", "arslan.temirbekov", "arslan.temirbekov", null, "arslan.temirbekov", new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8136), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), "arslan.temirbekov.com" }, - { new Guid("b2bbbff1-9b12-4402-bbed-e0315ff73ed0"), "Poznan, Poland", new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8122), new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8124), "petro.kolosov", "petro.kolosov", "petro.kolosov", null, "petro.kolosov", new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8124), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), "petro.kolosov.com" }, - { new Guid("cc3f7cb4-bd75-4ddd-8faa-5e5e8e8d9839"), "Saint-Petersburg, Russia", new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8145), new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8146), "kolbasator", null, null, "profile.png", null, new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8145), new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), "kolbasator.com" }, - { new Guid("de20380f-1156-4fd5-a16c-1b93bab7aee2"), "Poznan, Poland", new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8130), new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8131), "serhii.holishevskii", "serhii.holishevskii", "serhii.holishevskii", null, "serhii.holishevskii", new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8131), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), "serhii.holishevskii.com" } - }); - - migrationBuilder.CreateIndex( - name: "IX_AspNetRoleClaims_RoleId", - table: "AspNetRoleClaims", - column: "RoleId"); - - migrationBuilder.CreateIndex( - name: "RoleNameIndex", - table: "AspNetRoles", - column: "NormalizedName", - unique: true, - filter: "[NormalizedName] IS NOT NULL"); - - migrationBuilder.CreateIndex( - name: "IX_AspNetUserClaims_UserId", - table: "AspNetUserClaims", - column: "UserId"); - - migrationBuilder.CreateIndex( - name: "IX_AspNetUserLogins_UserId", - table: "AspNetUserLogins", - column: "UserId"); - - migrationBuilder.CreateIndex( - name: "IX_AspNetUserRoles_RoleId", - table: "AspNetUserRoles", - column: "RoleId"); - - migrationBuilder.CreateIndex( - name: "IX_DocumentEntity_UserId", - schema: "mango", - table: "DocumentEntity", - column: "UserId"); - - migrationBuilder.CreateIndex( - name: "IX_MessageEntity_ChatId", - schema: "mango", - table: "MessageEntity", - column: "ChatId"); - - migrationBuilder.CreateIndex( - name: "IX_MessageEntity_UserId", - schema: "mango", - table: "MessageEntity", - column: "UserId"); - - migrationBuilder.CreateIndex( - name: "IX_PasswordRestoreRequestEntity_UserId", - schema: "mango", - table: "PasswordRestoreRequestEntity", - column: "UserId"); - - migrationBuilder.CreateIndex( - name: "IX_SessionEntity_UserId", - schema: "mango", - table: "SessionEntity", - column: "UserId"); - - migrationBuilder.CreateIndex( - name: "IX_UserChatEntity_UserId", - schema: "mango", - table: "UserChatEntity", - column: "UserId"); - - migrationBuilder.CreateIndex( - name: "IX_UserContactEntity_UserId", - schema: "mango", - table: "UserContactEntity", - column: "UserId"); - - migrationBuilder.CreateIndex( - name: "EmailIndex", - schema: "mango", - table: "UserEntity", - column: "NormalizedEmail"); - - migrationBuilder.CreateIndex( - name: "UserNameIndex", - schema: "mango", - table: "UserEntity", - column: "NormalizedUserName", - unique: true, - filter: "[NormalizedUserName] IS NOT NULL"); - - migrationBuilder.CreateIndex( - name: "IX_UserInformationEntity_UserId", - schema: "mango", - table: "UserInformationEntity", - column: "UserId", - unique: true); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AspNetRoleClaims"); - - migrationBuilder.DropTable( - name: "AspNetUserClaims"); - - migrationBuilder.DropTable( - name: "AspNetUserLogins"); - - migrationBuilder.DropTable( - name: "AspNetUserRoles"); - - migrationBuilder.DropTable( - name: "AspNetUserTokens"); - - migrationBuilder.DropTable( - name: "DiffieHellmanKeyExchangeEntity", - schema: "mango"); - - migrationBuilder.DropTable( - name: "DiffieHellmanParameterEntity", - schema: "mango"); - - migrationBuilder.DropTable( - name: "DocumentEntity", - schema: "mango"); - - migrationBuilder.DropTable( - name: "MessageEntity", - schema: "mango"); - - migrationBuilder.DropTable( - name: "PasswordRestoreRequestEntity", - schema: "mango"); - - migrationBuilder.DropTable( - name: "SessionEntity", - schema: "mango"); - - migrationBuilder.DropTable( - name: "UserChatEntity", - schema: "mango"); - - migrationBuilder.DropTable( - name: "UserContactEntity", - schema: "mango"); - - migrationBuilder.DropTable( - name: "UserInformationEntity", - schema: "mango"); - - migrationBuilder.DropTable( - name: "AspNetRoles"); - - migrationBuilder.DropTable( - name: "ChatEntity", - schema: "mango"); - - migrationBuilder.DropTable( - name: "UserEntity", - schema: "mango"); - } - } -} diff --git a/MangoAPI.Infrastructure/Migrations/20230306205653_PasswordRestoreRequestDeleted.Designer.cs b/MangoAPI.Infrastructure/Migrations/20230306205653_PasswordRestoreRequestDeleted.Designer.cs deleted file mode 100644 index 8b861022d..000000000 --- a/MangoAPI.Infrastructure/Migrations/20230306205653_PasswordRestoreRequestDeleted.Designer.cs +++ /dev/null @@ -1,1784 +0,0 @@ -// -using System; -using MangoAPI.Infrastructure.Database; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace MangoAPI.Infrastructure.Migrations -{ - [DbContext(typeof(MangoDbContext))] - [Migration("20230306205653_PasswordRestoreRequestDeleted")] - partial class PasswordRestoreRequestDeleted - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "6.0.10") - .HasAnnotation("Relational:MaxIdentifierLength", 128); - - SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1); - - modelBuilder.Entity("MangoAPI.Domain.Entities.ChatEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("CommunityType") - .HasColumnType("int"); - - b.Property("CreatedAt") - .HasColumnType("datetime2"); - - b.Property("Description") - .HasColumnType("nvarchar(max)"); - - b.Property("Image") - .HasColumnType("nvarchar(max)"); - - b.Property("LastMessageAuthor") - .HasColumnType("nvarchar(max)"); - - b.Property("LastMessageId") - .HasColumnType("uniqueidentifier"); - - b.Property("LastMessageText") - .HasColumnType("nvarchar(max)"); - - b.Property("LastMessageTime") - .HasColumnType("datetime2"); - - b.Property("MembersCount") - .HasColumnType("int"); - - b.Property("Title") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("UpdatedAt") - .HasColumnType("datetime2"); - - b.HasKey("Id"); - - b.ToTable("ChatEntity", "mango"); - - b.HasData( - new - { - Id = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - CommunityType = 2, - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1606), - Description = "WSB Public Group", - Image = "wsb_group_logo.png", - LastMessageAuthor = "Szymon Murawski", - LastMessageText = "Great! Good luck to all of you", - LastMessageTime = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1610), - MembersCount = 5, - Title = "WSB", - UpdatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1608) - }, - new - { - Id = new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), - CommunityType = 2, - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1613), - Description = "Extreme Code Main Public Group", - Image = "extreme_code_main.jpg", - LastMessageAuthor = "Amelit", - LastMessageText = "TypeScript The Best", - LastMessageTime = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1614), - MembersCount = 4, - Title = "Extreme Code Main", - UpdatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1613) - }, - new - { - Id = new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), - CommunityType = 2, - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1615), - Description = "Extreme Code Flood Public Group", - Image = "extremecode_rest_logo.jpg", - LastMessageAuthor = "Amelit", - LastMessageText = "Слава Партии!!", - LastMessageTime = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1616), - MembersCount = 4, - Title = "Extreme Code Flood", - UpdatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1615) - }, - new - { - Id = new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), - CommunityType = 2, - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1617), - Description = "Extreme Code C++ Public Group", - Image = "extremecode_cpp_logo.jpg", - LastMessageAuthor = "Amelit", - LastMessageText = "Hello world!", - LastMessageTime = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1618), - MembersCount = 4, - Title = "Extreme Code C++", - UpdatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1618) - }, - new - { - Id = new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), - CommunityType = 2, - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1619), - Description = "Extreme Code .NET Public Group", - Image = "extremecode_dotnet.png", - LastMessageAuthor = "Amelit", - LastMessageText = "Hello world!", - LastMessageTime = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1620), - MembersCount = 4, - Title = "Extreme Code .NET", - UpdatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1619) - }, - new - { - Id = new Guid("f5b7824f-e52b-4246-9984-06fc8e964f0c"), - CommunityType = 1, - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1628), - Description = "Direct chat between Khachatur Khachatryan and razumovsky r", - LastMessageAuthor = "razumovsky r", - LastMessageText = "Hello world!", - LastMessageTime = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1629), - MembersCount = 2, - Title = "Khachatur Khachatryan / razumovsky r", - UpdatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1628) - }, - new - { - Id = new Guid("f8729a12-5746-443f-ad31-378d846fce30"), - CommunityType = 1, - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1629), - Description = "Direct chat between Мусяка Колбасяка and razumovsky r", - LastMessageAuthor = "razumovsky r", - LastMessageText = "Hello world!", - LastMessageTime = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1630), - MembersCount = 2, - Title = "Мусяка Колбасяка / razumovsky r", - UpdatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1630) - }, - new - { - Id = new Guid("b119914a-6d95-4047-bf8a-db27deeb7dc9"), - CommunityType = 1, - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1632), - Description = "Direct chat between Amelit and razumovsky r", - LastMessageAuthor = "razumovsky r", - LastMessageText = "Hello world!", - LastMessageTime = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1633), - MembersCount = 2, - Title = "Amelit / razumovsky r", - UpdatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1633) - }, - new - { - Id = new Guid("9f205dde-0ddc-401f-8fe9-6c794b661f5d"), - CommunityType = 1, - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1634), - Description = "Direct chat between Khachatur Khachatryan and Мусяка Колбасяка", - LastMessageAuthor = "Khachatur Khachatryan", - LastMessageText = "Hello world!", - LastMessageTime = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1635), - MembersCount = 2, - Title = "Khachatur Khachatryan / Мусяка Колбасяка", - UpdatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1634) - }, - new - { - Id = new Guid("3fce8b2c-252d-4514-a1bb-fbdf73c47b78"), - CommunityType = 1, - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1635), - Description = "Direct chat between Petro Kolosov and Szymon Murawski", - LastMessageAuthor = "Petro Kolosov", - LastMessageText = "Hello world!", - LastMessageTime = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1636), - MembersCount = 2, - Title = "Petro Kolosov / Szymon Murawski", - UpdatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1636) - }); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.DiffieHellmanKeyExchangeEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("CreatedAt") - .HasColumnType("datetime2"); - - b.Property("IsConfirmed") - .HasColumnType("bit"); - - b.Property("KeyExchangeType") - .HasColumnType("int"); - - b.Property("ReceiverId") - .HasColumnType("uniqueidentifier"); - - b.Property("ReceiverPublicKey") - .HasColumnType("varbinary(max)"); - - b.Property("SenderId") - .HasColumnType("uniqueidentifier"); - - b.Property("SenderPublicKey") - .IsRequired() - .HasColumnType("varbinary(max)"); - - b.Property("UpdatedAt") - .HasColumnType("datetime2"); - - b.HasKey("Id"); - - b.ToTable("DiffieHellmanKeyExchangeEntity", "mango"); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.DiffieHellmanParameterEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("CreatedAt") - .HasColumnType("datetime2"); - - b.Property("CreatedBy") - .HasColumnType("uniqueidentifier"); - - b.Property("OpenSslDhParameter") - .IsRequired() - .HasColumnType("varbinary(max)"); - - b.HasKey("Id"); - - b.ToTable("DiffieHellmanParameterEntity", "mango"); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.DocumentEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("FileName") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("UploadedAt") - .HasColumnType("datetime2"); - - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("DocumentEntity", "mango"); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.MessageEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("Attachment") - .HasColumnType("nvarchar(max)"); - - b.Property("ChatId") - .HasColumnType("uniqueidentifier"); - - b.Property("Content") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("CreatedAt") - .HasColumnType("datetime2"); - - b.Property("InReplayToAuthor") - .HasColumnType("nvarchar(max)"); - - b.Property("InReplayToText") - .HasColumnType("nvarchar(max)"); - - b.Property("UpdatedAt") - .HasColumnType("datetime2"); - - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("ChatId"); - - b.HasIndex("UserId"); - - b.ToTable("MessageEntity", "mango"); - - b.HasData( - new - { - Id = new Guid("87487cdb-4291-4811-80ec-1e4f9db2d7b0"), - ChatId = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - Content = "Hello guys, how your diploma project goes?", - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5378), - UserId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") - }, - new - { - Id = new Guid("e56194fd-63af-4cd7-ae80-e3840db75dc2"), - ChatId = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - Content = "Well, I'm doing UI/UX part of the project", - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5380), - UserId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") - }, - new - { - Id = new Guid("d0de9911-8b7f-4a20-9c8f-89792af28b7a"), - ChatId = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - Content = "Hi teacher, I perform QA of the current version", - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5381), - UserId = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") - }, - new - { - Id = new Guid("f550a534-447b-4216-aafc-55c89c72ff67"), - ChatId = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - Content = "Greetings. I currently workout the back-end part", - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5384), - UserId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") - }, - new - { - Id = new Guid("d90c16f3-f790-4c5f-a90b-b3f0fc7f0212"), - ChatId = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - Content = "I work with backend too...", - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5386), - UserId = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") - }, - new - { - Id = new Guid("fb933dde-e91b-4236-88c5-0d1999846f43"), - ChatId = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - Content = "Great! Good luck to all of you", - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5387), - UserId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") - }, - new - { - Id = new Guid("38bf11b1-3b27-42fb-8fde-5c39ae614a5a"), - ChatId = new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5388), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") - }, - new - { - Id = new Guid("f45c6ad4-669a-4126-bac8-e4faeb838694"), - ChatId = new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), - Content = "F# The Best", - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5389), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("7256cf71-efa0-4672-9abf-5bc513b1086c"), - ChatId = new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), - Content = "C# The Best", - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5393), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") - }, - new - { - Id = new Guid("7df33dcd-3f64-4d03-8d77-9c895c354b4b"), - ChatId = new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), - Content = "TypeScript The Best", - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5394), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") - }, - new - { - Id = new Guid("befa4294-f615-4d55-a90f-e73332d77591"), - ChatId = new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), - Content = "Слава Партии!!", - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5396), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") - }, - new - { - Id = new Guid("bdf82526-ddf2-4d26-9dcd-a70ec9d001f6"), - ChatId = new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), - Content = "Слава Партии!!", - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5397), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("22724c39-2448-4bb6-8fc3-fea5ceb5c9dc"), - ChatId = new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), - Content = "Слава Партии!!", - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5398), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") - }, - new - { - Id = new Guid("a1a9820f-0a02-4261-8b77-cf13b1c218fb"), - ChatId = new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), - Content = "Слава Партии!!", - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5398), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") - }, - new - { - Id = new Guid("c5b5d07a-1b97-4b8e-aef2-348d8c9d27da"), - ChatId = new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5399), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") - }, - new - { - Id = new Guid("cdba47b6-6074-4ec6-aa6b-990e793123d2"), - ChatId = new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5400), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("b902caa3-23ba-49e1-babb-e402895e2807"), - ChatId = new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5403), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") - }, - new - { - Id = new Guid("931a46b2-5af2-4e14-8501-5c8727f08959"), - ChatId = new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5404), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") - }, - new - { - Id = new Guid("8eba3a15-56f5-44ec-aaca-46efbe67eca2"), - ChatId = new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5405), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") - }, - new - { - Id = new Guid("e95de444-ccf9-4b35-80d0-356c9301216d"), - ChatId = new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5406), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("b9393310-759d-4f92-b888-4d048caf063b"), - ChatId = new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5406), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") - }, - new - { - Id = new Guid("c98a5a67-a1c4-4ab6-8d41-2c2f1a77b520"), - ChatId = new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5407), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") - }, - new - { - Id = new Guid("df054ddf-f311-405d-8b26-bad10c6a936f"), - ChatId = new Guid("f5b7824f-e52b-4246-9984-06fc8e964f0c"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5408), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") - }, - new - { - Id = new Guid("32346317-7c66-44e5-8cb9-dd2d4a50b457"), - ChatId = new Guid("f5b7824f-e52b-4246-9984-06fc8e964f0c"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5409), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("c18fa6c4-cf86-4765-98ad-9e6263214bca"), - ChatId = new Guid("f8729a12-5746-443f-ad31-378d846fce30"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5412), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") - }, - new - { - Id = new Guid("9202347f-95c8-4dce-8c3c-32be6b49df91"), - ChatId = new Guid("f8729a12-5746-443f-ad31-378d846fce30"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5413), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("ae7dbb11-ba18-4a8b-a15c-69dd243a2c3e"), - ChatId = new Guid("b119914a-6d95-4047-bf8a-db27deeb7dc9"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5413), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") - }, - new - { - Id = new Guid("49f75eac-2924-4f05-817a-6fc9ef9a268f"), - ChatId = new Guid("b119914a-6d95-4047-bf8a-db27deeb7dc9"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5414), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("55fca598-c242-4ed1-b29b-af129759d5e5"), - ChatId = new Guid("9f205dde-0ddc-401f-8fe9-6c794b661f5d"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5415), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") - }, - new - { - Id = new Guid("ba76b719-571a-410e-8424-353d47adfd83"), - ChatId = new Guid("9f205dde-0ddc-401f-8fe9-6c794b661f5d"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5416), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") - }, - new - { - Id = new Guid("2d91d301-a491-4bc6-9061-002218be17b0"), - ChatId = new Guid("3fce8b2c-252d-4514-a1bb-fbdf73c47b78"), - Content = "Hi teacher", - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5423), - UserId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") - }); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.RoleEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("nvarchar(max)"); - - b.Property("Name") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("NormalizedName") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName") - .IsUnique() - .HasDatabaseName("RoleNameIndex") - .HasFilter("[NormalizedName] IS NOT NULL"); - - b.ToTable("AspNetRoles", (string)null); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.SessionEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("CreatedAt") - .HasColumnType("datetime2"); - - b.Property("ExpiresAt") - .HasColumnType("datetime2"); - - b.Property("RefreshToken") - .HasColumnType("uniqueidentifier"); - - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("SessionEntity", "mango"); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.UserChatEntity", b => - { - b.Property("ChatId") - .HasColumnType("uniqueidentifier"); - - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.Property("IsArchived") - .HasColumnType("bit"); - - b.Property("RoleId") - .HasColumnType("int"); - - b.HasKey("ChatId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("UserChatEntity", "mango"); - - b.HasData( - new - { - ChatId = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - UserId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), - IsArchived = false, - RoleId = 2 - }, - new - { - ChatId = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - UserId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), - IsArchived = false, - RoleId = 4 - }, - new - { - ChatId = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - UserId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - UserId = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - UserId = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - IsArchived = false, - RoleId = 3 - }, - new - { - ChatId = new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), - IsArchived = false, - RoleId = 2 - }, - new - { - ChatId = new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), - IsArchived = false, - RoleId = 4 - }, - new - { - ChatId = new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - IsArchived = false, - RoleId = 4 - }, - new - { - ChatId = new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), - IsArchived = false, - RoleId = 2 - }, - new - { - ChatId = new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), - IsArchived = false, - RoleId = 4 - }, - new - { - ChatId = new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - IsArchived = false, - RoleId = 3 - }, - new - { - ChatId = new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - IsArchived = false, - RoleId = 4 - }, - new - { - ChatId = new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("f5b7824f-e52b-4246-9984-06fc8e964f0c"), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("f5b7824f-e52b-4246-9984-06fc8e964f0c"), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("f8729a12-5746-443f-ad31-378d846fce30"), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("f8729a12-5746-443f-ad31-378d846fce30"), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("b119914a-6d95-4047-bf8a-db27deeb7dc9"), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("b119914a-6d95-4047-bf8a-db27deeb7dc9"), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("9f205dde-0ddc-401f-8fe9-6c794b661f5d"), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("9f205dde-0ddc-401f-8fe9-6c794b661f5d"), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("3fce8b2c-252d-4514-a1bb-fbdf73c47b78"), - UserId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("3fce8b2c-252d-4514-a1bb-fbdf73c47b78"), - UserId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), - IsArchived = false, - RoleId = 1 - }); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.UserContactEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("ContactId") - .HasColumnType("uniqueidentifier"); - - b.Property("CreatedAt") - .HasColumnType("datetime2"); - - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("UserContactEntity", "mango"); - - b.HasData( - new - { - Id = new Guid("f4be92a5-94d6-4d0a-864c-771af95e4b3f"), - ContactId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8891), - UserId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") - }, - new - { - Id = new Guid("a5807a03-bfd1-45a5-ab11-85858c1fd574"), - ContactId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8901), - UserId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") - }, - new - { - Id = new Guid("e2ee16d3-13df-435f-971a-36acfd206500"), - ContactId = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8902), - UserId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") - }, - new - { - Id = new Guid("0f2d8193-9395-409c-abf2-92735389ea06"), - ContactId = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8904), - UserId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") - }, - new - { - Id = new Guid("1ff356b2-8d9d-41b5-ac7b-f729de72fd89"), - ContactId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8905), - UserId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") - }, - new - { - Id = new Guid("3b55d09f-9585-458d-8cd4-72d5ea8707b5"), - ContactId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8905), - UserId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") - }, - new - { - Id = new Guid("8893cdf7-cf4f-489e-a992-687a7a535a4b"), - ContactId = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8907), - UserId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") - }, - new - { - Id = new Guid("4f3a1392-8bc6-42c4-8ab2-fbbadd2552a5"), - ContactId = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8908), - UserId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") - }, - new - { - Id = new Guid("0ecde415-8c42-4c57-bdba-a876ba316a1a"), - ContactId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8909), - UserId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") - }, - new - { - Id = new Guid("63c7314b-e018-420c-be65-7b84f34524f3"), - ContactId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8912), - UserId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") - }, - new - { - Id = new Guid("8abb9d01-e0d0-4758-8cb4-54eb1a369351"), - ContactId = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8913), - UserId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") - }, - new - { - Id = new Guid("ed2dc47c-ec7a-45d7-beef-4c1f59cac29d"), - ContactId = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8914), - UserId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") - }, - new - { - Id = new Guid("e93e2f85-260b-4776-8d4f-f60522fb2659"), - ContactId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8915), - UserId = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") - }, - new - { - Id = new Guid("f6729e0c-b34a-4f8b-9a59-ce0ddfaf9182"), - ContactId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8916), - UserId = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") - }, - new - { - Id = new Guid("3bd568ee-679e-4469-ad93-b70e70cb45e7"), - ContactId = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8917), - UserId = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") - }, - new - { - Id = new Guid("ee9612aa-57b1-4c13-b95e-e149820c7590"), - ContactId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8918), - UserId = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") - }, - new - { - Id = new Guid("18fc64e6-bf06-45cd-8d69-54c814f486da"), - ContactId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8920), - UserId = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") - }, - new - { - Id = new Guid("30a9587c-71f2-48b3-971d-971cffd87c75"), - ContactId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8922), - UserId = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") - }, - new - { - Id = new Guid("5f95bb0d-3706-46ce-9ba1-d1a41ffcead0"), - ContactId = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8923), - UserId = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") - }, - new - { - Id = new Guid("e6f33b80-a64f-4017-a541-7cce286db160"), - ContactId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8924), - UserId = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") - }, - new - { - Id = new Guid("4f54e050-37ee-4ed5-848d-d7aaf3025337"), - ContactId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8925), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") - }, - new - { - Id = new Guid("03da4110-35e6-4414-a37c-0d2ea033a6d1"), - ContactId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8926), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("bbb07d53-daf6-4d70-a140-cd6b8b84e60a"), - ContactId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8926), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("3a887366-3479-4521-8ca3-ae09f4750635"), - ContactId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8927), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("7c35261a-6bbb-4819-bf3a-8884b64a12e5"), - ContactId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8928), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("10af6975-fc31-4879-9c75-643b8227d164"), - ContactId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8930), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("5a597475-4820-4601-a038-d8c1ff4b0978"), - ContactId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8931), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") - }, - new - { - Id = new Guid("d4f10299-2fed-4adc-af4c-a8af1cfd7516"), - ContactId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8932), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") - }); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.UserEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("AccessFailedCount") - .HasColumnType("int"); - - b.Property("Bio") - .HasColumnType("nvarchar(max)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("nvarchar(max)"); - - b.Property("DisplayName") - .HasColumnType("nvarchar(max)"); - - b.Property("DisplayNameColour") - .HasColumnType("int"); - - b.Property("Email") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("EmailCode") - .HasColumnType("uniqueidentifier"); - - b.Property("EmailConfirmed") - .HasColumnType("bit"); - - b.Property("Image") - .HasColumnType("nvarchar(max)"); - - b.Property("LockoutEnabled") - .HasColumnType("bit"); - - b.Property("LockoutEnd") - .HasColumnType("datetimeoffset"); - - b.Property("NormalizedEmail") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("NormalizedUserName") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("PasswordHash") - .HasColumnType("nvarchar(max)"); - - b.Property("PhoneNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("PhoneNumberConfirmed") - .HasColumnType("bit"); - - b.Property("SecurityStamp") - .HasColumnType("nvarchar(max)"); - - b.Property("TwoFactorEnabled") - .HasColumnType("bit"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedEmail") - .HasDatabaseName("EmailIndex"); - - b.HasIndex("NormalizedUserName") - .IsUnique() - .HasDatabaseName("UserNameIndex") - .HasFilter("[NormalizedUserName] IS NOT NULL"); - - b.ToTable("UserEntity", "mango"); - - b.HasData( - new - { - Id = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), - AccessFailedCount = 0, - Bio = "13 y. o. | C# pozer, Hearts Of Iron IV noob", - ConcurrencyStamp = "919b9cbb-7b1e-4424-82a6-326edb8ae694", - DisplayName = "Khachatur Khachatryan", - DisplayNameColour = 6, - Email = "xachulxx@gmail.com", - EmailCode = new Guid("00000000-0000-0000-0000-000000000000"), - EmailConfirmed = true, - Image = "khachatur_picture.jpg", - LockoutEnabled = false, - NormalizedEmail = "XACHULXX@GMAIL.COM", - PasswordHash = "AQAAAAEAACcQAAAAEGJnlwFs/vBVcWfMBXzKimCUAu+hp7DOnweFuyATzBy3YRoaX/3L0QYZRzNtTo6DbQ==", - PhoneNumber = "374775554310", - PhoneNumberConfirmed = true, - TwoFactorEnabled = false, - UserName = "KHACHATUR228" - }, - new - { - Id = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - AccessFailedCount = 0, - Bio = "11011 y.o Dotnet Developer from $\"{cityName}\"", - ConcurrencyStamp = "0baf4779-6f55-4c63-a4e6-726954aad9cd", - DisplayName = "razumovsky r", - DisplayNameColour = 9, - Email = "kolosovp95@gmail.com", - EmailCode = new Guid("00000000-0000-0000-0000-000000000000"), - EmailConfirmed = true, - Image = "razumovsky_picture.jpg", - LockoutEnabled = false, - NormalizedEmail = "KOLOSOVP94@GMAIL.COM", - PasswordHash = "AQAAAAEAACcQAAAAEPODqAoki2Nj6kYr/DBnY2A2JwvDu63cmRD+EmJ/IvLnLQcAv8y0THbJ7PykDVB0+A==", - PhoneNumber = "48743615532", - PhoneNumberConfirmed = true, - TwoFactorEnabled = false, - UserName = "razumovsky_r" - }, - new - { - Id = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), - AccessFailedCount = 0, - Bio = "Колбасятор.", - ConcurrencyStamp = "f6ed2ebb-8829-4157-850c-a4159c140186", - DisplayName = "Мусяка Колбасяка", - DisplayNameColour = 5, - Email = "kolbasator@gmail.com", - EmailCode = new Guid("00000000-0000-0000-0000-000000000000"), - EmailConfirmed = true, - Image = "musyaka_picture.jpg", - LockoutEnabled = false, - NormalizedEmail = "KOLBASATOR@GMAIL.COM", - PasswordHash = "AQAAAAEAACcQAAAAEJpUl/VVq3xrRJYSzQirsi9J0h8O78+nX19d9ESeUaR29x/r884DVNeTIK9DYEHisg==", - PhoneNumber = "77017506265", - PhoneNumberConfirmed = true, - TwoFactorEnabled = false, - UserName = "kolbasator" - }, - new - { - Id = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), - AccessFailedCount = 0, - Bio = "Дипломат", - ConcurrencyStamp = "8e911abe-6649-4669-a71e-27b22e2b24d8", - DisplayName = "Amelit", - DisplayNameColour = 4, - Email = "amelit@gmail.com", - EmailCode = new Guid("00000000-0000-0000-0000-000000000000"), - EmailConfirmed = true, - Image = "amelit_picture.jpg", - LockoutEnabled = false, - NormalizedEmail = "AMELIT@GMAIL.COM", - PasswordHash = "AQAAAAEAACcQAAAAELkRY15BysaldxhoS7xfzWk5/xtpol5S+BdBwZ1yMkBOMG9jjrd5zhy/oQVY88v1yg==", - PhoneNumber = "12025550152", - PhoneNumberConfirmed = true, - TwoFactorEnabled = false, - UserName = "TheMoonlightSonata" - }, - new - { - Id = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), - AccessFailedCount = 0, - Bio = "Third year student of WSB at Poznan", - ConcurrencyStamp = "d8732eef-a079-4d18-a3ef-b6f2654b9e91", - DisplayName = "Petro Kolosov", - DisplayNameColour = 1, - Email = "petro.kolosov@wp.pl", - EmailCode = new Guid("00000000-0000-0000-0000-000000000000"), - EmailConfirmed = true, - Image = "razumovsky_picture.jpg", - LockoutEnabled = false, - NormalizedEmail = "PETRO.KOLOSOV@WP.PL", - PasswordHash = "AQAAAAEAACcQAAAAELHgYd7B1nNhcO2YOZe0iYvaOasQWbZQFWFJF9y2hs5wqp8qbt1hEWaJrDtjBBkGBg==", - PhoneNumber = "48743615532", - PhoneNumberConfirmed = true, - TwoFactorEnabled = false, - UserName = "petro.kolosov" - }, - new - { - Id = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), - AccessFailedCount = 0, - Bio = "Teacher of Computer Science at WSB Poznan", - ConcurrencyStamp = "e19ea8b2-e69b-4931-8797-1ad0dbbeefed", - DisplayName = "Szymon Murawski", - DisplayNameColour = 7, - Email = "szymon.murawski@wp.pl", - EmailCode = new Guid("00000000-0000-0000-0000-000000000000"), - EmailConfirmed = true, - Image = "szymon_picture.png", - LockoutEnabled = false, - NormalizedEmail = "SZYMON.MURAWSKI@WP.PL", - PasswordHash = "AQAAAAEAACcQAAAAEF03r/6VPRvhJlHfwslgCp3FoID8bF4+QfgkvyQlf4dIaVlu4MLAgXpwH9dT8zgNIQ==", - PhoneNumber = "48743615532", - PhoneNumberConfirmed = true, - TwoFactorEnabled = false, - UserName = "szymon.murawski" - }, - new - { - Id = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), - AccessFailedCount = 0, - Bio = "Third year student of WSB at Poznan", - ConcurrencyStamp = "756262d6-3691-427b-aded-c9b7fa0280d3", - DisplayName = "Illia Zubachov", - DisplayNameColour = 10, - Email = "illia.zubachov@wp.pl", - EmailCode = new Guid("00000000-0000-0000-0000-000000000000"), - EmailConfirmed = true, - Image = "illia_picture.png", - LockoutEnabled = false, - NormalizedEmail = "ILLIA.ZUBACHOW@WP.PL", - PasswordHash = "AQAAAAEAACcQAAAAEMZezIZBhF9Fcy/zQHqIPibUBb34rjqQV+lX6XMeycojjBbPX86Z0BIdeTjULsZd/A==", - PhoneNumber = "48352643123", - PhoneNumberConfirmed = true, - TwoFactorEnabled = false, - UserName = "illia.zubachov" - }, - new - { - Id = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), - AccessFailedCount = 0, - Bio = "Third year student of WSB at Poznan", - ConcurrencyStamp = "c9cf3e28-70fd-474d-8826-a7756291d9f7", - DisplayName = "Arslanbek Temirbekov", - DisplayNameColour = 2, - Email = "arslanbek.temirbekov@wp.pl", - EmailCode = new Guid("00000000-0000-0000-0000-000000000000"), - EmailConfirmed = true, - Image = "arslan_picture.png", - LockoutEnabled = false, - NormalizedEmail = "ARSLANBEK.TEMIRBEKOV@WP.PL", - PasswordHash = "AQAAAAEAACcQAAAAEHTIB0KlXngnIkY/noMvRndPHGhohemQUr4JzutPV7/zLUZEAwXx22GijLaumze9Sw==", - PhoneNumber = "48278187781", - PhoneNumberConfirmed = true, - TwoFactorEnabled = false, - UserName = "arslanbek.temirbekov" - }, - new - { - Id = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), - AccessFailedCount = 0, - Bio = "Third year student of WSB at Poznan", - ConcurrencyStamp = "008a91b6-68ad-45e0-bf27-46ab4b31a5f3", - DisplayName = "Serhii Holishevskii", - DisplayNameColour = 8, - Email = "serhii.holishevskii@wp.pl", - EmailCode = new Guid("00000000-0000-0000-0000-000000000000"), - EmailConfirmed = true, - Image = "serhii_picture.png", - LockoutEnabled = false, - NormalizedEmail = "SERHII.HOLISHEVSKII@WP.PL", - PasswordHash = "AQAAAAEAACcQAAAAEDPJPhNfd65CS93OuXwfPkeWtA3wGL8KeoQjjlBf2PcUoVl7WUdmH6GDsjlZVrXmrg==", - PhoneNumber = "48175481653", - PhoneNumberConfirmed = true, - TwoFactorEnabled = false, - UserName = "serhii.holishevskii" - }); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.UserInformationEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("Address") - .HasColumnType("nvarchar(max)"); - - b.Property("BirthDay") - .HasColumnType("datetime2"); - - b.Property("CreatedAt") - .HasColumnType("datetime2"); - - b.Property("Facebook") - .HasColumnType("nvarchar(max)"); - - b.Property("Instagram") - .HasColumnType("nvarchar(max)"); - - b.Property("LinkedIn") - .HasColumnType("nvarchar(max)"); - - b.Property("ProfilePicture") - .HasColumnType("nvarchar(max)"); - - b.Property("Twitter") - .HasColumnType("nvarchar(max)"); - - b.Property("UpdatedAt") - .HasColumnType("datetime2"); - - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.Property("Website") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("UserId") - .IsUnique(); - - b.ToTable("UserInformationEntity", "mango"); - - b.HasData( - new - { - Id = new Guid("7c285f0c-67ed-4cfd-baad-14035f5f384e"), - Address = "Poznan, Poland", - BirthDay = new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2600), - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2603), - Facebook = "petro.kolosov", - Instagram = "petro.kolosov", - LinkedIn = "petro.kolosov", - Twitter = "petro.kolosov", - UpdatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2603), - UserId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), - Website = "petro.kolosov.com" - }, - new - { - Id = new Guid("45ad1329-dba1-4885-833a-472d456e9f44"), - Address = "Poznan, Poland", - BirthDay = new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2609), - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2611), - Facebook = "illia.zubachov", - Instagram = "illia.zubachov", - LinkedIn = "illia.zubachov", - Twitter = "illia.zubachov", - UpdatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2610), - UserId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), - Website = "illia.zubachov.com" - }, - new - { - Id = new Guid("931ad2ec-6747-4f9f-a4ca-9870c9cc5ad3"), - Address = "Poznan, Poland", - BirthDay = new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2613), - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2614), - Facebook = "serhii.holishevskii", - Instagram = "serhii.holishevskii", - LinkedIn = "serhii.holishevskii", - Twitter = "serhii.holishevskii", - UpdatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2614), - UserId = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), - Website = "serhii.holishevskii.com" - }, - new - { - Id = new Guid("6ce81626-4307-4393-8175-572b910190e9"), - Address = "Poznan, Poland", - BirthDay = new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2616), - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2617), - Facebook = "arslan.temirbekov", - Instagram = "arslan.temirbekov", - LinkedIn = "arslan.temirbekov", - Twitter = "arslan.temirbekov", - UpdatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2617), - UserId = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), - Website = "arslan.temirbekov.com" - }, - new - { - Id = new Guid("6fc2a397-4aea-47f0-83ed-448757d0a86b"), - Address = "Poznan, Poland", - BirthDay = new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2619), - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2620), - Facebook = "szymon.murawski", - Instagram = "szymon.murawski", - LinkedIn = "szymon.murawski", - Twitter = "szymon.murawski", - UpdatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2619), - UserId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), - Website = "szymon.murawski.com" - }, - new - { - Id = new Guid("36e23b21-54c6-46a8-85bc-0dc91291f8fb"), - Address = "Moscow, Russia", - BirthDay = new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2635), - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2636), - Instagram = "khachapur.mudrenych", - LinkedIn = "khachapur.mudrenych", - UpdatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2635), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), - Website = "khachapur.com" - }, - new - { - Id = new Guid("f086fd85-2e7c-4aa2-9c7b-b65f304122d2"), - Address = "Odessa, Ukraine", - BirthDay = new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2637), - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2638), - Facebook = "razumovsky_r", - Instagram = "razumovsky_r", - LinkedIn = "razumovsky_r", - Twitter = "razumovsky_r", - UpdatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2637), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - Website = "razumovsky.com" - }, - new - { - Id = new Guid("4786d148-23aa-43d1-8b3d-406a6ce66bee"), - Address = "Saint-Petersburg, Russia", - BirthDay = new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2639), - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2640), - Facebook = "kolbasator", - ProfilePicture = "profile.png", - UpdatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2640), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), - Website = "kolbasator.com" - }, - new - { - Id = new Guid("b48c1502-c326-4dce-85dd-21a4d9aa390c"), - Address = "Moscow, Russia", - BirthDay = new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2641), - CreatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2642), - Facebook = "TheMoonlightSonata", - Instagram = "TheMoonlightSonata", - Twitter = "TheMoonlightSonata", - UpdatedAt = new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2642), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") - }); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1); - - b.Property("ClaimType") - .HasColumnType("nvarchar(max)"); - - b.Property("ClaimValue") - .HasColumnType("nvarchar(max)"); - - b.Property("RoleId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetRoleClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1); - - b.Property("ClaimType") - .HasColumnType("nvarchar(max)"); - - b.Property("ClaimValue") - .HasColumnType("nvarchar(max)"); - - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.Property("LoginProvider") - .HasColumnType("nvarchar(450)"); - - b.Property("ProviderKey") - .HasColumnType("nvarchar(450)"); - - b.Property("ProviderDisplayName") - .HasColumnType("nvarchar(max)"); - - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("LoginProvider", "ProviderKey"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserLogins", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.Property("RoleId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetUserRoles", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.Property("LoginProvider") - .HasColumnType("nvarchar(450)"); - - b.Property("Name") - .HasColumnType("nvarchar(450)"); - - b.Property("Value") - .HasColumnType("nvarchar(max)"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AspNetUserTokens", (string)null); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.DocumentEntity", b => - { - b.HasOne("MangoAPI.Domain.Entities.UserEntity", "User") - .WithMany("Documents") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("User"); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.MessageEntity", b => - { - b.HasOne("MangoAPI.Domain.Entities.ChatEntity", "Chat") - .WithMany("Messages") - .HasForeignKey("ChatId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("MangoAPI.Domain.Entities.UserEntity", "User") - .WithMany("Messages") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Chat"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.SessionEntity", b => - { - b.HasOne("MangoAPI.Domain.Entities.UserEntity", "UserEntity") - .WithMany("Sessions") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("UserEntity"); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.UserChatEntity", b => - { - b.HasOne("MangoAPI.Domain.Entities.ChatEntity", "Chat") - .WithMany("ChatUsers") - .HasForeignKey("ChatId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("MangoAPI.Domain.Entities.UserEntity", "User") - .WithMany("UserChats") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Chat"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.UserContactEntity", b => - { - b.HasOne("MangoAPI.Domain.Entities.UserEntity", "User") - .WithMany("Contacts") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("User"); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.UserInformationEntity", b => - { - b.HasOne("MangoAPI.Domain.Entities.UserEntity", "User") - .WithOne("UserInformation") - .HasForeignKey("MangoAPI.Domain.Entities.UserInformationEntity", "UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("User"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.HasOne("MangoAPI.Domain.Entities.RoleEntity", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.HasOne("MangoAPI.Domain.Entities.UserEntity", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.HasOne("MangoAPI.Domain.Entities.UserEntity", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.HasOne("MangoAPI.Domain.Entities.RoleEntity", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("MangoAPI.Domain.Entities.UserEntity", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.HasOne("MangoAPI.Domain.Entities.UserEntity", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.ChatEntity", b => - { - b.Navigation("ChatUsers"); - - b.Navigation("Messages"); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.UserEntity", b => - { - b.Navigation("Contacts"); - - b.Navigation("Documents"); - - b.Navigation("Messages"); - - b.Navigation("Sessions"); - - b.Navigation("UserChats"); - - b.Navigation("UserInformation"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/MangoAPI.Infrastructure/Migrations/20230306205653_PasswordRestoreRequestDeleted.cs b/MangoAPI.Infrastructure/Migrations/20230306205653_PasswordRestoreRequestDeleted.cs deleted file mode 100644 index 603914e24..000000000 --- a/MangoAPI.Infrastructure/Migrations/20230306205653_PasswordRestoreRequestDeleted.cs +++ /dev/null @@ -1,1393 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace MangoAPI.Infrastructure.Migrations -{ - public partial class PasswordRestoreRequestDeleted : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "PasswordRestoreRequestEntity", - schema: "mango"); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("1ac7cf8d-f488-486a-8c7d-a07aca7c5438")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("1c03dd4e-a1dd-4e52-8d68-9862c95101bf")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("21df2608-e233-4d5b-bfe6-ae923aceef59")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("268c3cb9-cb40-4b4c-8fb1-e7f872eb9f27")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("2a820834-1ee6-477c-8ce1-a25fb638b5fa")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("2b230ae7-366a-44ab-93ac-c874bf34d26c")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("3650c2e3-c1bd-47a0-9015-778fb7925dde")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("373c335f-9187-4f3c-83ea-bfc5e4e9e8fa")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("37968de3-48a3-495a-a749-41c77714a192")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("3e07d86e-809b-4cb6-a628-19a23422764a")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("47285cd9-3a12-4db8-bece-eaad8d45ee4f")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("472dd368-5d38-425b-896c-53102d71ebe6")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("5ab96662-f709-4b91-af3e-ccfdd8e6b953")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("6c58a80d-a2aa-404f-b896-ec1bdca0e02f")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("6c7cdfa2-f07a-44a3-a0f8-79266d9d3e2b")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("7c8e1119-cec2-47da-9d96-a1896958eebc")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("86e20fcb-11b4-4f2e-a7ba-6e255660116b")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("896ad499-29b1-4636-8a35-aea6a186bcdd")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("8a57d2fd-7d70-41ed-ab25-a2e43a490567")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("96eb8a64-2e4f-4f20-b4d3-5f7e86e6f8cb")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("b814bdb3-58a1-43e7-82b6-b1bf259ca795")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("bd61cf2d-def0-4e46-b107-0a299c44a235")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("cbb49dd0-0004-4d96-8d47-df3956b5c69d")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("d600aa80-853b-4e6d-b0fa-b70161c063b8")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("da595b51-c294-4ba1-910f-e87089f1cef5")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("eab3e30d-54ae-4869-9f2e-b54162a8de7d")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("eb41b14a-1631-438e-b448-b5ff963d1a81")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("edf796ea-e49c-436c-a637-dee09a25b249")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("f3c7feac-a4cc-43de-b56e-11ac67210589")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("f443334d-0638-4630-a365-073fc9d96489")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("faeabdee-f6bf-47b7-afe2-5fb15be2342d")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("03eb362d-08a3-4a0e-a0a9-89af8893f8d5")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("119387eb-49cb-47b0-aa55-32e2b3e0a355")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("28cbadd0-74e9-4ae0-a6b7-e8f1c5c034b7")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("2944e8fd-3e7e-4de2-8172-147a4f283242")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("39dcf9d7-6334-41f4-9ec9-5ba7bf6fea94")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("3be8cc49-8a56-4d93-b0cb-c5e0e9fd4957")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("4e43a6d8-9df4-4d66-9466-1ac90f55773d")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("6903a014-7cc1-4218-9e67-0ac301da66a0")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("7df79375-20b7-4288-b3f0-3a031bb382b5")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("81fb56e4-a6cc-41bd-80d0-6dea2ea53ef8")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("83332d37-0c99-458a-8d45-008baa5ac3b1")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("98aa09c0-2f5f-4bce-b868-201f73c018df")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("9ed9697e-66e2-45be-bf1b-eca257b0f9c4")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("a3898646-4e37-4cc0-969f-27b611013b9a")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("a8a7e3a3-6c45-4ce2-b4a0-8f62c763f05c")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("aa62f6a0-bf42-4e67-8f69-4a5b7c74c599")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("b37b49e0-4576-421d-ad88-e9085ea7a313")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("b3a08dd2-6188-4c60-94d9-a4489773b31e")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("bf269103-8486-4a9f-98af-516896403edc")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("c5e4f63e-4822-4c84-ad96-b66343546bdd")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("ce6034f5-ad9c-4bdc-b8f4-d987d7dc761b")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("ce8ba232-f16d-420c-a4fb-4111b62d0711")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("cfcc5a3a-16b0-49c9-82ae-4ef92737c1d4")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("d10f7700-66de-4afa-b3ac-6addf5495019")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("dcdfdde7-fb04-4890-9056-912df2b64a9e")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("de23a206-edb7-49df-b381-f6d7b82a4cb8")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("e4af34b0-d832-4b6c-9f87-0e6e918faa8e")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("e7eebf8f-00b4-4dd4-9928-90c90f7547dc")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserInformationEntity", - keyColumn: "Id", - keyValue: new Guid("1090ae1a-9f98-46e6-9259-7ee4c95e9430")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserInformationEntity", - keyColumn: "Id", - keyValue: new Guid("18395258-dc14-468b-b219-d31428d4ccf1")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserInformationEntity", - keyColumn: "Id", - keyValue: new Guid("2b76d688-dd54-4dcd-a960-35a29d4ee2be")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserInformationEntity", - keyColumn: "Id", - keyValue: new Guid("363b03b0-21a0-46a8-b3ff-3c6d5169b698")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserInformationEntity", - keyColumn: "Id", - keyValue: new Guid("61c371d9-bc79-4ad7-b77b-43a5a129cd45")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserInformationEntity", - keyColumn: "Id", - keyValue: new Guid("82862776-1f88-426a-ae46-c1613ee3f72a")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserInformationEntity", - keyColumn: "Id", - keyValue: new Guid("b2bbbff1-9b12-4402-bbed-e0315ff73ed0")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserInformationEntity", - keyColumn: "Id", - keyValue: new Guid("cc3f7cb4-bd75-4ddd-8faa-5e5e8e8d9839")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserInformationEntity", - keyColumn: "Id", - keyValue: new Guid("de20380f-1156-4fd5-a16c-1b93bab7aee2")); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1613), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1614), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1613) }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("3fce8b2c-252d-4514-a1bb-fbdf73c47b78"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1635), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1636), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1636) }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1615), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1616), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1615) }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1619), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1620), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1619) }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("9f205dde-0ddc-401f-8fe9-6c794b661f5d"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1634), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1635), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1634) }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("b119914a-6d95-4047-bf8a-db27deeb7dc9"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1632), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1633), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1633) }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1606), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1610), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1608) }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1617), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1618), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1618) }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("f5b7824f-e52b-4246-9984-06fc8e964f0c"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1628), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1629), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1628) }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("f8729a12-5746-443f-ad31-378d846fce30"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1629), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1630), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1630) }); - - migrationBuilder.InsertData( - schema: "mango", - table: "MessageEntity", - columns: new[] { "Id", "Attachment", "ChatId", "Content", "CreatedAt", "InReplayToAuthor", "InReplayToText", "UpdatedAt", "UserId" }, - values: new object[,] - { - { new Guid("22724c39-2448-4bb6-8fc3-fea5ceb5c9dc"), null, new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), "Слава Партии!!", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5398), null, null, null, new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") }, - { new Guid("2d91d301-a491-4bc6-9061-002218be17b0"), null, new Guid("3fce8b2c-252d-4514-a1bb-fbdf73c47b78"), "Hi teacher", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5423), null, null, null, new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") }, - { new Guid("32346317-7c66-44e5-8cb9-dd2d4a50b457"), null, new Guid("f5b7824f-e52b-4246-9984-06fc8e964f0c"), "Hello World", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5409), null, null, null, new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("38bf11b1-3b27-42fb-8fde-5c39ae614a5a"), null, new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), "Hello World", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5388), null, null, null, new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") }, - { new Guid("49f75eac-2924-4f05-817a-6fc9ef9a268f"), null, new Guid("b119914a-6d95-4047-bf8a-db27deeb7dc9"), "Hello World", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5414), null, null, null, new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("55fca598-c242-4ed1-b29b-af129759d5e5"), null, new Guid("9f205dde-0ddc-401f-8fe9-6c794b661f5d"), "Hello World", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5415), null, null, null, new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") }, - { new Guid("7256cf71-efa0-4672-9abf-5bc513b1086c"), null, new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), "C# The Best", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5393), null, null, null, new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") }, - { new Guid("7df33dcd-3f64-4d03-8d77-9c895c354b4b"), null, new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), "TypeScript The Best", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5394), null, null, null, new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") }, - { new Guid("87487cdb-4291-4811-80ec-1e4f9db2d7b0"), null, new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), "Hello guys, how your diploma project goes?", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5378), null, null, null, new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") }, - { new Guid("8eba3a15-56f5-44ec-aaca-46efbe67eca2"), null, new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), "Hello World", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5405), null, null, null, new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") }, - { new Guid("9202347f-95c8-4dce-8c3c-32be6b49df91"), null, new Guid("f8729a12-5746-443f-ad31-378d846fce30"), "Hello World", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5413), null, null, null, new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("931a46b2-5af2-4e14-8501-5c8727f08959"), null, new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), "Hello World", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5404), null, null, null, new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") }, - { new Guid("a1a9820f-0a02-4261-8b77-cf13b1c218fb"), null, new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), "Слава Партии!!", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5398), null, null, null, new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") }, - { new Guid("ae7dbb11-ba18-4a8b-a15c-69dd243a2c3e"), null, new Guid("b119914a-6d95-4047-bf8a-db27deeb7dc9"), "Hello World", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5413), null, null, null, new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") }, - { new Guid("b902caa3-23ba-49e1-babb-e402895e2807"), null, new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), "Hello World", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5403), null, null, null, new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") }, - { new Guid("b9393310-759d-4f92-b888-4d048caf063b"), null, new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), "Hello World", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5406), null, null, null, new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") }, - { new Guid("ba76b719-571a-410e-8424-353d47adfd83"), null, new Guid("9f205dde-0ddc-401f-8fe9-6c794b661f5d"), "Hello World", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5416), null, null, null, new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") }, - { new Guid("bdf82526-ddf2-4d26-9dcd-a70ec9d001f6"), null, new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), "Слава Партии!!", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5397), null, null, null, new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("befa4294-f615-4d55-a90f-e73332d77591"), null, new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), "Слава Партии!!", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5396), null, null, null, new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") }, - { new Guid("c18fa6c4-cf86-4765-98ad-9e6263214bca"), null, new Guid("f8729a12-5746-443f-ad31-378d846fce30"), "Hello World", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5412), null, null, null, new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") }, - { new Guid("c5b5d07a-1b97-4b8e-aef2-348d8c9d27da"), null, new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), "Hello World", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5399), null, null, null, new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") }, - { new Guid("c98a5a67-a1c4-4ab6-8d41-2c2f1a77b520"), null, new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), "Hello World", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5407), null, null, null, new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") }, - { new Guid("cdba47b6-6074-4ec6-aa6b-990e793123d2"), null, new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), "Hello World", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5400), null, null, null, new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("d0de9911-8b7f-4a20-9c8f-89792af28b7a"), null, new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), "Hi teacher, I perform QA of the current version", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5381), null, null, null, new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") }, - { new Guid("d90c16f3-f790-4c5f-a90b-b3f0fc7f0212"), null, new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), "I work with backend too...", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5386), null, null, null, new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") }, - { new Guid("df054ddf-f311-405d-8b26-bad10c6a936f"), null, new Guid("f5b7824f-e52b-4246-9984-06fc8e964f0c"), "Hello World", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5408), null, null, null, new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") }, - { new Guid("e56194fd-63af-4cd7-ae80-e3840db75dc2"), null, new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), "Well, I'm doing UI/UX part of the project", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5380), null, null, null, new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") }, - { new Guid("e95de444-ccf9-4b35-80d0-356c9301216d"), null, new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), "Hello World", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5406), null, null, null, new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("f45c6ad4-669a-4126-bac8-e4faeb838694"), null, new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), "F# The Best", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5389), null, null, null, new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("f550a534-447b-4216-aafc-55c89c72ff67"), null, new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), "Greetings. I currently workout the back-end part", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5384), null, null, null, new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") }, - { new Guid("fb933dde-e91b-4236-88c5-0d1999846f43"), null, new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), "Great! Good luck to all of you", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5387), null, null, null, new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") } - }); - - migrationBuilder.InsertData( - schema: "mango", - table: "UserContactEntity", - columns: new[] { "Id", "ContactId", "CreatedAt", "UserId" }, - values: new object[] { new Guid("03da4110-35e6-4414-a37c-0d2ea033a6d1"), new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8926), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }); - - migrationBuilder.InsertData( - schema: "mango", - table: "UserContactEntity", - columns: new[] { "Id", "ContactId", "CreatedAt", "UserId" }, - values: new object[,] - { - { new Guid("0ecde415-8c42-4c57-bdba-a876ba316a1a"), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8909), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") }, - { new Guid("0f2d8193-9395-409c-abf2-92735389ea06"), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8904), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") }, - { new Guid("10af6975-fc31-4879-9c75-643b8227d164"), new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8930), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("18fc64e6-bf06-45cd-8d69-54c814f486da"), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8920), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") }, - { new Guid("1ff356b2-8d9d-41b5-ac7b-f729de72fd89"), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8905), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") }, - { new Guid("30a9587c-71f2-48b3-971d-971cffd87c75"), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8922), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") }, - { new Guid("3a887366-3479-4521-8ca3-ae09f4750635"), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8927), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("3b55d09f-9585-458d-8cd4-72d5ea8707b5"), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8905), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") }, - { new Guid("3bd568ee-679e-4469-ad93-b70e70cb45e7"), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8917), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") }, - { new Guid("4f3a1392-8bc6-42c4-8ab2-fbbadd2552a5"), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8908), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") }, - { new Guid("4f54e050-37ee-4ed5-848d-d7aaf3025337"), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8925), new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") }, - { new Guid("5a597475-4820-4601-a038-d8c1ff4b0978"), new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8931), new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") }, - { new Guid("5f95bb0d-3706-46ce-9ba1-d1a41ffcead0"), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8923), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") }, - { new Guid("63c7314b-e018-420c-be65-7b84f34524f3"), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8912), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") }, - { new Guid("7c35261a-6bbb-4819-bf3a-8884b64a12e5"), new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8928), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("8893cdf7-cf4f-489e-a992-687a7a535a4b"), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8907), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") }, - { new Guid("8abb9d01-e0d0-4758-8cb4-54eb1a369351"), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8913), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") }, - { new Guid("a5807a03-bfd1-45a5-ab11-85858c1fd574"), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8901), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") }, - { new Guid("bbb07d53-daf6-4d70-a140-cd6b8b84e60a"), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8926), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("d4f10299-2fed-4adc-af4c-a8af1cfd7516"), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8932), new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") }, - { new Guid("e2ee16d3-13df-435f-971a-36acfd206500"), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8902), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") }, - { new Guid("e6f33b80-a64f-4017-a541-7cce286db160"), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8924), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") }, - { new Guid("e93e2f85-260b-4776-8d4f-f60522fb2659"), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8915), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") }, - { new Guid("ed2dc47c-ec7a-45d7-beef-4c1f59cac29d"), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8914), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") }, - { new Guid("ee9612aa-57b1-4c13-b95e-e149820c7590"), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8918), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") }, - { new Guid("f4be92a5-94d6-4d0a-864c-771af95e4b3f"), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8891), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") }, - { new Guid("f6729e0c-b34a-4f8b-9a59-ce0ddfaf9182"), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8916), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") } - }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "UserEntity", - keyColumn: "Id", - keyValue: new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), - columns: new[] { "ConcurrencyStamp", "PasswordHash" }, - values: new object[] { "d8732eef-a079-4d18-a3ef-b6f2654b9e91", "AQAAAAEAACcQAAAAELHgYd7B1nNhcO2YOZe0iYvaOasQWbZQFWFJF9y2hs5wqp8qbt1hEWaJrDtjBBkGBg==" }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "UserEntity", - keyColumn: "Id", - keyValue: new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), - columns: new[] { "ConcurrencyStamp", "PasswordHash" }, - values: new object[] { "c9cf3e28-70fd-474d-8826-a7756291d9f7", "AQAAAAEAACcQAAAAEHTIB0KlXngnIkY/noMvRndPHGhohemQUr4JzutPV7/zLUZEAwXx22GijLaumze9Sw==" }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "UserEntity", - keyColumn: "Id", - keyValue: new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), - columns: new[] { "ConcurrencyStamp", "PasswordHash" }, - values: new object[] { "f6ed2ebb-8829-4157-850c-a4159c140186", "AQAAAAEAACcQAAAAEJpUl/VVq3xrRJYSzQirsi9J0h8O78+nX19d9ESeUaR29x/r884DVNeTIK9DYEHisg==" }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "UserEntity", - keyColumn: "Id", - keyValue: new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), - columns: new[] { "ConcurrencyStamp", "PasswordHash" }, - values: new object[] { "e19ea8b2-e69b-4931-8797-1ad0dbbeefed", "AQAAAAEAACcQAAAAEF03r/6VPRvhJlHfwslgCp3FoID8bF4+QfgkvyQlf4dIaVlu4MLAgXpwH9dT8zgNIQ==" }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "UserEntity", - keyColumn: "Id", - keyValue: new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), - columns: new[] { "ConcurrencyStamp", "PasswordHash" }, - values: new object[] { "756262d6-3691-427b-aded-c9b7fa0280d3", "AQAAAAEAACcQAAAAEMZezIZBhF9Fcy/zQHqIPibUBb34rjqQV+lX6XMeycojjBbPX86Z0BIdeTjULsZd/A==" }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "UserEntity", - keyColumn: "Id", - keyValue: new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), - columns: new[] { "ConcurrencyStamp", "PasswordHash" }, - values: new object[] { "008a91b6-68ad-45e0-bf27-46ab4b31a5f3", "AQAAAAEAACcQAAAAEDPJPhNfd65CS93OuXwfPkeWtA3wGL8KeoQjjlBf2PcUoVl7WUdmH6GDsjlZVrXmrg==" }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "UserEntity", - keyColumn: "Id", - keyValue: new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), - columns: new[] { "ConcurrencyStamp", "PasswordHash" }, - values: new object[] { "8e911abe-6649-4669-a71e-27b22e2b24d8", "AQAAAAEAACcQAAAAELkRY15BysaldxhoS7xfzWk5/xtpol5S+BdBwZ1yMkBOMG9jjrd5zhy/oQVY88v1yg==" }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "UserEntity", - keyColumn: "Id", - keyValue: new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), - columns: new[] { "ConcurrencyStamp", "PasswordHash" }, - values: new object[] { "919b9cbb-7b1e-4424-82a6-326edb8ae694", "AQAAAAEAACcQAAAAEGJnlwFs/vBVcWfMBXzKimCUAu+hp7DOnweFuyATzBy3YRoaX/3L0QYZRzNtTo6DbQ==" }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "UserEntity", - keyColumn: "Id", - keyValue: new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - columns: new[] { "ConcurrencyStamp", "PasswordHash" }, - values: new object[] { "0baf4779-6f55-4c63-a4e6-726954aad9cd", "AQAAAAEAACcQAAAAEPODqAoki2Nj6kYr/DBnY2A2JwvDu63cmRD+EmJ/IvLnLQcAv8y0THbJ7PykDVB0+A==" }); - - migrationBuilder.InsertData( - schema: "mango", - table: "UserInformationEntity", - columns: new[] { "Id", "Address", "BirthDay", "CreatedAt", "Facebook", "Instagram", "LinkedIn", "ProfilePicture", "Twitter", "UpdatedAt", "UserId", "Website" }, - values: new object[,] - { - { new Guid("36e23b21-54c6-46a8-85bc-0dc91291f8fb"), "Moscow, Russia", new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2635), new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2636), null, "khachapur.mudrenych", "khachapur.mudrenych", null, null, new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2635), new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), "khachapur.com" }, - { new Guid("45ad1329-dba1-4885-833a-472d456e9f44"), "Poznan, Poland", new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2609), new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2611), "illia.zubachov", "illia.zubachov", "illia.zubachov", null, "illia.zubachov", new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2610), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), "illia.zubachov.com" }, - { new Guid("4786d148-23aa-43d1-8b3d-406a6ce66bee"), "Saint-Petersburg, Russia", new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2639), new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2640), "kolbasator", null, null, "profile.png", null, new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2640), new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), "kolbasator.com" }, - { new Guid("6ce81626-4307-4393-8175-572b910190e9"), "Poznan, Poland", new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2616), new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2617), "arslan.temirbekov", "arslan.temirbekov", "arslan.temirbekov", null, "arslan.temirbekov", new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2617), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), "arslan.temirbekov.com" }, - { new Guid("6fc2a397-4aea-47f0-83ed-448757d0a86b"), "Poznan, Poland", new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2619), new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2620), "szymon.murawski", "szymon.murawski", "szymon.murawski", null, "szymon.murawski", new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2619), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), "szymon.murawski.com" }, - { new Guid("7c285f0c-67ed-4cfd-baad-14035f5f384e"), "Poznan, Poland", new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2600), new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2603), "petro.kolosov", "petro.kolosov", "petro.kolosov", null, "petro.kolosov", new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2603), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), "petro.kolosov.com" } - }); - - migrationBuilder.InsertData( - schema: "mango", - table: "UserInformationEntity", - columns: new[] { "Id", "Address", "BirthDay", "CreatedAt", "Facebook", "Instagram", "LinkedIn", "ProfilePicture", "Twitter", "UpdatedAt", "UserId", "Website" }, - values: new object[] { new Guid("931ad2ec-6747-4f9f-a4ca-9870c9cc5ad3"), "Poznan, Poland", new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2613), new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2614), "serhii.holishevskii", "serhii.holishevskii", "serhii.holishevskii", null, "serhii.holishevskii", new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2614), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), "serhii.holishevskii.com" }); - - migrationBuilder.InsertData( - schema: "mango", - table: "UserInformationEntity", - columns: new[] { "Id", "Address", "BirthDay", "CreatedAt", "Facebook", "Instagram", "LinkedIn", "ProfilePicture", "Twitter", "UpdatedAt", "UserId", "Website" }, - values: new object[] { new Guid("b48c1502-c326-4dce-85dd-21a4d9aa390c"), "Moscow, Russia", new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2641), new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2642), "TheMoonlightSonata", "TheMoonlightSonata", null, null, "TheMoonlightSonata", new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2642), new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), null }); - - migrationBuilder.InsertData( - schema: "mango", - table: "UserInformationEntity", - columns: new[] { "Id", "Address", "BirthDay", "CreatedAt", "Facebook", "Instagram", "LinkedIn", "ProfilePicture", "Twitter", "UpdatedAt", "UserId", "Website" }, - values: new object[] { new Guid("f086fd85-2e7c-4aa2-9c7b-b65f304122d2"), "Odessa, Ukraine", new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2637), new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2638), "razumovsky_r", "razumovsky_r", "razumovsky_r", null, "razumovsky_r", new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2637), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), "razumovsky.com" }); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("22724c39-2448-4bb6-8fc3-fea5ceb5c9dc")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("2d91d301-a491-4bc6-9061-002218be17b0")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("32346317-7c66-44e5-8cb9-dd2d4a50b457")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("38bf11b1-3b27-42fb-8fde-5c39ae614a5a")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("49f75eac-2924-4f05-817a-6fc9ef9a268f")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("55fca598-c242-4ed1-b29b-af129759d5e5")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("7256cf71-efa0-4672-9abf-5bc513b1086c")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("7df33dcd-3f64-4d03-8d77-9c895c354b4b")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("87487cdb-4291-4811-80ec-1e4f9db2d7b0")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("8eba3a15-56f5-44ec-aaca-46efbe67eca2")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("9202347f-95c8-4dce-8c3c-32be6b49df91")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("931a46b2-5af2-4e14-8501-5c8727f08959")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("a1a9820f-0a02-4261-8b77-cf13b1c218fb")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("ae7dbb11-ba18-4a8b-a15c-69dd243a2c3e")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("b902caa3-23ba-49e1-babb-e402895e2807")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("b9393310-759d-4f92-b888-4d048caf063b")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("ba76b719-571a-410e-8424-353d47adfd83")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("bdf82526-ddf2-4d26-9dcd-a70ec9d001f6")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("befa4294-f615-4d55-a90f-e73332d77591")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("c18fa6c4-cf86-4765-98ad-9e6263214bca")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("c5b5d07a-1b97-4b8e-aef2-348d8c9d27da")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("c98a5a67-a1c4-4ab6-8d41-2c2f1a77b520")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("cdba47b6-6074-4ec6-aa6b-990e793123d2")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("d0de9911-8b7f-4a20-9c8f-89792af28b7a")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("d90c16f3-f790-4c5f-a90b-b3f0fc7f0212")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("df054ddf-f311-405d-8b26-bad10c6a936f")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("e56194fd-63af-4cd7-ae80-e3840db75dc2")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("e95de444-ccf9-4b35-80d0-356c9301216d")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("f45c6ad4-669a-4126-bac8-e4faeb838694")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("f550a534-447b-4216-aafc-55c89c72ff67")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("fb933dde-e91b-4236-88c5-0d1999846f43")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("03da4110-35e6-4414-a37c-0d2ea033a6d1")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("0ecde415-8c42-4c57-bdba-a876ba316a1a")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("0f2d8193-9395-409c-abf2-92735389ea06")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("10af6975-fc31-4879-9c75-643b8227d164")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("18fc64e6-bf06-45cd-8d69-54c814f486da")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("1ff356b2-8d9d-41b5-ac7b-f729de72fd89")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("30a9587c-71f2-48b3-971d-971cffd87c75")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("3a887366-3479-4521-8ca3-ae09f4750635")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("3b55d09f-9585-458d-8cd4-72d5ea8707b5")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("3bd568ee-679e-4469-ad93-b70e70cb45e7")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("4f3a1392-8bc6-42c4-8ab2-fbbadd2552a5")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("4f54e050-37ee-4ed5-848d-d7aaf3025337")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("5a597475-4820-4601-a038-d8c1ff4b0978")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("5f95bb0d-3706-46ce-9ba1-d1a41ffcead0")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("63c7314b-e018-420c-be65-7b84f34524f3")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("7c35261a-6bbb-4819-bf3a-8884b64a12e5")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("8893cdf7-cf4f-489e-a992-687a7a535a4b")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("8abb9d01-e0d0-4758-8cb4-54eb1a369351")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("a5807a03-bfd1-45a5-ab11-85858c1fd574")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("bbb07d53-daf6-4d70-a140-cd6b8b84e60a")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("d4f10299-2fed-4adc-af4c-a8af1cfd7516")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("e2ee16d3-13df-435f-971a-36acfd206500")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("e6f33b80-a64f-4017-a541-7cce286db160")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("e93e2f85-260b-4776-8d4f-f60522fb2659")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("ed2dc47c-ec7a-45d7-beef-4c1f59cac29d")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("ee9612aa-57b1-4c13-b95e-e149820c7590")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("f4be92a5-94d6-4d0a-864c-771af95e4b3f")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("f6729e0c-b34a-4f8b-9a59-ce0ddfaf9182")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserInformationEntity", - keyColumn: "Id", - keyValue: new Guid("36e23b21-54c6-46a8-85bc-0dc91291f8fb")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserInformationEntity", - keyColumn: "Id", - keyValue: new Guid("45ad1329-dba1-4885-833a-472d456e9f44")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserInformationEntity", - keyColumn: "Id", - keyValue: new Guid("4786d148-23aa-43d1-8b3d-406a6ce66bee")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserInformationEntity", - keyColumn: "Id", - keyValue: new Guid("6ce81626-4307-4393-8175-572b910190e9")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserInformationEntity", - keyColumn: "Id", - keyValue: new Guid("6fc2a397-4aea-47f0-83ed-448757d0a86b")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserInformationEntity", - keyColumn: "Id", - keyValue: new Guid("7c285f0c-67ed-4cfd-baad-14035f5f384e")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserInformationEntity", - keyColumn: "Id", - keyValue: new Guid("931ad2ec-6747-4f9f-a4ca-9870c9cc5ad3")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserInformationEntity", - keyColumn: "Id", - keyValue: new Guid("b48c1502-c326-4dce-85dd-21a4d9aa390c")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserInformationEntity", - keyColumn: "Id", - keyValue: new Guid("f086fd85-2e7c-4aa2-9c7b-b65f304122d2")); - - migrationBuilder.CreateTable( - name: "PasswordRestoreRequestEntity", - schema: "mango", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - UserId = table.Column(type: "uniqueidentifier", nullable: false), - CreatedAt = table.Column(type: "datetime2", nullable: false), - Email = table.Column(type: "nvarchar(max)", nullable: true), - ExpiresAt = table.Column(type: "datetime2", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_PasswordRestoreRequestEntity", x => x.Id); - table.ForeignKey( - name: "FK_PasswordRestoreRequestEntity_UserEntity_UserId", - column: x => x.UserId, - principalSchema: "mango", - principalTable: "UserEntity", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2260), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2261), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2260) }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("3fce8b2c-252d-4514-a1bb-fbdf73c47b78"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2329), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2330), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2329) }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2262), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2263), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2262) }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2266), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2267), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2266) }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("9f205dde-0ddc-401f-8fe9-6c794b661f5d"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2327), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2328), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2327) }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("b119914a-6d95-4047-bf8a-db27deeb7dc9"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2272), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2273), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2272) }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2254), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2258), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2256) }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2264), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2265), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2264) }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("f5b7824f-e52b-4246-9984-06fc8e964f0c"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2268), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2269), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2269) }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("f8729a12-5746-443f-ad31-378d846fce30"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2270), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2271), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(2270) }); - - migrationBuilder.InsertData( - schema: "mango", - table: "MessageEntity", - columns: new[] { "Id", "Attachment", "ChatId", "Content", "CreatedAt", "InReplayToAuthor", "InReplayToText", "UpdatedAt", "UserId" }, - values: new object[,] - { - { new Guid("1ac7cf8d-f488-486a-8c7d-a07aca7c5438"), null, new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), "Слава Партии!!", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5555), null, null, null, new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") }, - { new Guid("1c03dd4e-a1dd-4e52-8d68-9862c95101bf"), null, new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), "Hello guys, how your diploma project goes?", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5541), null, null, null, new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") }, - { new Guid("21df2608-e233-4d5b-bfe6-ae923aceef59"), null, new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), "Hello World", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5559), null, null, null, new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") }, - { new Guid("268c3cb9-cb40-4b4c-8fb1-e7f872eb9f27"), null, new Guid("f8729a12-5746-443f-ad31-378d846fce30"), "Hello World", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5571), null, null, null, new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("2a820834-1ee6-477c-8ce1-a25fb638b5fa"), null, new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), "C# The Best", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5553), null, null, null, new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") }, - { new Guid("2b230ae7-366a-44ab-93ac-c874bf34d26c"), null, new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), "Слава Партии!!", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5556), null, null, null, new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("3650c2e3-c1bd-47a0-9015-778fb7925dde"), null, new Guid("3fce8b2c-252d-4514-a1bb-fbdf73c47b78"), "Hi teacher", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5602), null, null, null, new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") }, - { new Guid("373c335f-9187-4f3c-83ea-bfc5e4e9e8fa"), null, new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), "I work with backend too...", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5547), null, null, null, new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") }, - { new Guid("37968de3-48a3-495a-a749-41c77714a192"), null, new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), "Greetings. I currently workout the back-end part", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5546), null, null, null, new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") }, - { new Guid("3e07d86e-809b-4cb6-a628-19a23422764a"), null, new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), "Слава Партии!!", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5558), null, null, null, new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") }, - { new Guid("47285cd9-3a12-4db8-bece-eaad8d45ee4f"), null, new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), "Hello World", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5562), null, null, null, new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") }, - { new Guid("472dd368-5d38-425b-896c-53102d71ebe6"), null, new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), "TypeScript The Best", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5554), null, null, null, new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") }, - { new Guid("5ab96662-f709-4b91-af3e-ccfdd8e6b953"), null, new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), "Great! Good luck to all of you", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5548), null, null, null, new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") }, - { new Guid("6c58a80d-a2aa-404f-b896-ec1bdca0e02f"), null, new Guid("f5b7824f-e52b-4246-9984-06fc8e964f0c"), "Hello World", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5568), null, null, null, new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("6c7cdfa2-f07a-44a3-a0f8-79266d9d3e2b"), null, new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), "Hello World", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5567), null, null, null, new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") }, - { new Guid("7c8e1119-cec2-47da-9d96-a1896958eebc"), null, new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), "Hi teacher, I perform QA of the current version", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5545), null, null, null, new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") }, - { new Guid("86e20fcb-11b4-4f2e-a7ba-6e255660116b"), null, new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), "F# The Best", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5550), null, null, null, new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("896ad499-29b1-4636-8a35-aea6a186bcdd"), null, new Guid("b119914a-6d95-4047-bf8a-db27deeb7dc9"), "Hello World", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5572), null, null, null, new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") }, - { new Guid("8a57d2fd-7d70-41ed-ab25-a2e43a490567"), null, new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), "Hello World", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5563), null, null, null, new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") }, - { new Guid("96eb8a64-2e4f-4f20-b4d3-5f7e86e6f8cb"), null, new Guid("9f205dde-0ddc-401f-8fe9-6c794b661f5d"), "Hello World", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5575), null, null, null, new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") }, - { new Guid("b814bdb3-58a1-43e7-82b6-b1bf259ca795"), null, new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), "Hello World", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5566), null, null, null, new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") }, - { new Guid("bd61cf2d-def0-4e46-b107-0a299c44a235"), null, new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), "Слава Партии!!", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5557), null, null, null, new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") }, - { new Guid("cbb49dd0-0004-4d96-8d47-df3956b5c69d"), null, new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), "Hello World", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5565), null, null, null, new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("d600aa80-853b-4e6d-b0fa-b70161c063b8"), null, new Guid("f8729a12-5746-443f-ad31-378d846fce30"), "Hello World", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5570), null, null, null, new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") }, - { new Guid("da595b51-c294-4ba1-910f-e87089f1cef5"), null, new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), "Hello World", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5560), null, null, null, new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("eab3e30d-54ae-4869-9f2e-b54162a8de7d"), null, new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), "Well, I'm doing UI/UX part of the project", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5543), null, null, null, new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") }, - { new Guid("eb41b14a-1631-438e-b448-b5ff963d1a81"), null, new Guid("b119914a-6d95-4047-bf8a-db27deeb7dc9"), "Hello World", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5573), null, null, null, new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("edf796ea-e49c-436c-a637-dee09a25b249"), null, new Guid("f5b7824f-e52b-4246-9984-06fc8e964f0c"), "Hello World", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5567), null, null, null, new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") }, - { new Guid("f3c7feac-a4cc-43de-b56e-11ac67210589"), null, new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), "Hello World", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5564), null, null, null, new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") }, - { new Guid("f443334d-0638-4630-a365-073fc9d96489"), null, new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), "Hello World", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5549), null, null, null, new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") }, - { new Guid("faeabdee-f6bf-47b7-afe2-5fb15be2342d"), null, new Guid("9f205dde-0ddc-401f-8fe9-6c794b661f5d"), "Hello World", new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(5574), null, null, null, new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") } - }); - - migrationBuilder.InsertData( - schema: "mango", - table: "UserContactEntity", - columns: new[] { "Id", "ContactId", "CreatedAt", "UserId" }, - values: new object[] { new Guid("03eb362d-08a3-4a0e-a0a9-89af8893f8d5"), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9417), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") }); - - migrationBuilder.InsertData( - schema: "mango", - table: "UserContactEntity", - columns: new[] { "Id", "ContactId", "CreatedAt", "UserId" }, - values: new object[,] - { - { new Guid("119387eb-49cb-47b0-aa55-32e2b3e0a355"), new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9428), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("28cbadd0-74e9-4ae0-a6b7-e8f1c5c034b7"), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9405), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") }, - { new Guid("2944e8fd-3e7e-4de2-8172-147a4f283242"), new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9432), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("39dcf9d7-6334-41f4-9ec9-5ba7bf6fea94"), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9408), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") }, - { new Guid("3be8cc49-8a56-4d93-b0cb-c5e0e9fd4957"), new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9430), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("4e43a6d8-9df4-4d66-9466-1ac90f55773d"), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9411), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") }, - { new Guid("6903a014-7cc1-4218-9e67-0ac301da66a0"), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9408), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") }, - { new Guid("7df79375-20b7-4288-b3f0-3a031bb382b5"), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9410), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") }, - { new Guid("81fb56e4-a6cc-41bd-80d0-6dea2ea53ef8"), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9434), new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") }, - { new Guid("83332d37-0c99-458a-8d45-008baa5ac3b1"), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9420), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") }, - { new Guid("98aa09c0-2f5f-4bce-b868-201f73c018df"), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9429), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("9ed9697e-66e2-45be-bf1b-eca257b0f9c4"), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9424), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") }, - { new Guid("a3898646-4e37-4cc0-969f-27b611013b9a"), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9424), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") }, - { new Guid("a8a7e3a3-6c45-4ce2-b4a0-8f62c763f05c"), new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9433), new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") }, - { new Guid("aa62f6a0-bf42-4e67-8f69-4a5b7c74c599"), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9398), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") }, - { new Guid("b37b49e0-4576-421d-ad88-e9085ea7a313"), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9419), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") }, - { new Guid("b3a08dd2-6188-4c60-94d9-a4489773b31e"), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9409), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") }, - { new Guid("bf269103-8486-4a9f-98af-516896403edc"), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9406), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") }, - { new Guid("c5e4f63e-4822-4c84-ad96-b66343546bdd"), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9416), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") }, - { new Guid("ce6034f5-ad9c-4bdc-b8f4-d987d7dc761b"), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9420), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") }, - { new Guid("ce8ba232-f16d-420c-a4fb-4111b62d0711"), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9418), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") }, - { new Guid("cfcc5a3a-16b0-49c9-82ae-4ef92737c1d4"), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9404), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") }, - { new Guid("d10f7700-66de-4afa-b3ac-6addf5495019"), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9422), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") }, - { new Guid("dcdfdde7-fb04-4890-9056-912df2b64a9e"), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9415), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") }, - { new Guid("de23a206-edb7-49df-b381-f6d7b82a4cb8"), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9413), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") }, - { new Guid("e4af34b0-d832-4b6c-9f87-0e6e918faa8e"), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9429), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("e7eebf8f-00b4-4dd4-9928-90c90f7547dc"), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), new DateTime(2022, 11, 4, 21, 48, 9, 488, DateTimeKind.Utc).AddTicks(9425), new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") } - }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "UserEntity", - keyColumn: "Id", - keyValue: new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), - columns: new[] { "ConcurrencyStamp", "PasswordHash" }, - values: new object[] { "e9703c4c-d8fe-4503-9208-18c7da552acc", "AQAAAAEAACcQAAAAEHJpIe+MnFlRx+oStyj205ivIYYtdYcZr5skI4vwKTowKxvtv4lLRNtvuz/e0Tpayg==" }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "UserEntity", - keyColumn: "Id", - keyValue: new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), - columns: new[] { "ConcurrencyStamp", "PasswordHash" }, - values: new object[] { "96007c9a-08db-4cc0-8203-f0bbdff53a06", "AQAAAAEAACcQAAAAEG2aBxBUR4W2FT4vKbhDAruvgsVXEQv4D6LpCA44x4Iuwi+jBDwJ9ChBX8tLZrzKLw==" }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "UserEntity", - keyColumn: "Id", - keyValue: new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), - columns: new[] { "ConcurrencyStamp", "PasswordHash" }, - values: new object[] { "1011864e-f6b5-4bb2-a33e-3591f2aa00b3", "AQAAAAEAACcQAAAAELCYFMvrwXaAEjP+52VmJ297CzY7Ig5r2Lm8rYZFm7dCYEgRaPkBuyOg48BGoEEkXA==" }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "UserEntity", - keyColumn: "Id", - keyValue: new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), - columns: new[] { "ConcurrencyStamp", "PasswordHash" }, - values: new object[] { "1e9481a0-d03c-4127-ad2f-90effb4a07ee", "AQAAAAEAACcQAAAAEPf1jxtSitoC3F2EtXVTffpjqPW3HSW7gcCizF348OGeEI0zXoM42yekeBen02zxUA==" }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "UserEntity", - keyColumn: "Id", - keyValue: new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), - columns: new[] { "ConcurrencyStamp", "PasswordHash" }, - values: new object[] { "64f45956-4411-4b43-b866-e0dba4128de7", "AQAAAAEAACcQAAAAEHZQXltQSYg7bG71CwqVWSIMv95gSoNd4Hpab7taHLTErJs/3Q7ra0XQeZbwL2aqEg==" }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "UserEntity", - keyColumn: "Id", - keyValue: new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), - columns: new[] { "ConcurrencyStamp", "PasswordHash" }, - values: new object[] { "81bff22d-9c9a-44b2-bbf2-89df3031d25a", "AQAAAAEAACcQAAAAEJ2+FLvSrlcZmqmgEwhIVWInWCF9WQKuGhEGG32CXzYnqMjiFmgalvmupEzAfXmjwQ==" }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "UserEntity", - keyColumn: "Id", - keyValue: new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), - columns: new[] { "ConcurrencyStamp", "PasswordHash" }, - values: new object[] { "f07bd515-95aa-43b8-b941-c207277ae261", "AQAAAAEAACcQAAAAEGmH6ZXxVl/jLbBckatgaHmvARAt+RTnPAW4643/2rdPHpkj4gKpiIud5Tjx8siWVQ==" }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "UserEntity", - keyColumn: "Id", - keyValue: new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), - columns: new[] { "ConcurrencyStamp", "PasswordHash" }, - values: new object[] { "522e4786-32bd-4a97-92c5-5365359f68e6", "AQAAAAEAACcQAAAAEObkorKRuKUxlmCe59Y9FwPwMtlySvMKYvS3PcWO9/HYenjLQFKPXNebrvs4kmy2Sg==" }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "UserEntity", - keyColumn: "Id", - keyValue: new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - columns: new[] { "ConcurrencyStamp", "PasswordHash" }, - values: new object[] { "afc55cbd-39a1-4f7a-8d3a-475c2812b669", "AQAAAAEAACcQAAAAENvkbhWy0Z/XTv66FxwtQJqxFO2CdJ4n58o8hg6uOnyedzVPx7FuBlnYG0Ks/OuwIQ==" }); - - migrationBuilder.InsertData( - schema: "mango", - table: "UserInformationEntity", - columns: new[] { "Id", "Address", "BirthDay", "CreatedAt", "Facebook", "Instagram", "LinkedIn", "ProfilePicture", "Twitter", "UpdatedAt", "UserId", "Website" }, - values: new object[,] - { - { new Guid("1090ae1a-9f98-46e6-9259-7ee4c95e9430"), "Moscow, Russia", new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8140), new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8141), null, "khachapur.mudrenych", "khachapur.mudrenych", null, null, new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8141), new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), "khachapur.com" }, - { new Guid("18395258-dc14-468b-b219-d31428d4ccf1"), "Poznan, Poland", new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8127), new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8128), "illia.zubachov", "illia.zubachov", "illia.zubachov", null, "illia.zubachov", new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8128), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), "illia.zubachov.com" }, - { new Guid("2b76d688-dd54-4dcd-a960-35a29d4ee2be"), "Moscow, Russia", new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8147), new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8148), "TheMoonlightSonata", "TheMoonlightSonata", null, null, "TheMoonlightSonata", new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8147), new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), null }, - { new Guid("363b03b0-21a0-46a8-b3ff-3c6d5169b698"), "Odessa, Ukraine", new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8143), new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8144), "razumovsky_r", "razumovsky_r", "razumovsky_r", null, "razumovsky_r", new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8143), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), "razumovsky.com" }, - { new Guid("61c371d9-bc79-4ad7-b77b-43a5a129cd45"), "Poznan, Poland", new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8138), new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8139), "szymon.murawski", "szymon.murawski", "szymon.murawski", null, "szymon.murawski", new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8139), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), "szymon.murawski.com" }, - { new Guid("82862776-1f88-426a-ae46-c1613ee3f72a"), "Poznan, Poland", new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8136), new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8137), "arslan.temirbekov", "arslan.temirbekov", "arslan.temirbekov", null, "arslan.temirbekov", new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8136), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), "arslan.temirbekov.com" } - }); - - migrationBuilder.InsertData( - schema: "mango", - table: "UserInformationEntity", - columns: new[] { "Id", "Address", "BirthDay", "CreatedAt", "Facebook", "Instagram", "LinkedIn", "ProfilePicture", "Twitter", "UpdatedAt", "UserId", "Website" }, - values: new object[] { new Guid("b2bbbff1-9b12-4402-bbed-e0315ff73ed0"), "Poznan, Poland", new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8122), new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8124), "petro.kolosov", "petro.kolosov", "petro.kolosov", null, "petro.kolosov", new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8124), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), "petro.kolosov.com" }); - - migrationBuilder.InsertData( - schema: "mango", - table: "UserInformationEntity", - columns: new[] { "Id", "Address", "BirthDay", "CreatedAt", "Facebook", "Instagram", "LinkedIn", "ProfilePicture", "Twitter", "UpdatedAt", "UserId", "Website" }, - values: new object[] { new Guid("cc3f7cb4-bd75-4ddd-8faa-5e5e8e8d9839"), "Saint-Petersburg, Russia", new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8145), new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8146), "kolbasator", null, null, "profile.png", null, new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8145), new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), "kolbasator.com" }); - - migrationBuilder.InsertData( - schema: "mango", - table: "UserInformationEntity", - columns: new[] { "Id", "Address", "BirthDay", "CreatedAt", "Facebook", "Instagram", "LinkedIn", "ProfilePicture", "Twitter", "UpdatedAt", "UserId", "Website" }, - values: new object[] { new Guid("de20380f-1156-4fd5-a16c-1b93bab7aee2"), "Poznan, Poland", new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8130), new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8131), "serhii.holishevskii", "serhii.holishevskii", "serhii.holishevskii", null, "serhii.holishevskii", new DateTime(2022, 11, 4, 21, 48, 9, 498, DateTimeKind.Utc).AddTicks(8131), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), "serhii.holishevskii.com" }); - - migrationBuilder.CreateIndex( - name: "IX_PasswordRestoreRequestEntity_UserId", - schema: "mango", - table: "PasswordRestoreRequestEntity", - column: "UserId"); - } - } -} diff --git a/MangoAPI.Infrastructure/Migrations/20230309161806_UserNameChanged.Designer.cs b/MangoAPI.Infrastructure/Migrations/20230309161806_UserNameChanged.Designer.cs deleted file mode 100644 index a94af4a19..000000000 --- a/MangoAPI.Infrastructure/Migrations/20230309161806_UserNameChanged.Designer.cs +++ /dev/null @@ -1,1784 +0,0 @@ -// -using System; -using MangoAPI.Infrastructure.Database; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace MangoAPI.Infrastructure.Migrations -{ - [DbContext(typeof(MangoDbContext))] - [Migration("20230309161806_UserNameChanged")] - partial class UserNameChanged - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "6.0.10") - .HasAnnotation("Relational:MaxIdentifierLength", 128); - - SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1); - - modelBuilder.Entity("MangoAPI.Domain.Entities.ChatEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("CommunityType") - .HasColumnType("int"); - - b.Property("CreatedAt") - .HasColumnType("datetime2"); - - b.Property("Description") - .HasColumnType("nvarchar(max)"); - - b.Property("Image") - .HasColumnType("nvarchar(max)"); - - b.Property("LastMessageAuthor") - .HasColumnType("nvarchar(max)"); - - b.Property("LastMessageId") - .HasColumnType("uniqueidentifier"); - - b.Property("LastMessageText") - .HasColumnType("nvarchar(max)"); - - b.Property("LastMessageTime") - .HasColumnType("datetime2"); - - b.Property("MembersCount") - .HasColumnType("int"); - - b.Property("Title") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("UpdatedAt") - .HasColumnType("datetime2"); - - b.HasKey("Id"); - - b.ToTable("ChatEntity", "mango"); - - b.HasData( - new - { - Id = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - CommunityType = 2, - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(5895), - Description = "WSB Public Group", - Image = "wsb_group_logo.png", - LastMessageAuthor = "Szymon Murawski", - LastMessageText = "Great! Good luck to all of you", - LastMessageTime = new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(5924), - MembersCount = 5, - Title = "WSB", - UpdatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(5909) - }, - new - { - Id = new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), - CommunityType = 2, - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(5934), - Description = "Extreme Code Main Public Group", - Image = "extreme_code_main.jpg", - LastMessageAuthor = "Amelit", - LastMessageText = "TypeScript The Best", - LastMessageTime = new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(5958), - MembersCount = 4, - Title = "Extreme Code Main", - UpdatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(5943) - }, - new - { - Id = new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), - CommunityType = 2, - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(5968), - Description = "Extreme Code Flood Public Group", - Image = "extremecode_rest_logo.jpg", - LastMessageAuthor = "Amelit", - LastMessageText = "Слава Партии!!", - LastMessageTime = new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(5987), - MembersCount = 4, - Title = "Extreme Code Flood", - UpdatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(5978) - }, - new - { - Id = new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), - CommunityType = 2, - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6002), - Description = "Extreme Code C++ Public Group", - Image = "extremecode_cpp_logo.jpg", - LastMessageAuthor = "Amelit", - LastMessageText = "Hello world!", - LastMessageTime = new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6022), - MembersCount = 4, - Title = "Extreme Code C++", - UpdatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6012) - }, - new - { - Id = new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), - CommunityType = 2, - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6031), - Description = "Extreme Code .NET Public Group", - Image = "extremecode_dotnet.png", - LastMessageAuthor = "Amelit", - LastMessageText = "Hello world!", - LastMessageTime = new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6056), - MembersCount = 4, - Title = "Extreme Code .NET", - UpdatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6041) - }, - new - { - Id = new Guid("f5b7824f-e52b-4246-9984-06fc8e964f0c"), - CommunityType = 1, - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6066), - Description = "Direct chat between Khachatur Khachatryan and razumovsky r", - LastMessageAuthor = "razumovsky r", - LastMessageText = "Hello world!", - LastMessageTime = new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6085), - MembersCount = 2, - Title = "Khachatur Khachatryan / razumovsky r", - UpdatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6075) - }, - new - { - Id = new Guid("f8729a12-5746-443f-ad31-378d846fce30"), - CommunityType = 1, - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6095), - Description = "Direct chat between Мусяка Колбасяка and razumovsky r", - LastMessageAuthor = "razumovsky r", - LastMessageText = "Hello world!", - LastMessageTime = new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6119), - MembersCount = 2, - Title = "Мусяка Колбасяка / razumovsky r", - UpdatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6110) - }, - new - { - Id = new Guid("b119914a-6d95-4047-bf8a-db27deeb7dc9"), - CommunityType = 1, - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6129), - Description = "Direct chat between Amelit and razumovsky r", - LastMessageAuthor = "razumovsky r", - LastMessageText = "Hello world!", - LastMessageTime = new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6149), - MembersCount = 2, - Title = "Amelit / razumovsky r", - UpdatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6139) - }, - new - { - Id = new Guid("9f205dde-0ddc-401f-8fe9-6c794b661f5d"), - CommunityType = 1, - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6163), - Description = "Direct chat between Khachatur Khachatryan and Мусяка Колбасяка", - LastMessageAuthor = "Khachatur Khachatryan", - LastMessageText = "Hello world!", - LastMessageTime = new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6183), - MembersCount = 2, - Title = "Khachatur Khachatryan / Мусяка Колбасяка", - UpdatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6173) - }, - new - { - Id = new Guid("3fce8b2c-252d-4514-a1bb-fbdf73c47b78"), - CommunityType = 1, - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6193), - Description = "Direct chat between Petro Kolosov and Szymon Murawski", - LastMessageAuthor = "Petro Kolosov", - LastMessageText = "Hello world!", - LastMessageTime = new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6212), - MembersCount = 2, - Title = "Petro Kolosov / Szymon Murawski", - UpdatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6203) - }); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.DiffieHellmanKeyExchangeEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("CreatedAt") - .HasColumnType("datetime2"); - - b.Property("IsConfirmed") - .HasColumnType("bit"); - - b.Property("KeyExchangeType") - .HasColumnType("int"); - - b.Property("ReceiverId") - .HasColumnType("uniqueidentifier"); - - b.Property("ReceiverPublicKey") - .HasColumnType("varbinary(max)"); - - b.Property("SenderId") - .HasColumnType("uniqueidentifier"); - - b.Property("SenderPublicKey") - .IsRequired() - .HasColumnType("varbinary(max)"); - - b.Property("UpdatedAt") - .HasColumnType("datetime2"); - - b.HasKey("Id"); - - b.ToTable("DiffieHellmanKeyExchangeEntity", "mango"); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.DiffieHellmanParameterEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("CreatedAt") - .HasColumnType("datetime2"); - - b.Property("CreatedBy") - .HasColumnType("uniqueidentifier"); - - b.Property("OpenSslDhParameter") - .IsRequired() - .HasColumnType("varbinary(max)"); - - b.HasKey("Id"); - - b.ToTable("DiffieHellmanParameterEntity", "mango"); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.DocumentEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("FileName") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("UploadedAt") - .HasColumnType("datetime2"); - - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("DocumentEntity", "mango"); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.MessageEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("Attachment") - .HasColumnType("nvarchar(max)"); - - b.Property("ChatId") - .HasColumnType("uniqueidentifier"); - - b.Property("Content") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("CreatedAt") - .HasColumnType("datetime2"); - - b.Property("InReplayToAuthor") - .HasColumnType("nvarchar(max)"); - - b.Property("InReplayToText") - .HasColumnType("nvarchar(max)"); - - b.Property("UpdatedAt") - .HasColumnType("datetime2"); - - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("ChatId"); - - b.HasIndex("UserId"); - - b.ToTable("MessageEntity", "mango"); - - b.HasData( - new - { - Id = new Guid("23d80548-e6d3-4568-8a6a-39ce91703ffd"), - ChatId = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - Content = "Hello guys, how your diploma project goes?", - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6362), - UserId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") - }, - new - { - Id = new Guid("1316dc52-609b-4b4c-8f5e-806a63ae23cc"), - ChatId = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - Content = "Well, I'm doing UI/UX part of the project", - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6382), - UserId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") - }, - new - { - Id = new Guid("e94318bf-d787-45f2-b3bf-fad650fee75c"), - ChatId = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - Content = "Hi teacher, I perform QA of the current version", - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6396), - UserId = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") - }, - new - { - Id = new Guid("bd5e204b-99e1-408a-b582-706666918ad4"), - ChatId = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - Content = "Greetings. I currently workout the back-end part", - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6411), - UserId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") - }, - new - { - Id = new Guid("450cdb09-60c0-44c6-ade1-f01a2b41facf"), - ChatId = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - Content = "I work with backend too...", - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6563), - UserId = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") - }, - new - { - Id = new Guid("5d656493-9013-47d6-825e-ccaf68c40903"), - ChatId = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - Content = "Great! Good luck to all of you", - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6577), - UserId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") - }, - new - { - Id = new Guid("665bf20f-1858-4348-b978-cbd46dc7aba0"), - ChatId = new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6592), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") - }, - new - { - Id = new Guid("440e86f1-428c-4e17-93e0-848b08ff6a5f"), - ChatId = new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), - Content = "F# The Best", - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6607), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("a2bd7bc3-50ff-4068-b38b-36265e7e1243"), - ChatId = new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), - Content = "C# The Best", - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6621), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") - }, - new - { - Id = new Guid("7be95880-3a66-4f4f-9a0d-eeff91445401"), - ChatId = new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), - Content = "TypeScript The Best", - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6631), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") - }, - new - { - Id = new Guid("083ae74e-cc48-418f-bae2-68bfa40ef954"), - ChatId = new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), - Content = "Слава Партии!!", - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6646), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") - }, - new - { - Id = new Guid("6105b6f9-e477-41aa-88b8-039bdeaa583a"), - ChatId = new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), - Content = "Слава Партии!!", - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6661), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("3f039761-888a-4260-8799-ca1934d57a59"), - ChatId = new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), - Content = "Слава Партии!!", - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6680), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") - }, - new - { - Id = new Guid("5ece7665-cf32-466f-9c85-9bfad2425f99"), - ChatId = new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), - Content = "Слава Партии!!", - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6700), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") - }, - new - { - Id = new Guid("65711f3c-23f0-4248-95a3-39e049de3f9d"), - ChatId = new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6714), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") - }, - new - { - Id = new Guid("da8e21d5-16fb-4dfd-b3f9-dbb7db4dba13"), - ChatId = new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6729), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("8b4e0084-067d-4ffe-a824-2e9bf55009d9"), - ChatId = new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6739), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") - }, - new - { - Id = new Guid("dc01f074-a9d2-4ea2-8a8b-64f6811f51df"), - ChatId = new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6753), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") - }, - new - { - Id = new Guid("0f78dc38-1130-4aa3-8e64-9ae1cff06e5c"), - ChatId = new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6768), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") - }, - new - { - Id = new Guid("b752abe4-3f2c-4bc8-8c68-666369b45a8c"), - ChatId = new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6778), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("c7c9066d-86b2-4853-a8da-fa65ed576c1a"), - ChatId = new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6797), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") - }, - new - { - Id = new Guid("8c9b90a6-9164-4a5c-90b3-c91360cf6a88"), - ChatId = new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6812), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") - }, - new - { - Id = new Guid("814c8420-b4e2-4427-93b8-75ba2a94b8d3"), - ChatId = new Guid("f5b7824f-e52b-4246-9984-06fc8e964f0c"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6827), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") - }, - new - { - Id = new Guid("e6a14cf9-ce64-4df2-bd31-9d92283d5727"), - ChatId = new Guid("f5b7824f-e52b-4246-9984-06fc8e964f0c"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6837), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("1e2aa65a-ea50-45e6-b635-bf624420f33b"), - ChatId = new Guid("f8729a12-5746-443f-ad31-378d846fce30"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6851), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") - }, - new - { - Id = new Guid("14e38cec-9517-4c67-8588-f313e2f1f096"), - ChatId = new Guid("f8729a12-5746-443f-ad31-378d846fce30"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6866), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("c2a37a7e-ff5c-4699-a343-2ce2e46be5b7"), - ChatId = new Guid("b119914a-6d95-4047-bf8a-db27deeb7dc9"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6876), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") - }, - new - { - Id = new Guid("87e2acd4-f36b-4fb9-93e9-05fdcb2c88b5"), - ChatId = new Guid("b119914a-6d95-4047-bf8a-db27deeb7dc9"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6910), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("3cc9fbe4-d28c-454c-9525-faa3303373c0"), - ChatId = new Guid("9f205dde-0ddc-401f-8fe9-6c794b661f5d"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6929), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") - }, - new - { - Id = new Guid("6523ded5-2f62-4c99-81f0-dabed282a240"), - ChatId = new Guid("9f205dde-0ddc-401f-8fe9-6c794b661f5d"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6944), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") - }, - new - { - Id = new Guid("15f3535c-4b5e-4e61-9624-d06e48ae52a3"), - ChatId = new Guid("3fce8b2c-252d-4514-a1bb-fbdf73c47b78"), - Content = "Hi teacher", - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6959), - UserId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") - }); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.RoleEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("nvarchar(max)"); - - b.Property("Name") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("NormalizedName") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName") - .IsUnique() - .HasDatabaseName("RoleNameIndex") - .HasFilter("[NormalizedName] IS NOT NULL"); - - b.ToTable("AspNetRoles", (string)null); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.SessionEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("CreatedAt") - .HasColumnType("datetime2"); - - b.Property("ExpiresAt") - .HasColumnType("datetime2"); - - b.Property("RefreshToken") - .HasColumnType("uniqueidentifier"); - - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("SessionEntity", "mango"); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.UserChatEntity", b => - { - b.Property("ChatId") - .HasColumnType("uniqueidentifier"); - - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.Property("IsArchived") - .HasColumnType("bit"); - - b.Property("RoleId") - .HasColumnType("int"); - - b.HasKey("ChatId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("UserChatEntity", "mango"); - - b.HasData( - new - { - ChatId = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - UserId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), - IsArchived = false, - RoleId = 2 - }, - new - { - ChatId = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - UserId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), - IsArchived = false, - RoleId = 4 - }, - new - { - ChatId = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - UserId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - UserId = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - UserId = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - IsArchived = false, - RoleId = 3 - }, - new - { - ChatId = new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), - IsArchived = false, - RoleId = 2 - }, - new - { - ChatId = new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), - IsArchived = false, - RoleId = 4 - }, - new - { - ChatId = new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - IsArchived = false, - RoleId = 4 - }, - new - { - ChatId = new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), - IsArchived = false, - RoleId = 2 - }, - new - { - ChatId = new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), - IsArchived = false, - RoleId = 4 - }, - new - { - ChatId = new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - IsArchived = false, - RoleId = 3 - }, - new - { - ChatId = new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - IsArchived = false, - RoleId = 4 - }, - new - { - ChatId = new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("f5b7824f-e52b-4246-9984-06fc8e964f0c"), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("f5b7824f-e52b-4246-9984-06fc8e964f0c"), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("f8729a12-5746-443f-ad31-378d846fce30"), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("f8729a12-5746-443f-ad31-378d846fce30"), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("b119914a-6d95-4047-bf8a-db27deeb7dc9"), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("b119914a-6d95-4047-bf8a-db27deeb7dc9"), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("9f205dde-0ddc-401f-8fe9-6c794b661f5d"), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("9f205dde-0ddc-401f-8fe9-6c794b661f5d"), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("3fce8b2c-252d-4514-a1bb-fbdf73c47b78"), - UserId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("3fce8b2c-252d-4514-a1bb-fbdf73c47b78"), - UserId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), - IsArchived = false, - RoleId = 1 - }); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.UserContactEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("ContactId") - .HasColumnType("uniqueidentifier"); - - b.Property("CreatedAt") - .HasColumnType("datetime2"); - - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("UserContactEntity", "mango"); - - b.HasData( - new - { - Id = new Guid("415ee633-e418-41d9-96ca-2d6e0aabd128"), - ContactId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5705), - UserId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") - }, - new - { - Id = new Guid("5169ff97-b2d0-4c1f-9dd9-d65edb8a5dfb"), - ContactId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5720), - UserId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") - }, - new - { - Id = new Guid("6d523966-629f-475e-9849-607aea0f1205"), - ContactId = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5734), - UserId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") - }, - new - { - Id = new Guid("95bafb20-1569-414b-aaa4-7865f143a497"), - ContactId = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5744), - UserId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") - }, - new - { - Id = new Guid("7177b007-6621-4c41-9a11-94016d42a49d"), - ContactId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5759), - UserId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") - }, - new - { - Id = new Guid("7c7f7a86-3e0a-4683-81be-a5fc70389ad5"), - ContactId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5783), - UserId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") - }, - new - { - Id = new Guid("294217ea-2170-4417-92b6-efbf9dd7f00a"), - ContactId = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5793), - UserId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") - }, - new - { - Id = new Guid("58f4dcab-6889-418f-8687-86d285b75149"), - ContactId = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5808), - UserId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") - }, - new - { - Id = new Guid("729a8579-2b84-45b3-8dac-bcf1a757aa20"), - ContactId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5817), - UserId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") - }, - new - { - Id = new Guid("db1e25d0-98e2-44a4-87e4-11b00e387b41"), - ContactId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5832), - UserId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") - }, - new - { - Id = new Guid("1cfa7869-1ae5-476f-90da-64f6a10a0124"), - ContactId = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5842), - UserId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") - }, - new - { - Id = new Guid("81dc8b8f-3a02-4e97-a5d4-68765ac4cac4"), - ContactId = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5857), - UserId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") - }, - new - { - Id = new Guid("dccc06fd-eb6c-4d92-8e2b-21c8b91db59a"), - ContactId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5871), - UserId = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") - }, - new - { - Id = new Guid("5b62e0b8-c8e8-410d-bee1-f3602626a87b"), - ContactId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5886), - UserId = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") - }, - new - { - Id = new Guid("006be3e9-7bef-45a0-b532-4fafb4db2dc3"), - ContactId = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5901), - UserId = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") - }, - new - { - Id = new Guid("4fcda455-e931-4031-a764-759a9378f2a1"), - ContactId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5910), - UserId = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") - }, - new - { - Id = new Guid("c80b971f-3231-4448-9faa-88a375cb49d9"), - ContactId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5925), - UserId = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") - }, - new - { - Id = new Guid("f68d3679-246f-45a5-ad16-5927d3263de5"), - ContactId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5935), - UserId = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") - }, - new - { - Id = new Guid("4477dbc9-fee5-4710-b0b1-469d0f6af73a"), - ContactId = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5949), - UserId = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") - }, - new - { - Id = new Guid("56310a3a-c427-4fe6-82ea-c2f4051654b2"), - ContactId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5959), - UserId = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") - }, - new - { - Id = new Guid("1dd9d62f-92c4-4ea9-ad63-1803856d3294"), - ContactId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5974), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") - }, - new - { - Id = new Guid("5a74c334-9d71-4f36-b311-cf1cee4990bb"), - ContactId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5989), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("e7359601-6e5e-42bb-91cd-7c5e93c3f73e"), - ContactId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(6003), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("e4e77b57-54e4-4344-9a95-b9d0d9f48547"), - ContactId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(6018), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("19899c12-fbfa-48d0-82ec-18d45e1eb6d9"), - ContactId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(6028), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("45730db3-105b-4166-b257-70d3e4099bca"), - ContactId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(6042), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("5c6773aa-b60a-4c4a-9435-6f9f51570c86"), - ContactId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(6052), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") - }, - new - { - Id = new Guid("86ed0f1d-71af-4e45-a88b-bc4b64f46ed8"), - ContactId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(6067), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") - }); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.UserEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("AccessFailedCount") - .HasColumnType("int"); - - b.Property("Bio") - .HasColumnType("nvarchar(max)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("nvarchar(max)"); - - b.Property("DisplayName") - .HasColumnType("nvarchar(max)"); - - b.Property("DisplayNameColour") - .HasColumnType("int"); - - b.Property("Email") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("EmailConfirmed") - .HasColumnType("bit"); - - b.Property("Image") - .HasColumnType("nvarchar(max)"); - - b.Property("LockoutEnabled") - .HasColumnType("bit"); - - b.Property("LockoutEnd") - .HasColumnType("datetimeoffset"); - - b.Property("NormalizedEmail") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("NormalizedUserName") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("PasswordHash") - .HasColumnType("nvarchar(max)"); - - b.Property("PhoneNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("PhoneNumberConfirmed") - .HasColumnType("bit"); - - b.Property("SecurityStamp") - .HasColumnType("nvarchar(max)"); - - b.Property("TwoFactorEnabled") - .HasColumnType("bit"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("UserNameChanged") - .HasColumnType("bit"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedEmail") - .HasDatabaseName("EmailIndex"); - - b.HasIndex("NormalizedUserName") - .IsUnique() - .HasDatabaseName("UserNameIndex") - .HasFilter("[NormalizedUserName] IS NOT NULL"); - - b.ToTable("UserEntity", "mango"); - - b.HasData( - new - { - Id = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), - AccessFailedCount = 0, - Bio = "13 y. o. | C# pozer, Hearts Of Iron IV noob", - ConcurrencyStamp = "dd3603cb-b08a-44be-ae0f-251cc553fca2", - DisplayName = "Khachatur Khachatryan", - DisplayNameColour = 6, - Email = "xachulxx@gmail.com", - EmailConfirmed = true, - Image = "khachatur_picture.jpg", - LockoutEnabled = false, - NormalizedEmail = "XACHULXX@GMAIL.COM", - PasswordHash = "AQAAAAEAACcQAAAAEIxP+Hx8FJj9Ci55XVp5OELB0Ye3D+UNbf/Rbw9F1w3NhhoPld4sxta28nx+sQzmfg==", - PhoneNumber = "374775554310", - PhoneNumberConfirmed = true, - TwoFactorEnabled = false, - UserName = "KHACHATUR228", - UserNameChanged = false - }, - new - { - Id = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - AccessFailedCount = 0, - Bio = "11011 y.o Dotnet Developer from $\"{cityName}\"", - ConcurrencyStamp = "15c603fb-8ddc-4d4b-8df5-6d03374a8b7e", - DisplayName = "razumovsky r", - DisplayNameColour = 9, - Email = "kolosovp95@gmail.com", - EmailConfirmed = true, - Image = "razumovsky_picture.jpg", - LockoutEnabled = false, - NormalizedEmail = "KOLOSOVP94@GMAIL.COM", - PasswordHash = "AQAAAAEAACcQAAAAEEj7YLvqFNXh0KhVKDGiaQ/xi8emzw7oSt6vuIFIUJKr68pawjkHGimgh+T6KuzehA==", - PhoneNumber = "48743615532", - PhoneNumberConfirmed = true, - TwoFactorEnabled = false, - UserName = "razumovsky_r", - UserNameChanged = false - }, - new - { - Id = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), - AccessFailedCount = 0, - Bio = "Колбасятор.", - ConcurrencyStamp = "80edce90-5ecd-4868-8e1a-1ac12b05ad6a", - DisplayName = "Мусяка Колбасяка", - DisplayNameColour = 5, - Email = "kolbasator@gmail.com", - EmailConfirmed = true, - Image = "musyaka_picture.jpg", - LockoutEnabled = false, - NormalizedEmail = "KOLBASATOR@GMAIL.COM", - PasswordHash = "AQAAAAEAACcQAAAAEB7bhxKsttucxtefw6TO+UTyiDuElL1NNgvVoo0nCnpgZKKj3kS1NRevexdRVC7/4A==", - PhoneNumber = "77017506265", - PhoneNumberConfirmed = true, - TwoFactorEnabled = false, - UserName = "kolbasator", - UserNameChanged = false - }, - new - { - Id = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), - AccessFailedCount = 0, - Bio = "Дипломат", - ConcurrencyStamp = "85358c43-0438-4399-b435-7423bf61d8a5", - DisplayName = "Amelit", - DisplayNameColour = 4, - Email = "amelit@gmail.com", - EmailConfirmed = true, - Image = "amelit_picture.jpg", - LockoutEnabled = false, - NormalizedEmail = "AMELIT@GMAIL.COM", - PasswordHash = "AQAAAAEAACcQAAAAEP3PL5bB6qMqRvoBzMUTQrlv8kS1u6kpZ7f2DsFj+bvPoyR8SWqHlr3tvsc93L8SYg==", - PhoneNumber = "12025550152", - PhoneNumberConfirmed = true, - TwoFactorEnabled = false, - UserName = "TheMoonlightSonata", - UserNameChanged = false - }, - new - { - Id = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), - AccessFailedCount = 0, - Bio = "Third year student of WSB at Poznan", - ConcurrencyStamp = "991cebf0-505d-4cfb-9daf-e5c15dacd681", - DisplayName = "Petro Kolosov", - DisplayNameColour = 1, - Email = "petro.kolosov@wp.pl", - EmailConfirmed = true, - Image = "razumovsky_picture.jpg", - LockoutEnabled = false, - NormalizedEmail = "PETRO.KOLOSOV@WP.PL", - PasswordHash = "AQAAAAEAACcQAAAAEA8BzPR7YQ/+GbLhEl1derKOUY3j+h13IZg1zcnO49QFh601wNgRIBT7WqWU/+YAGA==", - PhoneNumber = "48743615532", - PhoneNumberConfirmed = true, - TwoFactorEnabled = false, - UserName = "petro.kolosov", - UserNameChanged = false - }, - new - { - Id = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), - AccessFailedCount = 0, - Bio = "Teacher of Computer Science at WSB Poznan", - ConcurrencyStamp = "a3fe252e-9460-4deb-9c49-fa45118bf736", - DisplayName = "Szymon Murawski", - DisplayNameColour = 7, - Email = "szymon.murawski@wp.pl", - EmailConfirmed = true, - Image = "szymon_picture.png", - LockoutEnabled = false, - NormalizedEmail = "SZYMON.MURAWSKI@WP.PL", - PasswordHash = "AQAAAAEAACcQAAAAEFsOc5W82yorDT0HiIzkmnZAGle0ZoByCvGrl9Niy2+XJXR4NZvsF9imWeay8yEpPA==", - PhoneNumber = "48743615532", - PhoneNumberConfirmed = true, - TwoFactorEnabled = false, - UserName = "szymon.murawski", - UserNameChanged = false - }, - new - { - Id = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), - AccessFailedCount = 0, - Bio = "Third year student of WSB at Poznan", - ConcurrencyStamp = "b8fdf94e-4ba3-43c3-9ed0-06b538f49d2d", - DisplayName = "Illia Zubachov", - DisplayNameColour = 10, - Email = "illia.zubachov@wp.pl", - EmailConfirmed = true, - Image = "illia_picture.png", - LockoutEnabled = false, - NormalizedEmail = "ILLIA.ZUBACHOW@WP.PL", - PasswordHash = "AQAAAAEAACcQAAAAEL3BrZqQnomRxcf0Hpvswo/CptRKGk+TF4389adWcK3Wq9UippagXTcOJ1b5hBceUw==", - PhoneNumber = "48352643123", - PhoneNumberConfirmed = true, - TwoFactorEnabled = false, - UserName = "illia.zubachov", - UserNameChanged = false - }, - new - { - Id = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), - AccessFailedCount = 0, - Bio = "Third year student of WSB at Poznan", - ConcurrencyStamp = "64ba066d-6eb1-4066-bc94-bf9eae04087e", - DisplayName = "Arslanbek Temirbekov", - DisplayNameColour = 2, - Email = "arslanbek.temirbekov@wp.pl", - EmailConfirmed = true, - Image = "arslan_picture.png", - LockoutEnabled = false, - NormalizedEmail = "ARSLANBEK.TEMIRBEKOV@WP.PL", - PasswordHash = "AQAAAAEAACcQAAAAEDZVXdYXhZ9CNpEcCZxlVWIlOxqnBOQQm4JBT2AhbuqqVKNGmBoqErPBrQIOrZmteQ==", - PhoneNumber = "48278187781", - PhoneNumberConfirmed = true, - TwoFactorEnabled = false, - UserName = "arslanbek.temirbekov", - UserNameChanged = false - }, - new - { - Id = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), - AccessFailedCount = 0, - Bio = "Third year student of WSB at Poznan", - ConcurrencyStamp = "e38f3eb0-b3e8-4dff-b07d-d94401b8f654", - DisplayName = "Serhii Holishevskii", - DisplayNameColour = 8, - Email = "serhii.holishevskii@wp.pl", - EmailConfirmed = true, - Image = "serhii_picture.png", - LockoutEnabled = false, - NormalizedEmail = "SERHII.HOLISHEVSKII@WP.PL", - PasswordHash = "AQAAAAEAACcQAAAAENSnH6yxJYOeyvLZiFeh/ULTo1vTxVOM1mp/L/tV1s4aP/7rSJBV5FPtioZJQCsx2w==", - PhoneNumber = "48175481653", - PhoneNumberConfirmed = true, - TwoFactorEnabled = false, - UserName = "serhii.holishevskii", - UserNameChanged = false - }); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.UserInformationEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("Address") - .HasColumnType("nvarchar(max)"); - - b.Property("BirthDay") - .HasColumnType("datetime2"); - - b.Property("CreatedAt") - .HasColumnType("datetime2"); - - b.Property("Facebook") - .HasColumnType("nvarchar(max)"); - - b.Property("Instagram") - .HasColumnType("nvarchar(max)"); - - b.Property("LinkedIn") - .HasColumnType("nvarchar(max)"); - - b.Property("ProfilePicture") - .HasColumnType("nvarchar(max)"); - - b.Property("Twitter") - .HasColumnType("nvarchar(max)"); - - b.Property("UpdatedAt") - .HasColumnType("datetime2"); - - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.Property("Website") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("UserId") - .IsUnique(); - - b.ToTable("UserInformationEntity", "mango"); - - b.HasData( - new - { - Id = new Guid("e4d11b30-fe6d-44bf-9d3b-f5a717b77319"), - Address = "Poznan, Poland", - BirthDay = new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6035), - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6064), - Facebook = "petro.kolosov", - Instagram = "petro.kolosov", - LinkedIn = "petro.kolosov", - Twitter = "petro.kolosov", - UpdatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6050), - UserId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), - Website = "petro.kolosov.com" - }, - new - { - Id = new Guid("587d09c6-7cd1-41a0-bee9-fec14f55fb7f"), - Address = "Poznan, Poland", - BirthDay = new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6084), - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6103), - Facebook = "illia.zubachov", - Instagram = "illia.zubachov", - LinkedIn = "illia.zubachov", - Twitter = "illia.zubachov", - UpdatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6094), - UserId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), - Website = "illia.zubachov.com" - }, - new - { - Id = new Guid("07356a86-e915-42fb-9013-eb7e74334601"), - Address = "Poznan, Poland", - BirthDay = new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6123), - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6142), - Facebook = "serhii.holishevskii", - Instagram = "serhii.holishevskii", - LinkedIn = "serhii.holishevskii", - Twitter = "serhii.holishevskii", - UpdatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6133), - UserId = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), - Website = "serhii.holishevskii.com" - }, - new - { - Id = new Guid("f1672ff5-fab9-422c-856d-da0f7ae77bea"), - Address = "Poznan, Poland", - BirthDay = new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6162), - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6182), - Facebook = "arslan.temirbekov", - Instagram = "arslan.temirbekov", - LinkedIn = "arslan.temirbekov", - Twitter = "arslan.temirbekov", - UpdatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6172), - UserId = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), - Website = "arslan.temirbekov.com" - }, - new - { - Id = new Guid("be0733f1-3a62-4c0d-97b8-fd8f510d40af"), - Address = "Poznan, Poland", - BirthDay = new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6196), - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6221), - Facebook = "szymon.murawski", - Instagram = "szymon.murawski", - LinkedIn = "szymon.murawski", - Twitter = "szymon.murawski", - UpdatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6211), - UserId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), - Website = "szymon.murawski.com" - }, - new - { - Id = new Guid("c7aed1e8-c385-43c9-9241-c5668ae0385f"), - Address = "Moscow, Russia", - BirthDay = new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6235), - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6260), - Instagram = "khachapur.mudrenych", - LinkedIn = "khachapur.mudrenych", - UpdatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6250), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), - Website = "khachapur.com" - }, - new - { - Id = new Guid("9eb02f2c-0634-420d-87ce-dfe3113172b7"), - Address = "Odessa, Ukraine", - BirthDay = new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6289), - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6309), - Facebook = "razumovsky_r", - Instagram = "razumovsky_r", - LinkedIn = "razumovsky_r", - Twitter = "razumovsky_r", - UpdatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6299), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - Website = "razumovsky.com" - }, - new - { - Id = new Guid("21f01e34-ff46-4b17-929a-1b59b2ef910f"), - Address = "Saint-Petersburg, Russia", - BirthDay = new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6328), - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6348), - Facebook = "kolbasator", - ProfilePicture = "profile.png", - UpdatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6338), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), - Website = "kolbasator.com" - }, - new - { - Id = new Guid("ddb7008d-6c11-4503-91ef-3cdada4d83e0"), - Address = "Moscow, Russia", - BirthDay = new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6362), - CreatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6387), - Facebook = "TheMoonlightSonata", - Instagram = "TheMoonlightSonata", - Twitter = "TheMoonlightSonata", - UpdatedAt = new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6377), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") - }); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1); - - b.Property("ClaimType") - .HasColumnType("nvarchar(max)"); - - b.Property("ClaimValue") - .HasColumnType("nvarchar(max)"); - - b.Property("RoleId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetRoleClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1); - - b.Property("ClaimType") - .HasColumnType("nvarchar(max)"); - - b.Property("ClaimValue") - .HasColumnType("nvarchar(max)"); - - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.Property("LoginProvider") - .HasColumnType("nvarchar(450)"); - - b.Property("ProviderKey") - .HasColumnType("nvarchar(450)"); - - b.Property("ProviderDisplayName") - .HasColumnType("nvarchar(max)"); - - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("LoginProvider", "ProviderKey"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserLogins", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.Property("RoleId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetUserRoles", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.Property("LoginProvider") - .HasColumnType("nvarchar(450)"); - - b.Property("Name") - .HasColumnType("nvarchar(450)"); - - b.Property("Value") - .HasColumnType("nvarchar(max)"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AspNetUserTokens", (string)null); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.DocumentEntity", b => - { - b.HasOne("MangoAPI.Domain.Entities.UserEntity", "User") - .WithMany("Documents") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("User"); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.MessageEntity", b => - { - b.HasOne("MangoAPI.Domain.Entities.ChatEntity", "Chat") - .WithMany("Messages") - .HasForeignKey("ChatId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("MangoAPI.Domain.Entities.UserEntity", "User") - .WithMany("Messages") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Chat"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.SessionEntity", b => - { - b.HasOne("MangoAPI.Domain.Entities.UserEntity", "UserEntity") - .WithMany("Sessions") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("UserEntity"); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.UserChatEntity", b => - { - b.HasOne("MangoAPI.Domain.Entities.ChatEntity", "Chat") - .WithMany("ChatUsers") - .HasForeignKey("ChatId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("MangoAPI.Domain.Entities.UserEntity", "User") - .WithMany("UserChats") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Chat"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.UserContactEntity", b => - { - b.HasOne("MangoAPI.Domain.Entities.UserEntity", "User") - .WithMany("Contacts") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("User"); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.UserInformationEntity", b => - { - b.HasOne("MangoAPI.Domain.Entities.UserEntity", "User") - .WithOne("UserInformation") - .HasForeignKey("MangoAPI.Domain.Entities.UserInformationEntity", "UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("User"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.HasOne("MangoAPI.Domain.Entities.RoleEntity", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.HasOne("MangoAPI.Domain.Entities.UserEntity", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.HasOne("MangoAPI.Domain.Entities.UserEntity", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.HasOne("MangoAPI.Domain.Entities.RoleEntity", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("MangoAPI.Domain.Entities.UserEntity", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.HasOne("MangoAPI.Domain.Entities.UserEntity", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.ChatEntity", b => - { - b.Navigation("ChatUsers"); - - b.Navigation("Messages"); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.UserEntity", b => - { - b.Navigation("Contacts"); - - b.Navigation("Documents"); - - b.Navigation("Messages"); - - b.Navigation("Sessions"); - - b.Navigation("UserChats"); - - b.Navigation("UserInformation"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/MangoAPI.Infrastructure/Migrations/20230309161806_UserNameChanged.cs b/MangoAPI.Infrastructure/Migrations/20230309161806_UserNameChanged.cs deleted file mode 100644 index 7814e7b5f..000000000 --- a/MangoAPI.Infrastructure/Migrations/20230309161806_UserNameChanged.cs +++ /dev/null @@ -1,1386 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace MangoAPI.Infrastructure.Migrations -{ - public partial class UserNameChanged : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("22724c39-2448-4bb6-8fc3-fea5ceb5c9dc")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("2d91d301-a491-4bc6-9061-002218be17b0")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("32346317-7c66-44e5-8cb9-dd2d4a50b457")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("38bf11b1-3b27-42fb-8fde-5c39ae614a5a")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("49f75eac-2924-4f05-817a-6fc9ef9a268f")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("55fca598-c242-4ed1-b29b-af129759d5e5")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("7256cf71-efa0-4672-9abf-5bc513b1086c")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("7df33dcd-3f64-4d03-8d77-9c895c354b4b")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("87487cdb-4291-4811-80ec-1e4f9db2d7b0")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("8eba3a15-56f5-44ec-aaca-46efbe67eca2")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("9202347f-95c8-4dce-8c3c-32be6b49df91")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("931a46b2-5af2-4e14-8501-5c8727f08959")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("a1a9820f-0a02-4261-8b77-cf13b1c218fb")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("ae7dbb11-ba18-4a8b-a15c-69dd243a2c3e")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("b902caa3-23ba-49e1-babb-e402895e2807")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("b9393310-759d-4f92-b888-4d048caf063b")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("ba76b719-571a-410e-8424-353d47adfd83")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("bdf82526-ddf2-4d26-9dcd-a70ec9d001f6")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("befa4294-f615-4d55-a90f-e73332d77591")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("c18fa6c4-cf86-4765-98ad-9e6263214bca")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("c5b5d07a-1b97-4b8e-aef2-348d8c9d27da")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("c98a5a67-a1c4-4ab6-8d41-2c2f1a77b520")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("cdba47b6-6074-4ec6-aa6b-990e793123d2")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("d0de9911-8b7f-4a20-9c8f-89792af28b7a")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("d90c16f3-f790-4c5f-a90b-b3f0fc7f0212")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("df054ddf-f311-405d-8b26-bad10c6a936f")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("e56194fd-63af-4cd7-ae80-e3840db75dc2")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("e95de444-ccf9-4b35-80d0-356c9301216d")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("f45c6ad4-669a-4126-bac8-e4faeb838694")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("f550a534-447b-4216-aafc-55c89c72ff67")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("fb933dde-e91b-4236-88c5-0d1999846f43")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("03da4110-35e6-4414-a37c-0d2ea033a6d1")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("0ecde415-8c42-4c57-bdba-a876ba316a1a")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("0f2d8193-9395-409c-abf2-92735389ea06")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("10af6975-fc31-4879-9c75-643b8227d164")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("18fc64e6-bf06-45cd-8d69-54c814f486da")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("1ff356b2-8d9d-41b5-ac7b-f729de72fd89")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("30a9587c-71f2-48b3-971d-971cffd87c75")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("3a887366-3479-4521-8ca3-ae09f4750635")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("3b55d09f-9585-458d-8cd4-72d5ea8707b5")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("3bd568ee-679e-4469-ad93-b70e70cb45e7")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("4f3a1392-8bc6-42c4-8ab2-fbbadd2552a5")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("4f54e050-37ee-4ed5-848d-d7aaf3025337")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("5a597475-4820-4601-a038-d8c1ff4b0978")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("5f95bb0d-3706-46ce-9ba1-d1a41ffcead0")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("63c7314b-e018-420c-be65-7b84f34524f3")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("7c35261a-6bbb-4819-bf3a-8884b64a12e5")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("8893cdf7-cf4f-489e-a992-687a7a535a4b")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("8abb9d01-e0d0-4758-8cb4-54eb1a369351")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("a5807a03-bfd1-45a5-ab11-85858c1fd574")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("bbb07d53-daf6-4d70-a140-cd6b8b84e60a")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("d4f10299-2fed-4adc-af4c-a8af1cfd7516")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("e2ee16d3-13df-435f-971a-36acfd206500")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("e6f33b80-a64f-4017-a541-7cce286db160")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("e93e2f85-260b-4776-8d4f-f60522fb2659")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("ed2dc47c-ec7a-45d7-beef-4c1f59cac29d")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("ee9612aa-57b1-4c13-b95e-e149820c7590")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("f4be92a5-94d6-4d0a-864c-771af95e4b3f")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("f6729e0c-b34a-4f8b-9a59-ce0ddfaf9182")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserInformationEntity", - keyColumn: "Id", - keyValue: new Guid("36e23b21-54c6-46a8-85bc-0dc91291f8fb")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserInformationEntity", - keyColumn: "Id", - keyValue: new Guid("45ad1329-dba1-4885-833a-472d456e9f44")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserInformationEntity", - keyColumn: "Id", - keyValue: new Guid("4786d148-23aa-43d1-8b3d-406a6ce66bee")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserInformationEntity", - keyColumn: "Id", - keyValue: new Guid("6ce81626-4307-4393-8175-572b910190e9")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserInformationEntity", - keyColumn: "Id", - keyValue: new Guid("6fc2a397-4aea-47f0-83ed-448757d0a86b")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserInformationEntity", - keyColumn: "Id", - keyValue: new Guid("7c285f0c-67ed-4cfd-baad-14035f5f384e")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserInformationEntity", - keyColumn: "Id", - keyValue: new Guid("931ad2ec-6747-4f9f-a4ca-9870c9cc5ad3")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserInformationEntity", - keyColumn: "Id", - keyValue: new Guid("b48c1502-c326-4dce-85dd-21a4d9aa390c")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserInformationEntity", - keyColumn: "Id", - keyValue: new Guid("f086fd85-2e7c-4aa2-9c7b-b65f304122d2")); - - migrationBuilder.DropColumn( - name: "EmailCode", - schema: "mango", - table: "UserEntity"); - - migrationBuilder.AddColumn( - name: "UserNameChanged", - schema: "mango", - table: "UserEntity", - type: "bit", - nullable: false, - defaultValue: false); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(5934), new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(5958), new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(5943) }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("3fce8b2c-252d-4514-a1bb-fbdf73c47b78"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6193), new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6212), new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6203) }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(5968), new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(5987), new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(5978) }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6031), new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6056), new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6041) }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("9f205dde-0ddc-401f-8fe9-6c794b661f5d"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6163), new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6183), new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6173) }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("b119914a-6d95-4047-bf8a-db27deeb7dc9"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6129), new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6149), new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6139) }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(5895), new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(5924), new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(5909) }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6002), new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6022), new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6012) }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("f5b7824f-e52b-4246-9984-06fc8e964f0c"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6066), new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6085), new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6075) }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("f8729a12-5746-443f-ad31-378d846fce30"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6095), new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6119), new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6110) }); - - migrationBuilder.InsertData( - schema: "mango", - table: "MessageEntity", - columns: new[] { "Id", "Attachment", "ChatId", "Content", "CreatedAt", "InReplayToAuthor", "InReplayToText", "UpdatedAt", "UserId" }, - values: new object[,] - { - { new Guid("083ae74e-cc48-418f-bae2-68bfa40ef954"), null, new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), "Слава Партии!!", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6646), null, null, null, new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") }, - { new Guid("0f78dc38-1130-4aa3-8e64-9ae1cff06e5c"), null, new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), "Hello World", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6768), null, null, null, new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") }, - { new Guid("1316dc52-609b-4b4c-8f5e-806a63ae23cc"), null, new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), "Well, I'm doing UI/UX part of the project", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6382), null, null, null, new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") }, - { new Guid("14e38cec-9517-4c67-8588-f313e2f1f096"), null, new Guid("f8729a12-5746-443f-ad31-378d846fce30"), "Hello World", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6866), null, null, null, new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("15f3535c-4b5e-4e61-9624-d06e48ae52a3"), null, new Guid("3fce8b2c-252d-4514-a1bb-fbdf73c47b78"), "Hi teacher", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6959), null, null, null, new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") }, - { new Guid("1e2aa65a-ea50-45e6-b635-bf624420f33b"), null, new Guid("f8729a12-5746-443f-ad31-378d846fce30"), "Hello World", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6851), null, null, null, new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") }, - { new Guid("23d80548-e6d3-4568-8a6a-39ce91703ffd"), null, new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), "Hello guys, how your diploma project goes?", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6362), null, null, null, new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") }, - { new Guid("3cc9fbe4-d28c-454c-9525-faa3303373c0"), null, new Guid("9f205dde-0ddc-401f-8fe9-6c794b661f5d"), "Hello World", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6929), null, null, null, new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") }, - { new Guid("3f039761-888a-4260-8799-ca1934d57a59"), null, new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), "Слава Партии!!", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6680), null, null, null, new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") }, - { new Guid("440e86f1-428c-4e17-93e0-848b08ff6a5f"), null, new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), "F# The Best", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6607), null, null, null, new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("450cdb09-60c0-44c6-ade1-f01a2b41facf"), null, new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), "I work with backend too...", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6563), null, null, null, new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") }, - { new Guid("5d656493-9013-47d6-825e-ccaf68c40903"), null, new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), "Great! Good luck to all of you", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6577), null, null, null, new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") }, - { new Guid("5ece7665-cf32-466f-9c85-9bfad2425f99"), null, new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), "Слава Партии!!", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6700), null, null, null, new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") }, - { new Guid("6105b6f9-e477-41aa-88b8-039bdeaa583a"), null, new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), "Слава Партии!!", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6661), null, null, null, new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("6523ded5-2f62-4c99-81f0-dabed282a240"), null, new Guid("9f205dde-0ddc-401f-8fe9-6c794b661f5d"), "Hello World", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6944), null, null, null, new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") }, - { new Guid("65711f3c-23f0-4248-95a3-39e049de3f9d"), null, new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), "Hello World", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6714), null, null, null, new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") }, - { new Guid("665bf20f-1858-4348-b978-cbd46dc7aba0"), null, new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), "Hello World", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6592), null, null, null, new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") }, - { new Guid("7be95880-3a66-4f4f-9a0d-eeff91445401"), null, new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), "TypeScript The Best", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6631), null, null, null, new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") }, - { new Guid("814c8420-b4e2-4427-93b8-75ba2a94b8d3"), null, new Guid("f5b7824f-e52b-4246-9984-06fc8e964f0c"), "Hello World", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6827), null, null, null, new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") }, - { new Guid("87e2acd4-f36b-4fb9-93e9-05fdcb2c88b5"), null, new Guid("b119914a-6d95-4047-bf8a-db27deeb7dc9"), "Hello World", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6910), null, null, null, new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("8b4e0084-067d-4ffe-a824-2e9bf55009d9"), null, new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), "Hello World", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6739), null, null, null, new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") }, - { new Guid("8c9b90a6-9164-4a5c-90b3-c91360cf6a88"), null, new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), "Hello World", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6812), null, null, null, new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") }, - { new Guid("a2bd7bc3-50ff-4068-b38b-36265e7e1243"), null, new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), "C# The Best", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6621), null, null, null, new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") }, - { new Guid("b752abe4-3f2c-4bc8-8c68-666369b45a8c"), null, new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), "Hello World", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6778), null, null, null, new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("bd5e204b-99e1-408a-b582-706666918ad4"), null, new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), "Greetings. I currently workout the back-end part", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6411), null, null, null, new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") }, - { new Guid("c2a37a7e-ff5c-4699-a343-2ce2e46be5b7"), null, new Guid("b119914a-6d95-4047-bf8a-db27deeb7dc9"), "Hello World", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6876), null, null, null, new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") }, - { new Guid("c7c9066d-86b2-4853-a8da-fa65ed576c1a"), null, new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), "Hello World", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6797), null, null, null, new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") }, - { new Guid("da8e21d5-16fb-4dfd-b3f9-dbb7db4dba13"), null, new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), "Hello World", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6729), null, null, null, new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("dc01f074-a9d2-4ea2-8a8b-64f6811f51df"), null, new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), "Hello World", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6753), null, null, null, new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") }, - { new Guid("e6a14cf9-ce64-4df2-bd31-9d92283d5727"), null, new Guid("f5b7824f-e52b-4246-9984-06fc8e964f0c"), "Hello World", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6837), null, null, null, new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("e94318bf-d787-45f2-b3bf-fad650fee75c"), null, new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), "Hi teacher, I perform QA of the current version", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6396), null, null, null, new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") } - }); - - migrationBuilder.InsertData( - schema: "mango", - table: "UserContactEntity", - columns: new[] { "Id", "ContactId", "CreatedAt", "UserId" }, - values: new object[] { new Guid("006be3e9-7bef-45a0-b532-4fafb4db2dc3"), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5901), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") }); - - migrationBuilder.InsertData( - schema: "mango", - table: "UserContactEntity", - columns: new[] { "Id", "ContactId", "CreatedAt", "UserId" }, - values: new object[,] - { - { new Guid("19899c12-fbfa-48d0-82ec-18d45e1eb6d9"), new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(6028), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("1cfa7869-1ae5-476f-90da-64f6a10a0124"), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5842), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") }, - { new Guid("1dd9d62f-92c4-4ea9-ad63-1803856d3294"), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5974), new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") }, - { new Guid("294217ea-2170-4417-92b6-efbf9dd7f00a"), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5793), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") }, - { new Guid("415ee633-e418-41d9-96ca-2d6e0aabd128"), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5705), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") }, - { new Guid("4477dbc9-fee5-4710-b0b1-469d0f6af73a"), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5949), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") }, - { new Guid("45730db3-105b-4166-b257-70d3e4099bca"), new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(6042), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("4fcda455-e931-4031-a764-759a9378f2a1"), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5910), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") }, - { new Guid("5169ff97-b2d0-4c1f-9dd9-d65edb8a5dfb"), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5720), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") }, - { new Guid("56310a3a-c427-4fe6-82ea-c2f4051654b2"), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5959), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") }, - { new Guid("58f4dcab-6889-418f-8687-86d285b75149"), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5808), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") }, - { new Guid("5a74c334-9d71-4f36-b311-cf1cee4990bb"), new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5989), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("5b62e0b8-c8e8-410d-bee1-f3602626a87b"), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5886), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") }, - { new Guid("5c6773aa-b60a-4c4a-9435-6f9f51570c86"), new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(6052), new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") }, - { new Guid("6d523966-629f-475e-9849-607aea0f1205"), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5734), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") }, - { new Guid("7177b007-6621-4c41-9a11-94016d42a49d"), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5759), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") }, - { new Guid("729a8579-2b84-45b3-8dac-bcf1a757aa20"), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5817), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") }, - { new Guid("7c7f7a86-3e0a-4683-81be-a5fc70389ad5"), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5783), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") }, - { new Guid("81dc8b8f-3a02-4e97-a5d4-68765ac4cac4"), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5857), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") }, - { new Guid("86ed0f1d-71af-4e45-a88b-bc4b64f46ed8"), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(6067), new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") }, - { new Guid("95bafb20-1569-414b-aaa4-7865f143a497"), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5744), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") }, - { new Guid("c80b971f-3231-4448-9faa-88a375cb49d9"), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5925), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") }, - { new Guid("db1e25d0-98e2-44a4-87e4-11b00e387b41"), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5832), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") }, - { new Guid("dccc06fd-eb6c-4d92-8e2b-21c8b91db59a"), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5871), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") }, - { new Guid("e4e77b57-54e4-4344-9a95-b9d0d9f48547"), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(6018), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("e7359601-6e5e-42bb-91cd-7c5e93c3f73e"), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(6003), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("f68d3679-246f-45a5-ad16-5927d3263de5"), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5935), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") } - }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "UserEntity", - keyColumn: "Id", - keyValue: new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), - columns: new[] { "ConcurrencyStamp", "PasswordHash" }, - values: new object[] { "991cebf0-505d-4cfb-9daf-e5c15dacd681", "AQAAAAEAACcQAAAAEA8BzPR7YQ/+GbLhEl1derKOUY3j+h13IZg1zcnO49QFh601wNgRIBT7WqWU/+YAGA==" }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "UserEntity", - keyColumn: "Id", - keyValue: new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), - columns: new[] { "ConcurrencyStamp", "PasswordHash" }, - values: new object[] { "64ba066d-6eb1-4066-bc94-bf9eae04087e", "AQAAAAEAACcQAAAAEDZVXdYXhZ9CNpEcCZxlVWIlOxqnBOQQm4JBT2AhbuqqVKNGmBoqErPBrQIOrZmteQ==" }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "UserEntity", - keyColumn: "Id", - keyValue: new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), - columns: new[] { "ConcurrencyStamp", "PasswordHash" }, - values: new object[] { "80edce90-5ecd-4868-8e1a-1ac12b05ad6a", "AQAAAAEAACcQAAAAEB7bhxKsttucxtefw6TO+UTyiDuElL1NNgvVoo0nCnpgZKKj3kS1NRevexdRVC7/4A==" }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "UserEntity", - keyColumn: "Id", - keyValue: new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), - columns: new[] { "ConcurrencyStamp", "PasswordHash" }, - values: new object[] { "a3fe252e-9460-4deb-9c49-fa45118bf736", "AQAAAAEAACcQAAAAEFsOc5W82yorDT0HiIzkmnZAGle0ZoByCvGrl9Niy2+XJXR4NZvsF9imWeay8yEpPA==" }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "UserEntity", - keyColumn: "Id", - keyValue: new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), - columns: new[] { "ConcurrencyStamp", "PasswordHash" }, - values: new object[] { "b8fdf94e-4ba3-43c3-9ed0-06b538f49d2d", "AQAAAAEAACcQAAAAEL3BrZqQnomRxcf0Hpvswo/CptRKGk+TF4389adWcK3Wq9UippagXTcOJ1b5hBceUw==" }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "UserEntity", - keyColumn: "Id", - keyValue: new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), - columns: new[] { "ConcurrencyStamp", "PasswordHash" }, - values: new object[] { "e38f3eb0-b3e8-4dff-b07d-d94401b8f654", "AQAAAAEAACcQAAAAENSnH6yxJYOeyvLZiFeh/ULTo1vTxVOM1mp/L/tV1s4aP/7rSJBV5FPtioZJQCsx2w==" }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "UserEntity", - keyColumn: "Id", - keyValue: new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), - columns: new[] { "ConcurrencyStamp", "PasswordHash" }, - values: new object[] { "85358c43-0438-4399-b435-7423bf61d8a5", "AQAAAAEAACcQAAAAEP3PL5bB6qMqRvoBzMUTQrlv8kS1u6kpZ7f2DsFj+bvPoyR8SWqHlr3tvsc93L8SYg==" }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "UserEntity", - keyColumn: "Id", - keyValue: new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), - columns: new[] { "ConcurrencyStamp", "PasswordHash" }, - values: new object[] { "dd3603cb-b08a-44be-ae0f-251cc553fca2", "AQAAAAEAACcQAAAAEIxP+Hx8FJj9Ci55XVp5OELB0Ye3D+UNbf/Rbw9F1w3NhhoPld4sxta28nx+sQzmfg==" }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "UserEntity", - keyColumn: "Id", - keyValue: new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - columns: new[] { "ConcurrencyStamp", "PasswordHash" }, - values: new object[] { "15c603fb-8ddc-4d4b-8df5-6d03374a8b7e", "AQAAAAEAACcQAAAAEEj7YLvqFNXh0KhVKDGiaQ/xi8emzw7oSt6vuIFIUJKr68pawjkHGimgh+T6KuzehA==" }); - - migrationBuilder.InsertData( - schema: "mango", - table: "UserInformationEntity", - columns: new[] { "Id", "Address", "BirthDay", "CreatedAt", "Facebook", "Instagram", "LinkedIn", "ProfilePicture", "Twitter", "UpdatedAt", "UserId", "Website" }, - values: new object[,] - { - { new Guid("07356a86-e915-42fb-9013-eb7e74334601"), "Poznan, Poland", new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6123), new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6142), "serhii.holishevskii", "serhii.holishevskii", "serhii.holishevskii", null, "serhii.holishevskii", new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6133), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), "serhii.holishevskii.com" }, - { new Guid("21f01e34-ff46-4b17-929a-1b59b2ef910f"), "Saint-Petersburg, Russia", new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6328), new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6348), "kolbasator", null, null, "profile.png", null, new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6338), new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), "kolbasator.com" }, - { new Guid("587d09c6-7cd1-41a0-bee9-fec14f55fb7f"), "Poznan, Poland", new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6084), new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6103), "illia.zubachov", "illia.zubachov", "illia.zubachov", null, "illia.zubachov", new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6094), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), "illia.zubachov.com" }, - { new Guid("9eb02f2c-0634-420d-87ce-dfe3113172b7"), "Odessa, Ukraine", new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6289), new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6309), "razumovsky_r", "razumovsky_r", "razumovsky_r", null, "razumovsky_r", new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6299), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), "razumovsky.com" }, - { new Guid("be0733f1-3a62-4c0d-97b8-fd8f510d40af"), "Poznan, Poland", new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6196), new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6221), "szymon.murawski", "szymon.murawski", "szymon.murawski", null, "szymon.murawski", new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6211), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), "szymon.murawski.com" }, - { new Guid("c7aed1e8-c385-43c9-9241-c5668ae0385f"), "Moscow, Russia", new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6235), new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6260), null, "khachapur.mudrenych", "khachapur.mudrenych", null, null, new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6250), new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), "khachapur.com" } - }); - - migrationBuilder.InsertData( - schema: "mango", - table: "UserInformationEntity", - columns: new[] { "Id", "Address", "BirthDay", "CreatedAt", "Facebook", "Instagram", "LinkedIn", "ProfilePicture", "Twitter", "UpdatedAt", "UserId", "Website" }, - values: new object[] { new Guid("ddb7008d-6c11-4503-91ef-3cdada4d83e0"), "Moscow, Russia", new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6362), new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6387), "TheMoonlightSonata", "TheMoonlightSonata", null, null, "TheMoonlightSonata", new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6377), new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), null }); - - migrationBuilder.InsertData( - schema: "mango", - table: "UserInformationEntity", - columns: new[] { "Id", "Address", "BirthDay", "CreatedAt", "Facebook", "Instagram", "LinkedIn", "ProfilePicture", "Twitter", "UpdatedAt", "UserId", "Website" }, - values: new object[] { new Guid("e4d11b30-fe6d-44bf-9d3b-f5a717b77319"), "Poznan, Poland", new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6035), new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6064), "petro.kolosov", "petro.kolosov", "petro.kolosov", null, "petro.kolosov", new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6050), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), "petro.kolosov.com" }); - - migrationBuilder.InsertData( - schema: "mango", - table: "UserInformationEntity", - columns: new[] { "Id", "Address", "BirthDay", "CreatedAt", "Facebook", "Instagram", "LinkedIn", "ProfilePicture", "Twitter", "UpdatedAt", "UserId", "Website" }, - values: new object[] { new Guid("f1672ff5-fab9-422c-856d-da0f7ae77bea"), "Poznan, Poland", new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6162), new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6182), "arslan.temirbekov", "arslan.temirbekov", "arslan.temirbekov", null, "arslan.temirbekov", new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6172), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), "arslan.temirbekov.com" }); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("083ae74e-cc48-418f-bae2-68bfa40ef954")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("0f78dc38-1130-4aa3-8e64-9ae1cff06e5c")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("1316dc52-609b-4b4c-8f5e-806a63ae23cc")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("14e38cec-9517-4c67-8588-f313e2f1f096")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("15f3535c-4b5e-4e61-9624-d06e48ae52a3")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("1e2aa65a-ea50-45e6-b635-bf624420f33b")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("23d80548-e6d3-4568-8a6a-39ce91703ffd")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("3cc9fbe4-d28c-454c-9525-faa3303373c0")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("3f039761-888a-4260-8799-ca1934d57a59")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("440e86f1-428c-4e17-93e0-848b08ff6a5f")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("450cdb09-60c0-44c6-ade1-f01a2b41facf")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("5d656493-9013-47d6-825e-ccaf68c40903")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("5ece7665-cf32-466f-9c85-9bfad2425f99")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("6105b6f9-e477-41aa-88b8-039bdeaa583a")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("6523ded5-2f62-4c99-81f0-dabed282a240")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("65711f3c-23f0-4248-95a3-39e049de3f9d")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("665bf20f-1858-4348-b978-cbd46dc7aba0")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("7be95880-3a66-4f4f-9a0d-eeff91445401")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("814c8420-b4e2-4427-93b8-75ba2a94b8d3")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("87e2acd4-f36b-4fb9-93e9-05fdcb2c88b5")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("8b4e0084-067d-4ffe-a824-2e9bf55009d9")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("8c9b90a6-9164-4a5c-90b3-c91360cf6a88")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("a2bd7bc3-50ff-4068-b38b-36265e7e1243")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("b752abe4-3f2c-4bc8-8c68-666369b45a8c")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("bd5e204b-99e1-408a-b582-706666918ad4")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("c2a37a7e-ff5c-4699-a343-2ce2e46be5b7")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("c7c9066d-86b2-4853-a8da-fa65ed576c1a")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("da8e21d5-16fb-4dfd-b3f9-dbb7db4dba13")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("dc01f074-a9d2-4ea2-8a8b-64f6811f51df")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("e6a14cf9-ce64-4df2-bd31-9d92283d5727")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("e94318bf-d787-45f2-b3bf-fad650fee75c")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("006be3e9-7bef-45a0-b532-4fafb4db2dc3")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("19899c12-fbfa-48d0-82ec-18d45e1eb6d9")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("1cfa7869-1ae5-476f-90da-64f6a10a0124")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("1dd9d62f-92c4-4ea9-ad63-1803856d3294")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("294217ea-2170-4417-92b6-efbf9dd7f00a")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("415ee633-e418-41d9-96ca-2d6e0aabd128")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("4477dbc9-fee5-4710-b0b1-469d0f6af73a")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("45730db3-105b-4166-b257-70d3e4099bca")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("4fcda455-e931-4031-a764-759a9378f2a1")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("5169ff97-b2d0-4c1f-9dd9-d65edb8a5dfb")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("56310a3a-c427-4fe6-82ea-c2f4051654b2")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("58f4dcab-6889-418f-8687-86d285b75149")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("5a74c334-9d71-4f36-b311-cf1cee4990bb")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("5b62e0b8-c8e8-410d-bee1-f3602626a87b")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("5c6773aa-b60a-4c4a-9435-6f9f51570c86")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("6d523966-629f-475e-9849-607aea0f1205")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("7177b007-6621-4c41-9a11-94016d42a49d")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("729a8579-2b84-45b3-8dac-bcf1a757aa20")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("7c7f7a86-3e0a-4683-81be-a5fc70389ad5")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("81dc8b8f-3a02-4e97-a5d4-68765ac4cac4")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("86ed0f1d-71af-4e45-a88b-bc4b64f46ed8")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("95bafb20-1569-414b-aaa4-7865f143a497")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("c80b971f-3231-4448-9faa-88a375cb49d9")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("db1e25d0-98e2-44a4-87e4-11b00e387b41")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("dccc06fd-eb6c-4d92-8e2b-21c8b91db59a")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("e4e77b57-54e4-4344-9a95-b9d0d9f48547")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("e7359601-6e5e-42bb-91cd-7c5e93c3f73e")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("f68d3679-246f-45a5-ad16-5927d3263de5")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserInformationEntity", - keyColumn: "Id", - keyValue: new Guid("07356a86-e915-42fb-9013-eb7e74334601")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserInformationEntity", - keyColumn: "Id", - keyValue: new Guid("21f01e34-ff46-4b17-929a-1b59b2ef910f")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserInformationEntity", - keyColumn: "Id", - keyValue: new Guid("587d09c6-7cd1-41a0-bee9-fec14f55fb7f")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserInformationEntity", - keyColumn: "Id", - keyValue: new Guid("9eb02f2c-0634-420d-87ce-dfe3113172b7")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserInformationEntity", - keyColumn: "Id", - keyValue: new Guid("be0733f1-3a62-4c0d-97b8-fd8f510d40af")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserInformationEntity", - keyColumn: "Id", - keyValue: new Guid("c7aed1e8-c385-43c9-9241-c5668ae0385f")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserInformationEntity", - keyColumn: "Id", - keyValue: new Guid("ddb7008d-6c11-4503-91ef-3cdada4d83e0")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserInformationEntity", - keyColumn: "Id", - keyValue: new Guid("e4d11b30-fe6d-44bf-9d3b-f5a717b77319")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserInformationEntity", - keyColumn: "Id", - keyValue: new Guid("f1672ff5-fab9-422c-856d-da0f7ae77bea")); - - migrationBuilder.DropColumn( - name: "UserNameChanged", - schema: "mango", - table: "UserEntity"); - - migrationBuilder.AddColumn( - name: "EmailCode", - schema: "mango", - table: "UserEntity", - type: "uniqueidentifier", - nullable: false, - defaultValue: new Guid("00000000-0000-0000-0000-000000000000")); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1613), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1614), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1613) }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("3fce8b2c-252d-4514-a1bb-fbdf73c47b78"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1635), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1636), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1636) }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1615), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1616), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1615) }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1619), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1620), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1619) }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("9f205dde-0ddc-401f-8fe9-6c794b661f5d"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1634), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1635), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1634) }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("b119914a-6d95-4047-bf8a-db27deeb7dc9"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1632), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1633), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1633) }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1606), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1610), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1608) }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1617), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1618), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1618) }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("f5b7824f-e52b-4246-9984-06fc8e964f0c"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1628), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1629), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1628) }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("f8729a12-5746-443f-ad31-378d846fce30"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1629), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1630), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(1630) }); - - migrationBuilder.InsertData( - schema: "mango", - table: "MessageEntity", - columns: new[] { "Id", "Attachment", "ChatId", "Content", "CreatedAt", "InReplayToAuthor", "InReplayToText", "UpdatedAt", "UserId" }, - values: new object[,] - { - { new Guid("22724c39-2448-4bb6-8fc3-fea5ceb5c9dc"), null, new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), "Слава Партии!!", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5398), null, null, null, new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") }, - { new Guid("2d91d301-a491-4bc6-9061-002218be17b0"), null, new Guid("3fce8b2c-252d-4514-a1bb-fbdf73c47b78"), "Hi teacher", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5423), null, null, null, new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") }, - { new Guid("32346317-7c66-44e5-8cb9-dd2d4a50b457"), null, new Guid("f5b7824f-e52b-4246-9984-06fc8e964f0c"), "Hello World", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5409), null, null, null, new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("38bf11b1-3b27-42fb-8fde-5c39ae614a5a"), null, new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), "Hello World", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5388), null, null, null, new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") }, - { new Guid("49f75eac-2924-4f05-817a-6fc9ef9a268f"), null, new Guid("b119914a-6d95-4047-bf8a-db27deeb7dc9"), "Hello World", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5414), null, null, null, new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("55fca598-c242-4ed1-b29b-af129759d5e5"), null, new Guid("9f205dde-0ddc-401f-8fe9-6c794b661f5d"), "Hello World", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5415), null, null, null, new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") }, - { new Guid("7256cf71-efa0-4672-9abf-5bc513b1086c"), null, new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), "C# The Best", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5393), null, null, null, new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") }, - { new Guid("7df33dcd-3f64-4d03-8d77-9c895c354b4b"), null, new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), "TypeScript The Best", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5394), null, null, null, new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") }, - { new Guid("87487cdb-4291-4811-80ec-1e4f9db2d7b0"), null, new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), "Hello guys, how your diploma project goes?", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5378), null, null, null, new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") }, - { new Guid("8eba3a15-56f5-44ec-aaca-46efbe67eca2"), null, new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), "Hello World", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5405), null, null, null, new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") }, - { new Guid("9202347f-95c8-4dce-8c3c-32be6b49df91"), null, new Guid("f8729a12-5746-443f-ad31-378d846fce30"), "Hello World", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5413), null, null, null, new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("931a46b2-5af2-4e14-8501-5c8727f08959"), null, new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), "Hello World", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5404), null, null, null, new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") }, - { new Guid("a1a9820f-0a02-4261-8b77-cf13b1c218fb"), null, new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), "Слава Партии!!", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5398), null, null, null, new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") }, - { new Guid("ae7dbb11-ba18-4a8b-a15c-69dd243a2c3e"), null, new Guid("b119914a-6d95-4047-bf8a-db27deeb7dc9"), "Hello World", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5413), null, null, null, new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") }, - { new Guid("b902caa3-23ba-49e1-babb-e402895e2807"), null, new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), "Hello World", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5403), null, null, null, new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") }, - { new Guid("b9393310-759d-4f92-b888-4d048caf063b"), null, new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), "Hello World", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5406), null, null, null, new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") }, - { new Guid("ba76b719-571a-410e-8424-353d47adfd83"), null, new Guid("9f205dde-0ddc-401f-8fe9-6c794b661f5d"), "Hello World", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5416), null, null, null, new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") }, - { new Guid("bdf82526-ddf2-4d26-9dcd-a70ec9d001f6"), null, new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), "Слава Партии!!", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5397), null, null, null, new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("befa4294-f615-4d55-a90f-e73332d77591"), null, new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), "Слава Партии!!", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5396), null, null, null, new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") }, - { new Guid("c18fa6c4-cf86-4765-98ad-9e6263214bca"), null, new Guid("f8729a12-5746-443f-ad31-378d846fce30"), "Hello World", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5412), null, null, null, new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") }, - { new Guid("c5b5d07a-1b97-4b8e-aef2-348d8c9d27da"), null, new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), "Hello World", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5399), null, null, null, new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") }, - { new Guid("c98a5a67-a1c4-4ab6-8d41-2c2f1a77b520"), null, new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), "Hello World", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5407), null, null, null, new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") }, - { new Guid("cdba47b6-6074-4ec6-aa6b-990e793123d2"), null, new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), "Hello World", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5400), null, null, null, new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("d0de9911-8b7f-4a20-9c8f-89792af28b7a"), null, new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), "Hi teacher, I perform QA of the current version", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5381), null, null, null, new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") }, - { new Guid("d90c16f3-f790-4c5f-a90b-b3f0fc7f0212"), null, new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), "I work with backend too...", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5386), null, null, null, new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") }, - { new Guid("df054ddf-f311-405d-8b26-bad10c6a936f"), null, new Guid("f5b7824f-e52b-4246-9984-06fc8e964f0c"), "Hello World", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5408), null, null, null, new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") }, - { new Guid("e56194fd-63af-4cd7-ae80-e3840db75dc2"), null, new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), "Well, I'm doing UI/UX part of the project", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5380), null, null, null, new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") }, - { new Guid("e95de444-ccf9-4b35-80d0-356c9301216d"), null, new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), "Hello World", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5406), null, null, null, new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("f45c6ad4-669a-4126-bac8-e4faeb838694"), null, new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), "F# The Best", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5389), null, null, null, new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("f550a534-447b-4216-aafc-55c89c72ff67"), null, new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), "Greetings. I currently workout the back-end part", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5384), null, null, null, new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") }, - { new Guid("fb933dde-e91b-4236-88c5-0d1999846f43"), null, new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), "Great! Good luck to all of you", new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(5387), null, null, null, new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") } - }); - - migrationBuilder.InsertData( - schema: "mango", - table: "UserContactEntity", - columns: new[] { "Id", "ContactId", "CreatedAt", "UserId" }, - values: new object[] { new Guid("03da4110-35e6-4414-a37c-0d2ea033a6d1"), new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8926), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }); - - migrationBuilder.InsertData( - schema: "mango", - table: "UserContactEntity", - columns: new[] { "Id", "ContactId", "CreatedAt", "UserId" }, - values: new object[,] - { - { new Guid("0ecde415-8c42-4c57-bdba-a876ba316a1a"), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8909), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") }, - { new Guid("0f2d8193-9395-409c-abf2-92735389ea06"), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8904), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") }, - { new Guid("10af6975-fc31-4879-9c75-643b8227d164"), new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8930), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("18fc64e6-bf06-45cd-8d69-54c814f486da"), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8920), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") }, - { new Guid("1ff356b2-8d9d-41b5-ac7b-f729de72fd89"), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8905), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") }, - { new Guid("30a9587c-71f2-48b3-971d-971cffd87c75"), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8922), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") }, - { new Guid("3a887366-3479-4521-8ca3-ae09f4750635"), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8927), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("3b55d09f-9585-458d-8cd4-72d5ea8707b5"), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8905), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") }, - { new Guid("3bd568ee-679e-4469-ad93-b70e70cb45e7"), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8917), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") }, - { new Guid("4f3a1392-8bc6-42c4-8ab2-fbbadd2552a5"), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8908), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") }, - { new Guid("4f54e050-37ee-4ed5-848d-d7aaf3025337"), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8925), new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") }, - { new Guid("5a597475-4820-4601-a038-d8c1ff4b0978"), new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8931), new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") }, - { new Guid("5f95bb0d-3706-46ce-9ba1-d1a41ffcead0"), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8923), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") }, - { new Guid("63c7314b-e018-420c-be65-7b84f34524f3"), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8912), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") }, - { new Guid("7c35261a-6bbb-4819-bf3a-8884b64a12e5"), new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8928), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("8893cdf7-cf4f-489e-a992-687a7a535a4b"), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8907), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") }, - { new Guid("8abb9d01-e0d0-4758-8cb4-54eb1a369351"), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8913), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") }, - { new Guid("a5807a03-bfd1-45a5-ab11-85858c1fd574"), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8901), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") }, - { new Guid("bbb07d53-daf6-4d70-a140-cd6b8b84e60a"), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8926), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("d4f10299-2fed-4adc-af4c-a8af1cfd7516"), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8932), new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") }, - { new Guid("e2ee16d3-13df-435f-971a-36acfd206500"), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8902), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") }, - { new Guid("e6f33b80-a64f-4017-a541-7cce286db160"), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8924), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") }, - { new Guid("e93e2f85-260b-4776-8d4f-f60522fb2659"), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8915), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") }, - { new Guid("ed2dc47c-ec7a-45d7-beef-4c1f59cac29d"), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8914), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") }, - { new Guid("ee9612aa-57b1-4c13-b95e-e149820c7590"), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8918), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") }, - { new Guid("f4be92a5-94d6-4d0a-864c-771af95e4b3f"), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8891), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") }, - { new Guid("f6729e0c-b34a-4f8b-9a59-ce0ddfaf9182"), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), new DateTime(2023, 3, 6, 20, 56, 53, 40, DateTimeKind.Utc).AddTicks(8916), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") } - }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "UserEntity", - keyColumn: "Id", - keyValue: new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), - columns: new[] { "ConcurrencyStamp", "PasswordHash" }, - values: new object[] { "d8732eef-a079-4d18-a3ef-b6f2654b9e91", "AQAAAAEAACcQAAAAELHgYd7B1nNhcO2YOZe0iYvaOasQWbZQFWFJF9y2hs5wqp8qbt1hEWaJrDtjBBkGBg==" }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "UserEntity", - keyColumn: "Id", - keyValue: new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), - columns: new[] { "ConcurrencyStamp", "PasswordHash" }, - values: new object[] { "c9cf3e28-70fd-474d-8826-a7756291d9f7", "AQAAAAEAACcQAAAAEHTIB0KlXngnIkY/noMvRndPHGhohemQUr4JzutPV7/zLUZEAwXx22GijLaumze9Sw==" }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "UserEntity", - keyColumn: "Id", - keyValue: new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), - columns: new[] { "ConcurrencyStamp", "PasswordHash" }, - values: new object[] { "f6ed2ebb-8829-4157-850c-a4159c140186", "AQAAAAEAACcQAAAAEJpUl/VVq3xrRJYSzQirsi9J0h8O78+nX19d9ESeUaR29x/r884DVNeTIK9DYEHisg==" }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "UserEntity", - keyColumn: "Id", - keyValue: new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), - columns: new[] { "ConcurrencyStamp", "PasswordHash" }, - values: new object[] { "e19ea8b2-e69b-4931-8797-1ad0dbbeefed", "AQAAAAEAACcQAAAAEF03r/6VPRvhJlHfwslgCp3FoID8bF4+QfgkvyQlf4dIaVlu4MLAgXpwH9dT8zgNIQ==" }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "UserEntity", - keyColumn: "Id", - keyValue: new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), - columns: new[] { "ConcurrencyStamp", "PasswordHash" }, - values: new object[] { "756262d6-3691-427b-aded-c9b7fa0280d3", "AQAAAAEAACcQAAAAEMZezIZBhF9Fcy/zQHqIPibUBb34rjqQV+lX6XMeycojjBbPX86Z0BIdeTjULsZd/A==" }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "UserEntity", - keyColumn: "Id", - keyValue: new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), - columns: new[] { "ConcurrencyStamp", "PasswordHash" }, - values: new object[] { "008a91b6-68ad-45e0-bf27-46ab4b31a5f3", "AQAAAAEAACcQAAAAEDPJPhNfd65CS93OuXwfPkeWtA3wGL8KeoQjjlBf2PcUoVl7WUdmH6GDsjlZVrXmrg==" }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "UserEntity", - keyColumn: "Id", - keyValue: new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), - columns: new[] { "ConcurrencyStamp", "PasswordHash" }, - values: new object[] { "8e911abe-6649-4669-a71e-27b22e2b24d8", "AQAAAAEAACcQAAAAELkRY15BysaldxhoS7xfzWk5/xtpol5S+BdBwZ1yMkBOMG9jjrd5zhy/oQVY88v1yg==" }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "UserEntity", - keyColumn: "Id", - keyValue: new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), - columns: new[] { "ConcurrencyStamp", "PasswordHash" }, - values: new object[] { "919b9cbb-7b1e-4424-82a6-326edb8ae694", "AQAAAAEAACcQAAAAEGJnlwFs/vBVcWfMBXzKimCUAu+hp7DOnweFuyATzBy3YRoaX/3L0QYZRzNtTo6DbQ==" }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "UserEntity", - keyColumn: "Id", - keyValue: new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - columns: new[] { "ConcurrencyStamp", "PasswordHash" }, - values: new object[] { "0baf4779-6f55-4c63-a4e6-726954aad9cd", "AQAAAAEAACcQAAAAEPODqAoki2Nj6kYr/DBnY2A2JwvDu63cmRD+EmJ/IvLnLQcAv8y0THbJ7PykDVB0+A==" }); - - migrationBuilder.InsertData( - schema: "mango", - table: "UserInformationEntity", - columns: new[] { "Id", "Address", "BirthDay", "CreatedAt", "Facebook", "Instagram", "LinkedIn", "ProfilePicture", "Twitter", "UpdatedAt", "UserId", "Website" }, - values: new object[,] - { - { new Guid("36e23b21-54c6-46a8-85bc-0dc91291f8fb"), "Moscow, Russia", new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2635), new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2636), null, "khachapur.mudrenych", "khachapur.mudrenych", null, null, new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2635), new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), "khachapur.com" }, - { new Guid("45ad1329-dba1-4885-833a-472d456e9f44"), "Poznan, Poland", new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2609), new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2611), "illia.zubachov", "illia.zubachov", "illia.zubachov", null, "illia.zubachov", new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2610), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), "illia.zubachov.com" }, - { new Guid("4786d148-23aa-43d1-8b3d-406a6ce66bee"), "Saint-Petersburg, Russia", new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2639), new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2640), "kolbasator", null, null, "profile.png", null, new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2640), new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), "kolbasator.com" }, - { new Guid("6ce81626-4307-4393-8175-572b910190e9"), "Poznan, Poland", new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2616), new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2617), "arslan.temirbekov", "arslan.temirbekov", "arslan.temirbekov", null, "arslan.temirbekov", new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2617), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), "arslan.temirbekov.com" }, - { new Guid("6fc2a397-4aea-47f0-83ed-448757d0a86b"), "Poznan, Poland", new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2619), new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2620), "szymon.murawski", "szymon.murawski", "szymon.murawski", null, "szymon.murawski", new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2619), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), "szymon.murawski.com" }, - { new Guid("7c285f0c-67ed-4cfd-baad-14035f5f384e"), "Poznan, Poland", new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2600), new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2603), "petro.kolosov", "petro.kolosov", "petro.kolosov", null, "petro.kolosov", new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2603), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), "petro.kolosov.com" } - }); - - migrationBuilder.InsertData( - schema: "mango", - table: "UserInformationEntity", - columns: new[] { "Id", "Address", "BirthDay", "CreatedAt", "Facebook", "Instagram", "LinkedIn", "ProfilePicture", "Twitter", "UpdatedAt", "UserId", "Website" }, - values: new object[] { new Guid("931ad2ec-6747-4f9f-a4ca-9870c9cc5ad3"), "Poznan, Poland", new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2613), new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2614), "serhii.holishevskii", "serhii.holishevskii", "serhii.holishevskii", null, "serhii.holishevskii", new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2614), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), "serhii.holishevskii.com" }); - - migrationBuilder.InsertData( - schema: "mango", - table: "UserInformationEntity", - columns: new[] { "Id", "Address", "BirthDay", "CreatedAt", "Facebook", "Instagram", "LinkedIn", "ProfilePicture", "Twitter", "UpdatedAt", "UserId", "Website" }, - values: new object[] { new Guid("b48c1502-c326-4dce-85dd-21a4d9aa390c"), "Moscow, Russia", new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2641), new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2642), "TheMoonlightSonata", "TheMoonlightSonata", null, null, "TheMoonlightSonata", new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2642), new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), null }); - - migrationBuilder.InsertData( - schema: "mango", - table: "UserInformationEntity", - columns: new[] { "Id", "Address", "BirthDay", "CreatedAt", "Facebook", "Instagram", "LinkedIn", "ProfilePicture", "Twitter", "UpdatedAt", "UserId", "Website" }, - values: new object[] { new Guid("f086fd85-2e7c-4aa2-9c7b-b65f304122d2"), "Odessa, Ukraine", new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2637), new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2638), "razumovsky_r", "razumovsky_r", "razumovsky_r", null, "razumovsky_r", new DateTime(2023, 3, 6, 20, 56, 53, 51, DateTimeKind.Utc).AddTicks(2637), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), "razumovsky.com" }); - } - } -} diff --git a/MangoAPI.Infrastructure/Migrations/20230311151701_MessageEntityFileName.Designer.cs b/MangoAPI.Infrastructure/Migrations/20230311151701_MessageEntityFileName.Designer.cs deleted file mode 100644 index f5176f5eb..000000000 --- a/MangoAPI.Infrastructure/Migrations/20230311151701_MessageEntityFileName.Designer.cs +++ /dev/null @@ -1,1784 +0,0 @@ -// -using System; -using MangoAPI.Infrastructure.Database; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace MangoAPI.Infrastructure.Migrations -{ - [DbContext(typeof(MangoDbContext))] - [Migration("20230311151701_MessageEntityFileName")] - partial class MessageEntityFileName - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "6.0.14") - .HasAnnotation("Relational:MaxIdentifierLength", 128); - - SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1); - - modelBuilder.Entity("MangoAPI.Domain.Entities.ChatEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("CommunityType") - .HasColumnType("int"); - - b.Property("CreatedAt") - .HasColumnType("datetime2"); - - b.Property("Description") - .HasColumnType("nvarchar(max)"); - - b.Property("Image") - .HasColumnType("nvarchar(max)"); - - b.Property("LastMessageAuthor") - .HasColumnType("nvarchar(max)"); - - b.Property("LastMessageId") - .HasColumnType("uniqueidentifier"); - - b.Property("LastMessageText") - .HasColumnType("nvarchar(max)"); - - b.Property("LastMessageTime") - .HasColumnType("datetime2"); - - b.Property("MembersCount") - .HasColumnType("int"); - - b.Property("Title") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("UpdatedAt") - .HasColumnType("datetime2"); - - b.HasKey("Id"); - - b.ToTable("ChatEntity", "mango"); - - b.HasData( - new - { - Id = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - CommunityType = 2, - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2711), - Description = "WSB Public Group", - Image = "wsb_group_logo.png", - LastMessageAuthor = "Szymon Murawski", - LastMessageText = "Great! Good luck to all of you", - LastMessageTime = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2716), - MembersCount = 5, - Title = "WSB", - UpdatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2713) - }, - new - { - Id = new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), - CommunityType = 2, - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2717), - Description = "Extreme Code Main Public Group", - Image = "extreme_code_main.jpg", - LastMessageAuthor = "Amelit", - LastMessageText = "TypeScript The Best", - LastMessageTime = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2719), - MembersCount = 4, - Title = "Extreme Code Main", - UpdatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2718) - }, - new - { - Id = new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), - CommunityType = 2, - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2720), - Description = "Extreme Code Flood Public Group", - Image = "extremecode_rest_logo.jpg", - LastMessageAuthor = "Amelit", - LastMessageText = "Слава Партии!!", - LastMessageTime = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2721), - MembersCount = 4, - Title = "Extreme Code Flood", - UpdatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2721) - }, - new - { - Id = new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), - CommunityType = 2, - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2722), - Description = "Extreme Code C++ Public Group", - Image = "extremecode_cpp_logo.jpg", - LastMessageAuthor = "Amelit", - LastMessageText = "Hello world!", - LastMessageTime = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2723), - MembersCount = 4, - Title = "Extreme Code C++", - UpdatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2722) - }, - new - { - Id = new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), - CommunityType = 2, - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2724), - Description = "Extreme Code .NET Public Group", - Image = "extremecode_dotnet.png", - LastMessageAuthor = "Amelit", - LastMessageText = "Hello world!", - LastMessageTime = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2725), - MembersCount = 4, - Title = "Extreme Code .NET", - UpdatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2724) - }, - new - { - Id = new Guid("f5b7824f-e52b-4246-9984-06fc8e964f0c"), - CommunityType = 1, - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2725), - Description = "Direct chat between Khachatur Khachatryan and razumovsky r", - LastMessageAuthor = "razumovsky r", - LastMessageText = "Hello world!", - LastMessageTime = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2727), - MembersCount = 2, - Title = "Khachatur Khachatryan / razumovsky r", - UpdatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2726) - }, - new - { - Id = new Guid("f8729a12-5746-443f-ad31-378d846fce30"), - CommunityType = 1, - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2727), - Description = "Direct chat between Мусяка Колбасяка and razumovsky r", - LastMessageAuthor = "razumovsky r", - LastMessageText = "Hello world!", - LastMessageTime = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2728), - MembersCount = 2, - Title = "Мусяка Колбасяка / razumovsky r", - UpdatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2728) - }, - new - { - Id = new Guid("b119914a-6d95-4047-bf8a-db27deeb7dc9"), - CommunityType = 1, - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2729), - Description = "Direct chat between Amelit and razumovsky r", - LastMessageAuthor = "razumovsky r", - LastMessageText = "Hello world!", - LastMessageTime = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2730), - MembersCount = 2, - Title = "Amelit / razumovsky r", - UpdatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2729) - }, - new - { - Id = new Guid("9f205dde-0ddc-401f-8fe9-6c794b661f5d"), - CommunityType = 1, - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2731), - Description = "Direct chat between Khachatur Khachatryan and Мусяка Колбасяка", - LastMessageAuthor = "Khachatur Khachatryan", - LastMessageText = "Hello world!", - LastMessageTime = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2732), - MembersCount = 2, - Title = "Khachatur Khachatryan / Мусяка Колбасяка", - UpdatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2731) - }, - new - { - Id = new Guid("3fce8b2c-252d-4514-a1bb-fbdf73c47b78"), - CommunityType = 1, - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2732), - Description = "Direct chat between Petro Kolosov and Szymon Murawski", - LastMessageAuthor = "Petro Kolosov", - LastMessageText = "Hello world!", - LastMessageTime = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2733), - MembersCount = 2, - Title = "Petro Kolosov / Szymon Murawski", - UpdatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2733) - }); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.DiffieHellmanKeyExchangeEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("CreatedAt") - .HasColumnType("datetime2"); - - b.Property("IsConfirmed") - .HasColumnType("bit"); - - b.Property("KeyExchangeType") - .HasColumnType("int"); - - b.Property("ReceiverId") - .HasColumnType("uniqueidentifier"); - - b.Property("ReceiverPublicKey") - .HasColumnType("varbinary(max)"); - - b.Property("SenderId") - .HasColumnType("uniqueidentifier"); - - b.Property("SenderPublicKey") - .IsRequired() - .HasColumnType("varbinary(max)"); - - b.Property("UpdatedAt") - .HasColumnType("datetime2"); - - b.HasKey("Id"); - - b.ToTable("DiffieHellmanKeyExchangeEntity", "mango"); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.DiffieHellmanParameterEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("CreatedAt") - .HasColumnType("datetime2"); - - b.Property("CreatedBy") - .HasColumnType("uniqueidentifier"); - - b.Property("OpenSslDhParameter") - .IsRequired() - .HasColumnType("varbinary(max)"); - - b.HasKey("Id"); - - b.ToTable("DiffieHellmanParameterEntity", "mango"); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.DocumentEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("FileName") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("UploadedAt") - .HasColumnType("datetime2"); - - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("DocumentEntity", "mango"); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.MessageEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("AttachmentFileName") - .HasColumnType("nvarchar(max)"); - - b.Property("ChatId") - .HasColumnType("uniqueidentifier"); - - b.Property("Content") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("CreatedAt") - .HasColumnType("datetime2"); - - b.Property("InReplayToAuthor") - .HasColumnType("nvarchar(max)"); - - b.Property("InReplayToText") - .HasColumnType("nvarchar(max)"); - - b.Property("UpdatedAt") - .HasColumnType("datetime2"); - - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("ChatId"); - - b.HasIndex("UserId"); - - b.ToTable("MessageEntity", "mango"); - - b.HasData( - new - { - Id = new Guid("08dbb138-829f-4790-870f-40ddf22eb94b"), - ChatId = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - Content = "Hello guys, how your diploma project goes?", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6337), - UserId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") - }, - new - { - Id = new Guid("5ea2c650-6382-478d-be44-c7c260b6d98d"), - ChatId = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - Content = "Well, I'm doing UI/UX part of the project", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6339), - UserId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") - }, - new - { - Id = new Guid("19e642d7-8c05-451d-927f-b2d5c293bfc2"), - ChatId = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - Content = "Hi teacher, I perform QA of the current version", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6341), - UserId = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") - }, - new - { - Id = new Guid("c378cef2-599e-4756-b98e-0c9c7c466882"), - ChatId = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - Content = "Greetings. I currently workout the back-end part", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6342), - UserId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") - }, - new - { - Id = new Guid("63002292-fce5-4423-9310-03fe7314e1c5"), - ChatId = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - Content = "I work with backend too...", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6353), - UserId = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") - }, - new - { - Id = new Guid("11428540-b134-4e20-9082-8cde30ccc43a"), - ChatId = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - Content = "Great! Good luck to all of you", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6355), - UserId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") - }, - new - { - Id = new Guid("f38e06fe-f6fe-41b4-912a-8ab06a3ac4c1"), - ChatId = new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6357), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") - }, - new - { - Id = new Guid("8037b41d-63a8-4a1f-b464-3310a0b7be47"), - ChatId = new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), - Content = "F# The Best", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6357), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("0e016aa7-2570-4576-83b9-50dd0901ef29"), - ChatId = new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), - Content = "C# The Best", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6358), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") - }, - new - { - Id = new Guid("10294c17-9c23-4a28-b2c3-8e55c212e548"), - ChatId = new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), - Content = "TypeScript The Best", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6359), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") - }, - new - { - Id = new Guid("c004bf75-a1b1-4d5a-8775-921757c43ba1"), - ChatId = new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), - Content = "Слава Партии!!", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6361), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") - }, - new - { - Id = new Guid("49497e7c-b819-4960-ae9a-cd9f995a620d"), - ChatId = new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), - Content = "Слава Партии!!", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6362), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("a9981f4e-cd57-48f5-85d4-505e51f8ea83"), - ChatId = new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), - Content = "Слава Партии!!", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6371), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") - }, - new - { - Id = new Guid("1341a7ed-70c1-4b2e-adba-27d6704289e5"), - ChatId = new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), - Content = "Слава Партии!!", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6372), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") - }, - new - { - Id = new Guid("47aff891-5254-40c7-b706-489106ce81a7"), - ChatId = new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6373), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") - }, - new - { - Id = new Guid("f3a1170d-84fe-4586-a6f1-14977ec8bd1b"), - ChatId = new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6374), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("fc924fc7-ac8c-4a85-9526-b49907766a3f"), - ChatId = new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6375), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") - }, - new - { - Id = new Guid("fa484a5f-06c8-44a0-b1ad-753b6d198ad5"), - ChatId = new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6376), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") - }, - new - { - Id = new Guid("a50f577e-cf40-4705-9422-2346ae9a1512"), - ChatId = new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6377), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") - }, - new - { - Id = new Guid("3c0c34be-ee09-4b00-9c4d-147fcfbfdbd4"), - ChatId = new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6378), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("0e1b34ba-78b0-4ae8-8840-4003a4c8be97"), - ChatId = new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6381), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") - }, - new - { - Id = new Guid("4fef0fcd-21c7-4b67-9ff4-8f54bba05cb6"), - ChatId = new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6382), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") - }, - new - { - Id = new Guid("820f9073-c741-4560-875c-6b50537b1425"), - ChatId = new Guid("f5b7824f-e52b-4246-9984-06fc8e964f0c"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6383), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") - }, - new - { - Id = new Guid("fe4c9a26-330f-4587-adbd-e1ff642dd5c1"), - ChatId = new Guid("f5b7824f-e52b-4246-9984-06fc8e964f0c"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6384), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("97fe67d2-396d-43e8-804a-c6b61b92fe15"), - ChatId = new Guid("f8729a12-5746-443f-ad31-378d846fce30"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6385), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") - }, - new - { - Id = new Guid("364d08a7-ba5d-4708-a991-99cec7a8e254"), - ChatId = new Guid("f8729a12-5746-443f-ad31-378d846fce30"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6386), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("888194fe-d407-492f-ba40-c74b2f4206ba"), - ChatId = new Guid("b119914a-6d95-4047-bf8a-db27deeb7dc9"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6387), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") - }, - new - { - Id = new Guid("da770aea-85ef-44cb-b7cb-a168f3c74106"), - ChatId = new Guid("b119914a-6d95-4047-bf8a-db27deeb7dc9"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6388), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("0105b31a-ba61-41c8-a257-5fb0011ca6ed"), - ChatId = new Guid("9f205dde-0ddc-401f-8fe9-6c794b661f5d"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6390), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") - }, - new - { - Id = new Guid("70a4e5a5-303f-4060-b3ee-9f893575517a"), - ChatId = new Guid("9f205dde-0ddc-401f-8fe9-6c794b661f5d"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6391), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") - }, - new - { - Id = new Guid("913c9dc0-1a09-4904-b3e2-c7c70522ec34"), - ChatId = new Guid("3fce8b2c-252d-4514-a1bb-fbdf73c47b78"), - Content = "Hi teacher", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6392), - UserId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") - }); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.RoleEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("nvarchar(max)"); - - b.Property("Name") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("NormalizedName") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName") - .IsUnique() - .HasDatabaseName("RoleNameIndex") - .HasFilter("[NormalizedName] IS NOT NULL"); - - b.ToTable("AspNetRoles", (string)null); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.SessionEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("CreatedAt") - .HasColumnType("datetime2"); - - b.Property("ExpiresAt") - .HasColumnType("datetime2"); - - b.Property("RefreshToken") - .HasColumnType("uniqueidentifier"); - - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("SessionEntity", "mango"); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.UserChatEntity", b => - { - b.Property("ChatId") - .HasColumnType("uniqueidentifier"); - - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.Property("IsArchived") - .HasColumnType("bit"); - - b.Property("RoleId") - .HasColumnType("int"); - - b.HasKey("ChatId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("UserChatEntity", "mango"); - - b.HasData( - new - { - ChatId = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - UserId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), - IsArchived = false, - RoleId = 2 - }, - new - { - ChatId = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - UserId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), - IsArchived = false, - RoleId = 4 - }, - new - { - ChatId = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - UserId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - UserId = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - UserId = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - IsArchived = false, - RoleId = 3 - }, - new - { - ChatId = new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), - IsArchived = false, - RoleId = 2 - }, - new - { - ChatId = new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), - IsArchived = false, - RoleId = 4 - }, - new - { - ChatId = new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - IsArchived = false, - RoleId = 4 - }, - new - { - ChatId = new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), - IsArchived = false, - RoleId = 2 - }, - new - { - ChatId = new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), - IsArchived = false, - RoleId = 4 - }, - new - { - ChatId = new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - IsArchived = false, - RoleId = 3 - }, - new - { - ChatId = new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - IsArchived = false, - RoleId = 4 - }, - new - { - ChatId = new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("f5b7824f-e52b-4246-9984-06fc8e964f0c"), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("f5b7824f-e52b-4246-9984-06fc8e964f0c"), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("f8729a12-5746-443f-ad31-378d846fce30"), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("f8729a12-5746-443f-ad31-378d846fce30"), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("b119914a-6d95-4047-bf8a-db27deeb7dc9"), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("b119914a-6d95-4047-bf8a-db27deeb7dc9"), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("9f205dde-0ddc-401f-8fe9-6c794b661f5d"), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("9f205dde-0ddc-401f-8fe9-6c794b661f5d"), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("3fce8b2c-252d-4514-a1bb-fbdf73c47b78"), - UserId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("3fce8b2c-252d-4514-a1bb-fbdf73c47b78"), - UserId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), - IsArchived = false, - RoleId = 1 - }); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.UserContactEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("ContactId") - .HasColumnType("uniqueidentifier"); - - b.Property("CreatedAt") - .HasColumnType("datetime2"); - - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("UserContactEntity", "mango"); - - b.HasData( - new - { - Id = new Guid("845bf9a1-ea0a-4e74-98c0-e8ba6f05d79a"), - ContactId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(115), - UserId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") - }, - new - { - Id = new Guid("70e1af12-7dea-4be9-9a59-498c5a4fc7b7"), - ContactId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(117), - UserId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") - }, - new - { - Id = new Guid("e7fd2b89-5d61-4a06-b312-12b6986b8d09"), - ContactId = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(119), - UserId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") - }, - new - { - Id = new Guid("b0953e09-00ce-4789-9810-077fc179f10d"), - ContactId = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(120), - UserId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") - }, - new - { - Id = new Guid("b2f445c3-108a-4a45-97f1-c8efc23b28c1"), - ContactId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(121), - UserId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") - }, - new - { - Id = new Guid("46c930ab-b6d9-479f-ae41-0f0f6ed3d046"), - ContactId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(127), - UserId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") - }, - new - { - Id = new Guid("30436ffa-510e-46f6-bae9-41d57bbff811"), - ContactId = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(127), - UserId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") - }, - new - { - Id = new Guid("d61aba3f-5085-4d51-a6cb-ed561f5aee16"), - ContactId = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(128), - UserId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") - }, - new - { - Id = new Guid("e56d6db4-533e-4884-bc93-67f18059c8b1"), - ContactId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(129), - UserId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") - }, - new - { - Id = new Guid("2130e631-caec-40a7-8a99-565e6d4f0b2c"), - ContactId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(130), - UserId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") - }, - new - { - Id = new Guid("e095810c-16a9-48c4-bb8f-a83810a7085a"), - ContactId = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(131), - UserId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") - }, - new - { - Id = new Guid("bc29498b-3f67-4474-9dd0-c2453ad29c23"), - ContactId = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(132), - UserId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") - }, - new - { - Id = new Guid("a04e5de0-74c2-468b-b19b-1c1e8fa2d307"), - ContactId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(133), - UserId = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") - }, - new - { - Id = new Guid("21765bdd-964f-4e62-bddd-a61daae327e0"), - ContactId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(136), - UserId = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") - }, - new - { - Id = new Guid("82e1696c-c1c0-49c5-8c03-9669271301f1"), - ContactId = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(137), - UserId = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") - }, - new - { - Id = new Guid("c993ae38-e4e4-4be0-a4a3-40625bd8a111"), - ContactId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(144), - UserId = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") - }, - new - { - Id = new Guid("43b6da58-938e-4507-940a-842aaae4d38c"), - ContactId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(145), - UserId = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") - }, - new - { - Id = new Guid("bb779603-e891-43aa-9a6a-4e702de5e5fa"), - ContactId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(146), - UserId = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") - }, - new - { - Id = new Guid("f829ac53-0222-444b-bb2b-af28004738dd"), - ContactId = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(147), - UserId = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") - }, - new - { - Id = new Guid("1a08df11-cfe5-4fae-b513-9a606d71bb11"), - ContactId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(148), - UserId = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") - }, - new - { - Id = new Guid("eab44d50-e986-4f67-bafe-66f6d0423d92"), - ContactId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(149), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") - }, - new - { - Id = new Guid("38004d6d-baba-4ef7-841c-264c1093628b"), - ContactId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(151), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("7369cc3f-1348-4cb7-9826-d1332e515527"), - ContactId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(152), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("bab3130a-f362-4cbb-8751-e8a1e1e49842"), - ContactId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(153), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("eea9179e-cc11-4407-a717-eef258945a8a"), - ContactId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(154), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("1f5d595d-9c48-4638-9245-8c848334ebc6"), - ContactId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(155), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("d898a1a8-5782-4396-9bd0-a8a8a88f5825"), - ContactId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(156), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") - }, - new - { - Id = new Guid("5f38374f-8f78-4bad-a89f-11a17ab69a37"), - ContactId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(157), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") - }); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.UserEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("AccessFailedCount") - .HasColumnType("int"); - - b.Property("Bio") - .HasColumnType("nvarchar(max)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("nvarchar(max)"); - - b.Property("DisplayName") - .HasColumnType("nvarchar(max)"); - - b.Property("DisplayNameColour") - .HasColumnType("int"); - - b.Property("Email") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("EmailConfirmed") - .HasColumnType("bit"); - - b.Property("Image") - .HasColumnType("nvarchar(max)"); - - b.Property("LockoutEnabled") - .HasColumnType("bit"); - - b.Property("LockoutEnd") - .HasColumnType("datetimeoffset"); - - b.Property("NormalizedEmail") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("NormalizedUserName") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("PasswordHash") - .HasColumnType("nvarchar(max)"); - - b.Property("PhoneNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("PhoneNumberConfirmed") - .HasColumnType("bit"); - - b.Property("SecurityStamp") - .HasColumnType("nvarchar(max)"); - - b.Property("TwoFactorEnabled") - .HasColumnType("bit"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("UserNameChanged") - .HasColumnType("bit"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedEmail") - .HasDatabaseName("EmailIndex"); - - b.HasIndex("NormalizedUserName") - .IsUnique() - .HasDatabaseName("UserNameIndex") - .HasFilter("[NormalizedUserName] IS NOT NULL"); - - b.ToTable("UserEntity", "mango"); - - b.HasData( - new - { - Id = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), - AccessFailedCount = 0, - Bio = "13 y. o. | C# pozer, Hearts Of Iron IV noob", - ConcurrencyStamp = "07a80b1b-a290-47ef-bd9f-b859566c40fb", - DisplayName = "Khachatur Khachatryan", - DisplayNameColour = 6, - Email = "xachulxx@gmail.com", - EmailConfirmed = true, - Image = "khachatur_picture.jpg", - LockoutEnabled = false, - NormalizedEmail = "XACHULXX@GMAIL.COM", - PasswordHash = "AQAAAAEAACcQAAAAEH4Y6emlTrY/qD9r0wVIdPr+jMlEg5UQFWo3B2ml+WV3a+V/US0Qz0QYD2Wb8UFWHQ==", - PhoneNumber = "374775554310", - PhoneNumberConfirmed = true, - TwoFactorEnabled = false, - UserName = "KHACHATUR228", - UserNameChanged = false - }, - new - { - Id = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - AccessFailedCount = 0, - Bio = "11011 y.o Dotnet Developer from $\"{cityName}\"", - ConcurrencyStamp = "64e5c929-f9ed-4729-b7b4-e875fdb5ba35", - DisplayName = "razumovsky r", - DisplayNameColour = 9, - Email = "kolosovp95@gmail.com", - EmailConfirmed = true, - Image = "razumovsky_picture.jpg", - LockoutEnabled = false, - NormalizedEmail = "KOLOSOVP94@GMAIL.COM", - PasswordHash = "AQAAAAEAACcQAAAAEABxyhRnIA/HR4Y/+qhG20spWL/A1Os1b4cduWfjrZqzPRxM+/l5if53Ox1JfnHOXA==", - PhoneNumber = "48743615532", - PhoneNumberConfirmed = true, - TwoFactorEnabled = false, - UserName = "razumovsky_r", - UserNameChanged = false - }, - new - { - Id = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), - AccessFailedCount = 0, - Bio = "Колбасятор.", - ConcurrencyStamp = "2cfcf039-ae5f-4fde-bc6f-d91277f51197", - DisplayName = "Мусяка Колбасяка", - DisplayNameColour = 5, - Email = "kolbasator@gmail.com", - EmailConfirmed = true, - Image = "musyaka_picture.jpg", - LockoutEnabled = false, - NormalizedEmail = "KOLBASATOR@GMAIL.COM", - PasswordHash = "AQAAAAEAACcQAAAAEOPQ96FosJ5yyTEz+R7nTveBD8Zj45H+STyCI4g6pfrED+wta53QLvfpFMXsvK8wQQ==", - PhoneNumber = "77017506265", - PhoneNumberConfirmed = true, - TwoFactorEnabled = false, - UserName = "kolbasator", - UserNameChanged = false - }, - new - { - Id = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), - AccessFailedCount = 0, - Bio = "Дипломат", - ConcurrencyStamp = "49141190-8cf4-4c9d-a73c-7ba8a4ee5637", - DisplayName = "Amelit", - DisplayNameColour = 4, - Email = "amelit@gmail.com", - EmailConfirmed = true, - Image = "amelit_picture.jpg", - LockoutEnabled = false, - NormalizedEmail = "AMELIT@GMAIL.COM", - PasswordHash = "AQAAAAEAACcQAAAAEBBjGV/32Rdf8yWrUGiS0PWeDqlQM8moKN2AQ25FXKES/LVxLkGBGTWLI8KGXmxaWw==", - PhoneNumber = "12025550152", - PhoneNumberConfirmed = true, - TwoFactorEnabled = false, - UserName = "TheMoonlightSonata", - UserNameChanged = false - }, - new - { - Id = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), - AccessFailedCount = 0, - Bio = "Third year student of WSB at Poznan", - ConcurrencyStamp = "e3aac790-6e45-4257-8714-5fb83202ffc4", - DisplayName = "Petro Kolosov", - DisplayNameColour = 1, - Email = "petro.kolosov@wp.pl", - EmailConfirmed = true, - Image = "razumovsky_picture.jpg", - LockoutEnabled = false, - NormalizedEmail = "PETRO.KOLOSOV@WP.PL", - PasswordHash = "AQAAAAEAACcQAAAAEF65OsfiGeZX6vlIi3QgRn6kKWaJ3GaiyF99v5amR4qZ7HaPkk/fYuxXuO+Jt24E8g==", - PhoneNumber = "48743615532", - PhoneNumberConfirmed = true, - TwoFactorEnabled = false, - UserName = "petro.kolosov", - UserNameChanged = false - }, - new - { - Id = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), - AccessFailedCount = 0, - Bio = "Teacher of Computer Science at WSB Poznan", - ConcurrencyStamp = "f4113452-21a9-47d9-bf3f-7c9f12c6d606", - DisplayName = "Szymon Murawski", - DisplayNameColour = 7, - Email = "szymon.murawski@wp.pl", - EmailConfirmed = true, - Image = "szymon_picture.png", - LockoutEnabled = false, - NormalizedEmail = "SZYMON.MURAWSKI@WP.PL", - PasswordHash = "AQAAAAEAACcQAAAAEIMMC/eudhJER8IMwet1K/CpkaZchLCy7l5iwfOP3JgPZ8LmmJS3VS2uoRNkd51S3g==", - PhoneNumber = "48743615532", - PhoneNumberConfirmed = true, - TwoFactorEnabled = false, - UserName = "szymon.murawski", - UserNameChanged = false - }, - new - { - Id = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), - AccessFailedCount = 0, - Bio = "Third year student of WSB at Poznan", - ConcurrencyStamp = "6f589714-f982-4c27-92aa-780a7cfb0765", - DisplayName = "Illia Zubachov", - DisplayNameColour = 10, - Email = "illia.zubachov@wp.pl", - EmailConfirmed = true, - Image = "illia_picture.png", - LockoutEnabled = false, - NormalizedEmail = "ILLIA.ZUBACHOW@WP.PL", - PasswordHash = "AQAAAAEAACcQAAAAENn4b3kmg7enwkvttBPqmkCO/a41U6IMVj/ZhEZp+lS7zDrMYx8Yz5jauc9pBPhjLQ==", - PhoneNumber = "48352643123", - PhoneNumberConfirmed = true, - TwoFactorEnabled = false, - UserName = "illia.zubachov", - UserNameChanged = false - }, - new - { - Id = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), - AccessFailedCount = 0, - Bio = "Third year student of WSB at Poznan", - ConcurrencyStamp = "a214f8ec-40e8-4204-be6a-4f40a792d72b", - DisplayName = "Arslanbek Temirbekov", - DisplayNameColour = 2, - Email = "arslanbek.temirbekov@wp.pl", - EmailConfirmed = true, - Image = "arslan_picture.png", - LockoutEnabled = false, - NormalizedEmail = "ARSLANBEK.TEMIRBEKOV@WP.PL", - PasswordHash = "AQAAAAEAACcQAAAAEKtadrp8PMU9vk6Y+t9XQPeUoEpU4zSs6PDQdrnsiDKi8yjOmqliUt2SZMlNEHqtOQ==", - PhoneNumber = "48278187781", - PhoneNumberConfirmed = true, - TwoFactorEnabled = false, - UserName = "arslanbek.temirbekov", - UserNameChanged = false - }, - new - { - Id = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), - AccessFailedCount = 0, - Bio = "Third year student of WSB at Poznan", - ConcurrencyStamp = "0a160bc7-0ca1-4104-a97b-e85b3069fafc", - DisplayName = "Serhii Holishevskii", - DisplayNameColour = 8, - Email = "serhii.holishevskii@wp.pl", - EmailConfirmed = true, - Image = "serhii_picture.png", - LockoutEnabled = false, - NormalizedEmail = "SERHII.HOLISHEVSKII@WP.PL", - PasswordHash = "AQAAAAEAACcQAAAAEAL5LUypbP+sH34nbd2xf7DWaas2Fplrj/V9MRJ/J2l56sYEOMMp8GeajO+fq42i6g==", - PhoneNumber = "48175481653", - PhoneNumberConfirmed = true, - TwoFactorEnabled = false, - UserName = "serhii.holishevskii", - UserNameChanged = false - }); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.UserInformationEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("Address") - .HasColumnType("nvarchar(max)"); - - b.Property("BirthDay") - .HasColumnType("datetime2"); - - b.Property("CreatedAt") - .HasColumnType("datetime2"); - - b.Property("Facebook") - .HasColumnType("nvarchar(max)"); - - b.Property("Instagram") - .HasColumnType("nvarchar(max)"); - - b.Property("LinkedIn") - .HasColumnType("nvarchar(max)"); - - b.Property("ProfilePicture") - .HasColumnType("nvarchar(max)"); - - b.Property("Twitter") - .HasColumnType("nvarchar(max)"); - - b.Property("UpdatedAt") - .HasColumnType("datetime2"); - - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.Property("Website") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("UserId") - .IsUnique(); - - b.ToTable("UserInformationEntity", "mango"); - - b.HasData( - new - { - Id = new Guid("78abac19-6d5d-4ec7-88c3-9bf3377f729d"), - Address = "Poznan, Poland", - BirthDay = new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2652), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2656), - Facebook = "petro.kolosov", - Instagram = "petro.kolosov", - LinkedIn = "petro.kolosov", - Twitter = "petro.kolosov", - UpdatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2655), - UserId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), - Website = "petro.kolosov.com" - }, - new - { - Id = new Guid("3a670908-ef44-4f5e-b798-833ad41e0fa4"), - Address = "Poznan, Poland", - BirthDay = new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2659), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2660), - Facebook = "illia.zubachov", - Instagram = "illia.zubachov", - LinkedIn = "illia.zubachov", - Twitter = "illia.zubachov", - UpdatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2659), - UserId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), - Website = "illia.zubachov.com" - }, - new - { - Id = new Guid("4808ba6f-8f9d-4287-8065-cb8f47a26e61"), - Address = "Poznan, Poland", - BirthDay = new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2661), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2662), - Facebook = "serhii.holishevskii", - Instagram = "serhii.holishevskii", - LinkedIn = "serhii.holishevskii", - Twitter = "serhii.holishevskii", - UpdatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2662), - UserId = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), - Website = "serhii.holishevskii.com" - }, - new - { - Id = new Guid("d35b5b3a-2ea2-4550-80bf-55bb74068047"), - Address = "Poznan, Poland", - BirthDay = new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2664), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2664), - Facebook = "arslan.temirbekov", - Instagram = "arslan.temirbekov", - LinkedIn = "arslan.temirbekov", - Twitter = "arslan.temirbekov", - UpdatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2664), - UserId = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), - Website = "arslan.temirbekov.com" - }, - new - { - Id = new Guid("88617cff-ebb1-47b5-baf9-543c2dbebf7a"), - Address = "Poznan, Poland", - BirthDay = new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2666), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2666), - Facebook = "szymon.murawski", - Instagram = "szymon.murawski", - LinkedIn = "szymon.murawski", - Twitter = "szymon.murawski", - UpdatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2666), - UserId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), - Website = "szymon.murawski.com" - }, - new - { - Id = new Guid("373fdd53-4ca1-4ec3-876e-73977cab1d6c"), - Address = "Moscow, Russia", - BirthDay = new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2672), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2673), - Instagram = "khachapur.mudrenych", - LinkedIn = "khachapur.mudrenych", - UpdatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2673), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), - Website = "khachapur.com" - }, - new - { - Id = new Guid("873b6cab-9c7b-4f3c-b69a-c56d5b6d0910"), - Address = "Odessa, Ukraine", - BirthDay = new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2675), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2676), - Facebook = "razumovsky_r", - Instagram = "razumovsky_r", - LinkedIn = "razumovsky_r", - Twitter = "razumovsky_r", - UpdatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2675), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - Website = "razumovsky.com" - }, - new - { - Id = new Guid("2353df10-362c-4d25-a80d-463061c448f6"), - Address = "Saint-Petersburg, Russia", - BirthDay = new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2677), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2678), - Facebook = "kolbasator", - ProfilePicture = "profile.png", - UpdatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2677), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), - Website = "kolbasator.com" - }, - new - { - Id = new Guid("40112876-1179-48c5-bb9d-93a51f8a9a0a"), - Address = "Moscow, Russia", - BirthDay = new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2679), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2680), - Facebook = "TheMoonlightSonata", - Instagram = "TheMoonlightSonata", - Twitter = "TheMoonlightSonata", - UpdatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2680), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") - }); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1); - - b.Property("ClaimType") - .HasColumnType("nvarchar(max)"); - - b.Property("ClaimValue") - .HasColumnType("nvarchar(max)"); - - b.Property("RoleId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetRoleClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1); - - b.Property("ClaimType") - .HasColumnType("nvarchar(max)"); - - b.Property("ClaimValue") - .HasColumnType("nvarchar(max)"); - - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.Property("LoginProvider") - .HasColumnType("nvarchar(450)"); - - b.Property("ProviderKey") - .HasColumnType("nvarchar(450)"); - - b.Property("ProviderDisplayName") - .HasColumnType("nvarchar(max)"); - - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("LoginProvider", "ProviderKey"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserLogins", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.Property("RoleId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetUserRoles", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.Property("LoginProvider") - .HasColumnType("nvarchar(450)"); - - b.Property("Name") - .HasColumnType("nvarchar(450)"); - - b.Property("Value") - .HasColumnType("nvarchar(max)"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AspNetUserTokens", (string)null); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.DocumentEntity", b => - { - b.HasOne("MangoAPI.Domain.Entities.UserEntity", "User") - .WithMany("Documents") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("User"); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.MessageEntity", b => - { - b.HasOne("MangoAPI.Domain.Entities.ChatEntity", "Chat") - .WithMany("Messages") - .HasForeignKey("ChatId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("MangoAPI.Domain.Entities.UserEntity", "User") - .WithMany("Messages") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Chat"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.SessionEntity", b => - { - b.HasOne("MangoAPI.Domain.Entities.UserEntity", "UserEntity") - .WithMany("Sessions") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("UserEntity"); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.UserChatEntity", b => - { - b.HasOne("MangoAPI.Domain.Entities.ChatEntity", "Chat") - .WithMany("ChatUsers") - .HasForeignKey("ChatId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("MangoAPI.Domain.Entities.UserEntity", "User") - .WithMany("UserChats") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Chat"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.UserContactEntity", b => - { - b.HasOne("MangoAPI.Domain.Entities.UserEntity", "User") - .WithMany("Contacts") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("User"); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.UserInformationEntity", b => - { - b.HasOne("MangoAPI.Domain.Entities.UserEntity", "User") - .WithOne("UserInformation") - .HasForeignKey("MangoAPI.Domain.Entities.UserInformationEntity", "UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("User"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.HasOne("MangoAPI.Domain.Entities.RoleEntity", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.HasOne("MangoAPI.Domain.Entities.UserEntity", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.HasOne("MangoAPI.Domain.Entities.UserEntity", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.HasOne("MangoAPI.Domain.Entities.RoleEntity", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("MangoAPI.Domain.Entities.UserEntity", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.HasOne("MangoAPI.Domain.Entities.UserEntity", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.ChatEntity", b => - { - b.Navigation("ChatUsers"); - - b.Navigation("Messages"); - }); - - modelBuilder.Entity("MangoAPI.Domain.Entities.UserEntity", b => - { - b.Navigation("Contacts"); - - b.Navigation("Documents"); - - b.Navigation("Messages"); - - b.Navigation("Sessions"); - - b.Navigation("UserChats"); - - b.Navigation("UserInformation"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/MangoAPI.Infrastructure/Migrations/20230311151701_MessageEntityFileName.cs b/MangoAPI.Infrastructure/Migrations/20230311151701_MessageEntityFileName.cs deleted file mode 100644 index 826733e07..000000000 --- a/MangoAPI.Infrastructure/Migrations/20230311151701_MessageEntityFileName.cs +++ /dev/null @@ -1,1372 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace MangoAPI.Infrastructure.Migrations -{ - public partial class MessageEntityFileName : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("083ae74e-cc48-418f-bae2-68bfa40ef954")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("0f78dc38-1130-4aa3-8e64-9ae1cff06e5c")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("1316dc52-609b-4b4c-8f5e-806a63ae23cc")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("14e38cec-9517-4c67-8588-f313e2f1f096")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("15f3535c-4b5e-4e61-9624-d06e48ae52a3")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("1e2aa65a-ea50-45e6-b635-bf624420f33b")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("23d80548-e6d3-4568-8a6a-39ce91703ffd")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("3cc9fbe4-d28c-454c-9525-faa3303373c0")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("3f039761-888a-4260-8799-ca1934d57a59")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("440e86f1-428c-4e17-93e0-848b08ff6a5f")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("450cdb09-60c0-44c6-ade1-f01a2b41facf")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("5d656493-9013-47d6-825e-ccaf68c40903")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("5ece7665-cf32-466f-9c85-9bfad2425f99")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("6105b6f9-e477-41aa-88b8-039bdeaa583a")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("6523ded5-2f62-4c99-81f0-dabed282a240")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("65711f3c-23f0-4248-95a3-39e049de3f9d")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("665bf20f-1858-4348-b978-cbd46dc7aba0")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("7be95880-3a66-4f4f-9a0d-eeff91445401")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("814c8420-b4e2-4427-93b8-75ba2a94b8d3")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("87e2acd4-f36b-4fb9-93e9-05fdcb2c88b5")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("8b4e0084-067d-4ffe-a824-2e9bf55009d9")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("8c9b90a6-9164-4a5c-90b3-c91360cf6a88")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("a2bd7bc3-50ff-4068-b38b-36265e7e1243")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("b752abe4-3f2c-4bc8-8c68-666369b45a8c")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("bd5e204b-99e1-408a-b582-706666918ad4")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("c2a37a7e-ff5c-4699-a343-2ce2e46be5b7")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("c7c9066d-86b2-4853-a8da-fa65ed576c1a")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("da8e21d5-16fb-4dfd-b3f9-dbb7db4dba13")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("dc01f074-a9d2-4ea2-8a8b-64f6811f51df")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("e6a14cf9-ce64-4df2-bd31-9d92283d5727")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("e94318bf-d787-45f2-b3bf-fad650fee75c")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("006be3e9-7bef-45a0-b532-4fafb4db2dc3")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("19899c12-fbfa-48d0-82ec-18d45e1eb6d9")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("1cfa7869-1ae5-476f-90da-64f6a10a0124")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("1dd9d62f-92c4-4ea9-ad63-1803856d3294")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("294217ea-2170-4417-92b6-efbf9dd7f00a")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("415ee633-e418-41d9-96ca-2d6e0aabd128")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("4477dbc9-fee5-4710-b0b1-469d0f6af73a")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("45730db3-105b-4166-b257-70d3e4099bca")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("4fcda455-e931-4031-a764-759a9378f2a1")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("5169ff97-b2d0-4c1f-9dd9-d65edb8a5dfb")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("56310a3a-c427-4fe6-82ea-c2f4051654b2")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("58f4dcab-6889-418f-8687-86d285b75149")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("5a74c334-9d71-4f36-b311-cf1cee4990bb")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("5b62e0b8-c8e8-410d-bee1-f3602626a87b")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("5c6773aa-b60a-4c4a-9435-6f9f51570c86")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("6d523966-629f-475e-9849-607aea0f1205")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("7177b007-6621-4c41-9a11-94016d42a49d")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("729a8579-2b84-45b3-8dac-bcf1a757aa20")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("7c7f7a86-3e0a-4683-81be-a5fc70389ad5")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("81dc8b8f-3a02-4e97-a5d4-68765ac4cac4")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("86ed0f1d-71af-4e45-a88b-bc4b64f46ed8")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("95bafb20-1569-414b-aaa4-7865f143a497")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("c80b971f-3231-4448-9faa-88a375cb49d9")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("db1e25d0-98e2-44a4-87e4-11b00e387b41")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("dccc06fd-eb6c-4d92-8e2b-21c8b91db59a")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("e4e77b57-54e4-4344-9a95-b9d0d9f48547")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("e7359601-6e5e-42bb-91cd-7c5e93c3f73e")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("f68d3679-246f-45a5-ad16-5927d3263de5")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserInformationEntity", - keyColumn: "Id", - keyValue: new Guid("07356a86-e915-42fb-9013-eb7e74334601")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserInformationEntity", - keyColumn: "Id", - keyValue: new Guid("21f01e34-ff46-4b17-929a-1b59b2ef910f")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserInformationEntity", - keyColumn: "Id", - keyValue: new Guid("587d09c6-7cd1-41a0-bee9-fec14f55fb7f")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserInformationEntity", - keyColumn: "Id", - keyValue: new Guid("9eb02f2c-0634-420d-87ce-dfe3113172b7")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserInformationEntity", - keyColumn: "Id", - keyValue: new Guid("be0733f1-3a62-4c0d-97b8-fd8f510d40af")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserInformationEntity", - keyColumn: "Id", - keyValue: new Guid("c7aed1e8-c385-43c9-9241-c5668ae0385f")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserInformationEntity", - keyColumn: "Id", - keyValue: new Guid("ddb7008d-6c11-4503-91ef-3cdada4d83e0")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserInformationEntity", - keyColumn: "Id", - keyValue: new Guid("e4d11b30-fe6d-44bf-9d3b-f5a717b77319")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserInformationEntity", - keyColumn: "Id", - keyValue: new Guid("f1672ff5-fab9-422c-856d-da0f7ae77bea")); - - migrationBuilder.RenameColumn( - name: "Attachment", - schema: "mango", - table: "MessageEntity", - newName: "AttachmentFileName"); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2717), new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2719), new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2718) }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("3fce8b2c-252d-4514-a1bb-fbdf73c47b78"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2732), new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2733), new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2733) }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2720), new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2721), new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2721) }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2724), new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2725), new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2724) }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("9f205dde-0ddc-401f-8fe9-6c794b661f5d"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2731), new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2732), new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2731) }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("b119914a-6d95-4047-bf8a-db27deeb7dc9"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2729), new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2730), new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2729) }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2711), new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2716), new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2713) }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2722), new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2723), new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2722) }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("f5b7824f-e52b-4246-9984-06fc8e964f0c"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2725), new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2727), new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2726) }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("f8729a12-5746-443f-ad31-378d846fce30"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2727), new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2728), new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2728) }); - - migrationBuilder.InsertData( - schema: "mango", - table: "MessageEntity", - columns: new[] { "Id", "AttachmentFileName", "ChatId", "Content", "CreatedAt", "InReplayToAuthor", "InReplayToText", "UpdatedAt", "UserId" }, - values: new object[,] - { - { new Guid("0105b31a-ba61-41c8-a257-5fb0011ca6ed"), null, new Guid("9f205dde-0ddc-401f-8fe9-6c794b661f5d"), "Hello World", new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6390), null, null, null, new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") }, - { new Guid("08dbb138-829f-4790-870f-40ddf22eb94b"), null, new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), "Hello guys, how your diploma project goes?", new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6337), null, null, null, new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") }, - { new Guid("0e016aa7-2570-4576-83b9-50dd0901ef29"), null, new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), "C# The Best", new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6358), null, null, null, new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") }, - { new Guid("0e1b34ba-78b0-4ae8-8840-4003a4c8be97"), null, new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), "Hello World", new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6381), null, null, null, new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") }, - { new Guid("10294c17-9c23-4a28-b2c3-8e55c212e548"), null, new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), "TypeScript The Best", new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6359), null, null, null, new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") }, - { new Guid("11428540-b134-4e20-9082-8cde30ccc43a"), null, new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), "Great! Good luck to all of you", new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6355), null, null, null, new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") }, - { new Guid("1341a7ed-70c1-4b2e-adba-27d6704289e5"), null, new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), "Слава Партии!!", new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6372), null, null, null, new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") }, - { new Guid("19e642d7-8c05-451d-927f-b2d5c293bfc2"), null, new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), "Hi teacher, I perform QA of the current version", new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6341), null, null, null, new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") }, - { new Guid("364d08a7-ba5d-4708-a991-99cec7a8e254"), null, new Guid("f8729a12-5746-443f-ad31-378d846fce30"), "Hello World", new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6386), null, null, null, new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("3c0c34be-ee09-4b00-9c4d-147fcfbfdbd4"), null, new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), "Hello World", new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6378), null, null, null, new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("47aff891-5254-40c7-b706-489106ce81a7"), null, new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), "Hello World", new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6373), null, null, null, new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") }, - { new Guid("49497e7c-b819-4960-ae9a-cd9f995a620d"), null, new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), "Слава Партии!!", new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6362), null, null, null, new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("4fef0fcd-21c7-4b67-9ff4-8f54bba05cb6"), null, new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), "Hello World", new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6382), null, null, null, new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") }, - { new Guid("5ea2c650-6382-478d-be44-c7c260b6d98d"), null, new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), "Well, I'm doing UI/UX part of the project", new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6339), null, null, null, new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") }, - { new Guid("63002292-fce5-4423-9310-03fe7314e1c5"), null, new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), "I work with backend too...", new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6353), null, null, null, new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") }, - { new Guid("70a4e5a5-303f-4060-b3ee-9f893575517a"), null, new Guid("9f205dde-0ddc-401f-8fe9-6c794b661f5d"), "Hello World", new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6391), null, null, null, new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") }, - { new Guid("8037b41d-63a8-4a1f-b464-3310a0b7be47"), null, new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), "F# The Best", new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6357), null, null, null, new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("820f9073-c741-4560-875c-6b50537b1425"), null, new Guid("f5b7824f-e52b-4246-9984-06fc8e964f0c"), "Hello World", new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6383), null, null, null, new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") }, - { new Guid("888194fe-d407-492f-ba40-c74b2f4206ba"), null, new Guid("b119914a-6d95-4047-bf8a-db27deeb7dc9"), "Hello World", new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6387), null, null, null, new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") }, - { new Guid("913c9dc0-1a09-4904-b3e2-c7c70522ec34"), null, new Guid("3fce8b2c-252d-4514-a1bb-fbdf73c47b78"), "Hi teacher", new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6392), null, null, null, new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") }, - { new Guid("97fe67d2-396d-43e8-804a-c6b61b92fe15"), null, new Guid("f8729a12-5746-443f-ad31-378d846fce30"), "Hello World", new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6385), null, null, null, new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") }, - { new Guid("a50f577e-cf40-4705-9422-2346ae9a1512"), null, new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), "Hello World", new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6377), null, null, null, new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") }, - { new Guid("a9981f4e-cd57-48f5-85d4-505e51f8ea83"), null, new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), "Слава Партии!!", new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6371), null, null, null, new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") }, - { new Guid("c004bf75-a1b1-4d5a-8775-921757c43ba1"), null, new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), "Слава Партии!!", new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6361), null, null, null, new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") }, - { new Guid("c378cef2-599e-4756-b98e-0c9c7c466882"), null, new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), "Greetings. I currently workout the back-end part", new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6342), null, null, null, new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") }, - { new Guid("da770aea-85ef-44cb-b7cb-a168f3c74106"), null, new Guid("b119914a-6d95-4047-bf8a-db27deeb7dc9"), "Hello World", new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6388), null, null, null, new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("f38e06fe-f6fe-41b4-912a-8ab06a3ac4c1"), null, new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), "Hello World", new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6357), null, null, null, new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") }, - { new Guid("f3a1170d-84fe-4586-a6f1-14977ec8bd1b"), null, new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), "Hello World", new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6374), null, null, null, new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("fa484a5f-06c8-44a0-b1ad-753b6d198ad5"), null, new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), "Hello World", new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6376), null, null, null, new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") }, - { new Guid("fc924fc7-ac8c-4a85-9526-b49907766a3f"), null, new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), "Hello World", new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6375), null, null, null, new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") }, - { new Guid("fe4c9a26-330f-4587-adbd-e1ff642dd5c1"), null, new Guid("f5b7824f-e52b-4246-9984-06fc8e964f0c"), "Hello World", new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6384), null, null, null, new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") } - }); - - migrationBuilder.InsertData( - schema: "mango", - table: "UserContactEntity", - columns: new[] { "Id", "ContactId", "CreatedAt", "UserId" }, - values: new object[] { new Guid("1a08df11-cfe5-4fae-b513-9a606d71bb11"), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(148), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") }); - - migrationBuilder.InsertData( - schema: "mango", - table: "UserContactEntity", - columns: new[] { "Id", "ContactId", "CreatedAt", "UserId" }, - values: new object[,] - { - { new Guid("1f5d595d-9c48-4638-9245-8c848334ebc6"), new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(155), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("2130e631-caec-40a7-8a99-565e6d4f0b2c"), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(130), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") }, - { new Guid("21765bdd-964f-4e62-bddd-a61daae327e0"), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(136), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") }, - { new Guid("30436ffa-510e-46f6-bae9-41d57bbff811"), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(127), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") }, - { new Guid("38004d6d-baba-4ef7-841c-264c1093628b"), new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(151), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("43b6da58-938e-4507-940a-842aaae4d38c"), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(145), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") }, - { new Guid("46c930ab-b6d9-479f-ae41-0f0f6ed3d046"), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(127), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") }, - { new Guid("5f38374f-8f78-4bad-a89f-11a17ab69a37"), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(157), new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") }, - { new Guid("70e1af12-7dea-4be9-9a59-498c5a4fc7b7"), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(117), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") }, - { new Guid("7369cc3f-1348-4cb7-9826-d1332e515527"), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(152), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("82e1696c-c1c0-49c5-8c03-9669271301f1"), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(137), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") }, - { new Guid("845bf9a1-ea0a-4e74-98c0-e8ba6f05d79a"), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(115), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") }, - { new Guid("a04e5de0-74c2-468b-b19b-1c1e8fa2d307"), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(133), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") }, - { new Guid("b0953e09-00ce-4789-9810-077fc179f10d"), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(120), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") }, - { new Guid("b2f445c3-108a-4a45-97f1-c8efc23b28c1"), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(121), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") }, - { new Guid("bab3130a-f362-4cbb-8751-e8a1e1e49842"), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(153), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("bb779603-e891-43aa-9a6a-4e702de5e5fa"), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(146), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") }, - { new Guid("bc29498b-3f67-4474-9dd0-c2453ad29c23"), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(132), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") }, - { new Guid("c993ae38-e4e4-4be0-a4a3-40625bd8a111"), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(144), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") }, - { new Guid("d61aba3f-5085-4d51-a6cb-ed561f5aee16"), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(128), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") }, - { new Guid("d898a1a8-5782-4396-9bd0-a8a8a88f5825"), new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(156), new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") }, - { new Guid("e095810c-16a9-48c4-bb8f-a83810a7085a"), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(131), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") }, - { new Guid("e56d6db4-533e-4884-bc93-67f18059c8b1"), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(129), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") }, - { new Guid("e7fd2b89-5d61-4a06-b312-12b6986b8d09"), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(119), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") }, - { new Guid("eab44d50-e986-4f67-bafe-66f6d0423d92"), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(149), new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") }, - { new Guid("eea9179e-cc11-4407-a717-eef258945a8a"), new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(154), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("f829ac53-0222-444b-bb2b-af28004738dd"), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(147), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") } - }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "UserEntity", - keyColumn: "Id", - keyValue: new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), - columns: new[] { "ConcurrencyStamp", "PasswordHash" }, - values: new object[] { "e3aac790-6e45-4257-8714-5fb83202ffc4", "AQAAAAEAACcQAAAAEF65OsfiGeZX6vlIi3QgRn6kKWaJ3GaiyF99v5amR4qZ7HaPkk/fYuxXuO+Jt24E8g==" }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "UserEntity", - keyColumn: "Id", - keyValue: new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), - columns: new[] { "ConcurrencyStamp", "PasswordHash" }, - values: new object[] { "a214f8ec-40e8-4204-be6a-4f40a792d72b", "AQAAAAEAACcQAAAAEKtadrp8PMU9vk6Y+t9XQPeUoEpU4zSs6PDQdrnsiDKi8yjOmqliUt2SZMlNEHqtOQ==" }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "UserEntity", - keyColumn: "Id", - keyValue: new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), - columns: new[] { "ConcurrencyStamp", "PasswordHash" }, - values: new object[] { "2cfcf039-ae5f-4fde-bc6f-d91277f51197", "AQAAAAEAACcQAAAAEOPQ96FosJ5yyTEz+R7nTveBD8Zj45H+STyCI4g6pfrED+wta53QLvfpFMXsvK8wQQ==" }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "UserEntity", - keyColumn: "Id", - keyValue: new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), - columns: new[] { "ConcurrencyStamp", "PasswordHash" }, - values: new object[] { "f4113452-21a9-47d9-bf3f-7c9f12c6d606", "AQAAAAEAACcQAAAAEIMMC/eudhJER8IMwet1K/CpkaZchLCy7l5iwfOP3JgPZ8LmmJS3VS2uoRNkd51S3g==" }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "UserEntity", - keyColumn: "Id", - keyValue: new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), - columns: new[] { "ConcurrencyStamp", "PasswordHash" }, - values: new object[] { "6f589714-f982-4c27-92aa-780a7cfb0765", "AQAAAAEAACcQAAAAENn4b3kmg7enwkvttBPqmkCO/a41U6IMVj/ZhEZp+lS7zDrMYx8Yz5jauc9pBPhjLQ==" }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "UserEntity", - keyColumn: "Id", - keyValue: new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), - columns: new[] { "ConcurrencyStamp", "PasswordHash" }, - values: new object[] { "0a160bc7-0ca1-4104-a97b-e85b3069fafc", "AQAAAAEAACcQAAAAEAL5LUypbP+sH34nbd2xf7DWaas2Fplrj/V9MRJ/J2l56sYEOMMp8GeajO+fq42i6g==" }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "UserEntity", - keyColumn: "Id", - keyValue: new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), - columns: new[] { "ConcurrencyStamp", "PasswordHash" }, - values: new object[] { "49141190-8cf4-4c9d-a73c-7ba8a4ee5637", "AQAAAAEAACcQAAAAEBBjGV/32Rdf8yWrUGiS0PWeDqlQM8moKN2AQ25FXKES/LVxLkGBGTWLI8KGXmxaWw==" }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "UserEntity", - keyColumn: "Id", - keyValue: new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), - columns: new[] { "ConcurrencyStamp", "PasswordHash" }, - values: new object[] { "07a80b1b-a290-47ef-bd9f-b859566c40fb", "AQAAAAEAACcQAAAAEH4Y6emlTrY/qD9r0wVIdPr+jMlEg5UQFWo3B2ml+WV3a+V/US0Qz0QYD2Wb8UFWHQ==" }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "UserEntity", - keyColumn: "Id", - keyValue: new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - columns: new[] { "ConcurrencyStamp", "PasswordHash" }, - values: new object[] { "64e5c929-f9ed-4729-b7b4-e875fdb5ba35", "AQAAAAEAACcQAAAAEABxyhRnIA/HR4Y/+qhG20spWL/A1Os1b4cduWfjrZqzPRxM+/l5if53Ox1JfnHOXA==" }); - - migrationBuilder.InsertData( - schema: "mango", - table: "UserInformationEntity", - columns: new[] { "Id", "Address", "BirthDay", "CreatedAt", "Facebook", "Instagram", "LinkedIn", "ProfilePicture", "Twitter", "UpdatedAt", "UserId", "Website" }, - values: new object[,] - { - { new Guid("2353df10-362c-4d25-a80d-463061c448f6"), "Saint-Petersburg, Russia", new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2677), new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2678), "kolbasator", null, null, "profile.png", null, new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2677), new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), "kolbasator.com" }, - { new Guid("373fdd53-4ca1-4ec3-876e-73977cab1d6c"), "Moscow, Russia", new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2672), new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2673), null, "khachapur.mudrenych", "khachapur.mudrenych", null, null, new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2673), new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), "khachapur.com" }, - { new Guid("3a670908-ef44-4f5e-b798-833ad41e0fa4"), "Poznan, Poland", new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2659), new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2660), "illia.zubachov", "illia.zubachov", "illia.zubachov", null, "illia.zubachov", new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2659), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), "illia.zubachov.com" }, - { new Guid("40112876-1179-48c5-bb9d-93a51f8a9a0a"), "Moscow, Russia", new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2679), new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2680), "TheMoonlightSonata", "TheMoonlightSonata", null, null, "TheMoonlightSonata", new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2680), new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), null }, - { new Guid("4808ba6f-8f9d-4287-8065-cb8f47a26e61"), "Poznan, Poland", new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2661), new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2662), "serhii.holishevskii", "serhii.holishevskii", "serhii.holishevskii", null, "serhii.holishevskii", new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2662), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), "serhii.holishevskii.com" }, - { new Guid("78abac19-6d5d-4ec7-88c3-9bf3377f729d"), "Poznan, Poland", new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2652), new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2656), "petro.kolosov", "petro.kolosov", "petro.kolosov", null, "petro.kolosov", new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2655), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), "petro.kolosov.com" } - }); - - migrationBuilder.InsertData( - schema: "mango", - table: "UserInformationEntity", - columns: new[] { "Id", "Address", "BirthDay", "CreatedAt", "Facebook", "Instagram", "LinkedIn", "ProfilePicture", "Twitter", "UpdatedAt", "UserId", "Website" }, - values: new object[] { new Guid("873b6cab-9c7b-4f3c-b69a-c56d5b6d0910"), "Odessa, Ukraine", new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2675), new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2676), "razumovsky_r", "razumovsky_r", "razumovsky_r", null, "razumovsky_r", new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2675), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), "razumovsky.com" }); - - migrationBuilder.InsertData( - schema: "mango", - table: "UserInformationEntity", - columns: new[] { "Id", "Address", "BirthDay", "CreatedAt", "Facebook", "Instagram", "LinkedIn", "ProfilePicture", "Twitter", "UpdatedAt", "UserId", "Website" }, - values: new object[] { new Guid("88617cff-ebb1-47b5-baf9-543c2dbebf7a"), "Poznan, Poland", new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2666), new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2666), "szymon.murawski", "szymon.murawski", "szymon.murawski", null, "szymon.murawski", new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2666), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), "szymon.murawski.com" }); - - migrationBuilder.InsertData( - schema: "mango", - table: "UserInformationEntity", - columns: new[] { "Id", "Address", "BirthDay", "CreatedAt", "Facebook", "Instagram", "LinkedIn", "ProfilePicture", "Twitter", "UpdatedAt", "UserId", "Website" }, - values: new object[] { new Guid("d35b5b3a-2ea2-4550-80bf-55bb74068047"), "Poznan, Poland", new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2664), new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2664), "arslan.temirbekov", "arslan.temirbekov", "arslan.temirbekov", null, "arslan.temirbekov", new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2664), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), "arslan.temirbekov.com" }); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("0105b31a-ba61-41c8-a257-5fb0011ca6ed")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("08dbb138-829f-4790-870f-40ddf22eb94b")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("0e016aa7-2570-4576-83b9-50dd0901ef29")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("0e1b34ba-78b0-4ae8-8840-4003a4c8be97")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("10294c17-9c23-4a28-b2c3-8e55c212e548")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("11428540-b134-4e20-9082-8cde30ccc43a")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("1341a7ed-70c1-4b2e-adba-27d6704289e5")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("19e642d7-8c05-451d-927f-b2d5c293bfc2")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("364d08a7-ba5d-4708-a991-99cec7a8e254")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("3c0c34be-ee09-4b00-9c4d-147fcfbfdbd4")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("47aff891-5254-40c7-b706-489106ce81a7")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("49497e7c-b819-4960-ae9a-cd9f995a620d")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("4fef0fcd-21c7-4b67-9ff4-8f54bba05cb6")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("5ea2c650-6382-478d-be44-c7c260b6d98d")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("63002292-fce5-4423-9310-03fe7314e1c5")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("70a4e5a5-303f-4060-b3ee-9f893575517a")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("8037b41d-63a8-4a1f-b464-3310a0b7be47")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("820f9073-c741-4560-875c-6b50537b1425")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("888194fe-d407-492f-ba40-c74b2f4206ba")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("913c9dc0-1a09-4904-b3e2-c7c70522ec34")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("97fe67d2-396d-43e8-804a-c6b61b92fe15")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("a50f577e-cf40-4705-9422-2346ae9a1512")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("a9981f4e-cd57-48f5-85d4-505e51f8ea83")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("c004bf75-a1b1-4d5a-8775-921757c43ba1")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("c378cef2-599e-4756-b98e-0c9c7c466882")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("da770aea-85ef-44cb-b7cb-a168f3c74106")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("f38e06fe-f6fe-41b4-912a-8ab06a3ac4c1")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("f3a1170d-84fe-4586-a6f1-14977ec8bd1b")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("fa484a5f-06c8-44a0-b1ad-753b6d198ad5")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("fc924fc7-ac8c-4a85-9526-b49907766a3f")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "MessageEntity", - keyColumn: "Id", - keyValue: new Guid("fe4c9a26-330f-4587-adbd-e1ff642dd5c1")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("1a08df11-cfe5-4fae-b513-9a606d71bb11")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("1f5d595d-9c48-4638-9245-8c848334ebc6")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("2130e631-caec-40a7-8a99-565e6d4f0b2c")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("21765bdd-964f-4e62-bddd-a61daae327e0")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("30436ffa-510e-46f6-bae9-41d57bbff811")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("38004d6d-baba-4ef7-841c-264c1093628b")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("43b6da58-938e-4507-940a-842aaae4d38c")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("46c930ab-b6d9-479f-ae41-0f0f6ed3d046")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("5f38374f-8f78-4bad-a89f-11a17ab69a37")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("70e1af12-7dea-4be9-9a59-498c5a4fc7b7")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("7369cc3f-1348-4cb7-9826-d1332e515527")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("82e1696c-c1c0-49c5-8c03-9669271301f1")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("845bf9a1-ea0a-4e74-98c0-e8ba6f05d79a")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("a04e5de0-74c2-468b-b19b-1c1e8fa2d307")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("b0953e09-00ce-4789-9810-077fc179f10d")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("b2f445c3-108a-4a45-97f1-c8efc23b28c1")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("bab3130a-f362-4cbb-8751-e8a1e1e49842")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("bb779603-e891-43aa-9a6a-4e702de5e5fa")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("bc29498b-3f67-4474-9dd0-c2453ad29c23")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("c993ae38-e4e4-4be0-a4a3-40625bd8a111")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("d61aba3f-5085-4d51-a6cb-ed561f5aee16")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("d898a1a8-5782-4396-9bd0-a8a8a88f5825")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("e095810c-16a9-48c4-bb8f-a83810a7085a")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("e56d6db4-533e-4884-bc93-67f18059c8b1")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("e7fd2b89-5d61-4a06-b312-12b6986b8d09")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("eab44d50-e986-4f67-bafe-66f6d0423d92")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("eea9179e-cc11-4407-a717-eef258945a8a")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserContactEntity", - keyColumn: "Id", - keyValue: new Guid("f829ac53-0222-444b-bb2b-af28004738dd")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserInformationEntity", - keyColumn: "Id", - keyValue: new Guid("2353df10-362c-4d25-a80d-463061c448f6")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserInformationEntity", - keyColumn: "Id", - keyValue: new Guid("373fdd53-4ca1-4ec3-876e-73977cab1d6c")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserInformationEntity", - keyColumn: "Id", - keyValue: new Guid("3a670908-ef44-4f5e-b798-833ad41e0fa4")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserInformationEntity", - keyColumn: "Id", - keyValue: new Guid("40112876-1179-48c5-bb9d-93a51f8a9a0a")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserInformationEntity", - keyColumn: "Id", - keyValue: new Guid("4808ba6f-8f9d-4287-8065-cb8f47a26e61")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserInformationEntity", - keyColumn: "Id", - keyValue: new Guid("78abac19-6d5d-4ec7-88c3-9bf3377f729d")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserInformationEntity", - keyColumn: "Id", - keyValue: new Guid("873b6cab-9c7b-4f3c-b69a-c56d5b6d0910")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserInformationEntity", - keyColumn: "Id", - keyValue: new Guid("88617cff-ebb1-47b5-baf9-543c2dbebf7a")); - - migrationBuilder.DeleteData( - schema: "mango", - table: "UserInformationEntity", - keyColumn: "Id", - keyValue: new Guid("d35b5b3a-2ea2-4550-80bf-55bb74068047")); - - migrationBuilder.RenameColumn( - name: "AttachmentFileName", - schema: "mango", - table: "MessageEntity", - newName: "Attachment"); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(5934), new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(5958), new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(5943) }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("3fce8b2c-252d-4514-a1bb-fbdf73c47b78"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6193), new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6212), new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6203) }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(5968), new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(5987), new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(5978) }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6031), new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6056), new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6041) }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("9f205dde-0ddc-401f-8fe9-6c794b661f5d"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6163), new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6183), new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6173) }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("b119914a-6d95-4047-bf8a-db27deeb7dc9"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6129), new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6149), new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6139) }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(5895), new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(5924), new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(5909) }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6002), new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6022), new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6012) }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("f5b7824f-e52b-4246-9984-06fc8e964f0c"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6066), new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6085), new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6075) }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "ChatEntity", - keyColumn: "Id", - keyValue: new Guid("f8729a12-5746-443f-ad31-378d846fce30"), - columns: new[] { "CreatedAt", "LastMessageTime", "UpdatedAt" }, - values: new object[] { new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6095), new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6119), new DateTime(2023, 3, 9, 16, 18, 3, 868, DateTimeKind.Utc).AddTicks(6110) }); - - migrationBuilder.InsertData( - schema: "mango", - table: "MessageEntity", - columns: new[] { "Id", "Attachment", "ChatId", "Content", "CreatedAt", "InReplayToAuthor", "InReplayToText", "UpdatedAt", "UserId" }, - values: new object[,] - { - { new Guid("083ae74e-cc48-418f-bae2-68bfa40ef954"), null, new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), "Слава Партии!!", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6646), null, null, null, new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") }, - { new Guid("0f78dc38-1130-4aa3-8e64-9ae1cff06e5c"), null, new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), "Hello World", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6768), null, null, null, new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") }, - { new Guid("1316dc52-609b-4b4c-8f5e-806a63ae23cc"), null, new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), "Well, I'm doing UI/UX part of the project", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6382), null, null, null, new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") }, - { new Guid("14e38cec-9517-4c67-8588-f313e2f1f096"), null, new Guid("f8729a12-5746-443f-ad31-378d846fce30"), "Hello World", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6866), null, null, null, new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("15f3535c-4b5e-4e61-9624-d06e48ae52a3"), null, new Guid("3fce8b2c-252d-4514-a1bb-fbdf73c47b78"), "Hi teacher", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6959), null, null, null, new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") }, - { new Guid("1e2aa65a-ea50-45e6-b635-bf624420f33b"), null, new Guid("f8729a12-5746-443f-ad31-378d846fce30"), "Hello World", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6851), null, null, null, new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") }, - { new Guid("23d80548-e6d3-4568-8a6a-39ce91703ffd"), null, new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), "Hello guys, how your diploma project goes?", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6362), null, null, null, new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") }, - { new Guid("3cc9fbe4-d28c-454c-9525-faa3303373c0"), null, new Guid("9f205dde-0ddc-401f-8fe9-6c794b661f5d"), "Hello World", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6929), null, null, null, new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") }, - { new Guid("3f039761-888a-4260-8799-ca1934d57a59"), null, new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), "Слава Партии!!", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6680), null, null, null, new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") }, - { new Guid("440e86f1-428c-4e17-93e0-848b08ff6a5f"), null, new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), "F# The Best", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6607), null, null, null, new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("450cdb09-60c0-44c6-ade1-f01a2b41facf"), null, new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), "I work with backend too...", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6563), null, null, null, new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") }, - { new Guid("5d656493-9013-47d6-825e-ccaf68c40903"), null, new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), "Great! Good luck to all of you", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6577), null, null, null, new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") }, - { new Guid("5ece7665-cf32-466f-9c85-9bfad2425f99"), null, new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), "Слава Партии!!", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6700), null, null, null, new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") }, - { new Guid("6105b6f9-e477-41aa-88b8-039bdeaa583a"), null, new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), "Слава Партии!!", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6661), null, null, null, new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("6523ded5-2f62-4c99-81f0-dabed282a240"), null, new Guid("9f205dde-0ddc-401f-8fe9-6c794b661f5d"), "Hello World", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6944), null, null, null, new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") }, - { new Guid("65711f3c-23f0-4248-95a3-39e049de3f9d"), null, new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), "Hello World", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6714), null, null, null, new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") }, - { new Guid("665bf20f-1858-4348-b978-cbd46dc7aba0"), null, new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), "Hello World", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6592), null, null, null, new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") }, - { new Guid("7be95880-3a66-4f4f-9a0d-eeff91445401"), null, new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), "TypeScript The Best", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6631), null, null, null, new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") }, - { new Guid("814c8420-b4e2-4427-93b8-75ba2a94b8d3"), null, new Guid("f5b7824f-e52b-4246-9984-06fc8e964f0c"), "Hello World", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6827), null, null, null, new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") }, - { new Guid("87e2acd4-f36b-4fb9-93e9-05fdcb2c88b5"), null, new Guid("b119914a-6d95-4047-bf8a-db27deeb7dc9"), "Hello World", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6910), null, null, null, new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("8b4e0084-067d-4ffe-a824-2e9bf55009d9"), null, new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), "Hello World", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6739), null, null, null, new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") }, - { new Guid("8c9b90a6-9164-4a5c-90b3-c91360cf6a88"), null, new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), "Hello World", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6812), null, null, null, new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") }, - { new Guid("a2bd7bc3-50ff-4068-b38b-36265e7e1243"), null, new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), "C# The Best", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6621), null, null, null, new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") }, - { new Guid("b752abe4-3f2c-4bc8-8c68-666369b45a8c"), null, new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), "Hello World", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6778), null, null, null, new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("bd5e204b-99e1-408a-b582-706666918ad4"), null, new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), "Greetings. I currently workout the back-end part", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6411), null, null, null, new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") }, - { new Guid("c2a37a7e-ff5c-4699-a343-2ce2e46be5b7"), null, new Guid("b119914a-6d95-4047-bf8a-db27deeb7dc9"), "Hello World", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6876), null, null, null, new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") }, - { new Guid("c7c9066d-86b2-4853-a8da-fa65ed576c1a"), null, new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), "Hello World", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6797), null, null, null, new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") }, - { new Guid("da8e21d5-16fb-4dfd-b3f9-dbb7db4dba13"), null, new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), "Hello World", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6729), null, null, null, new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("dc01f074-a9d2-4ea2-8a8b-64f6811f51df"), null, new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), "Hello World", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6753), null, null, null, new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") }, - { new Guid("e6a14cf9-ce64-4df2-bd31-9d92283d5727"), null, new Guid("f5b7824f-e52b-4246-9984-06fc8e964f0c"), "Hello World", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6837), null, null, null, new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("e94318bf-d787-45f2-b3bf-fad650fee75c"), null, new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), "Hi teacher, I perform QA of the current version", new DateTime(2023, 3, 9, 16, 18, 3, 869, DateTimeKind.Utc).AddTicks(6396), null, null, null, new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") } - }); - - migrationBuilder.InsertData( - schema: "mango", - table: "UserContactEntity", - columns: new[] { "Id", "ContactId", "CreatedAt", "UserId" }, - values: new object[] { new Guid("006be3e9-7bef-45a0-b532-4fafb4db2dc3"), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5901), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") }); - - migrationBuilder.InsertData( - schema: "mango", - table: "UserContactEntity", - columns: new[] { "Id", "ContactId", "CreatedAt", "UserId" }, - values: new object[,] - { - { new Guid("19899c12-fbfa-48d0-82ec-18d45e1eb6d9"), new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(6028), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("1cfa7869-1ae5-476f-90da-64f6a10a0124"), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5842), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") }, - { new Guid("1dd9d62f-92c4-4ea9-ad63-1803856d3294"), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5974), new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") }, - { new Guid("294217ea-2170-4417-92b6-efbf9dd7f00a"), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5793), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") }, - { new Guid("415ee633-e418-41d9-96ca-2d6e0aabd128"), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5705), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") }, - { new Guid("4477dbc9-fee5-4710-b0b1-469d0f6af73a"), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5949), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") }, - { new Guid("45730db3-105b-4166-b257-70d3e4099bca"), new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(6042), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("4fcda455-e931-4031-a764-759a9378f2a1"), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5910), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") }, - { new Guid("5169ff97-b2d0-4c1f-9dd9-d65edb8a5dfb"), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5720), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") }, - { new Guid("56310a3a-c427-4fe6-82ea-c2f4051654b2"), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5959), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") }, - { new Guid("58f4dcab-6889-418f-8687-86d285b75149"), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5808), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") }, - { new Guid("5a74c334-9d71-4f36-b311-cf1cee4990bb"), new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5989), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("5b62e0b8-c8e8-410d-bee1-f3602626a87b"), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5886), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") }, - { new Guid("5c6773aa-b60a-4c4a-9435-6f9f51570c86"), new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(6052), new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") }, - { new Guid("6d523966-629f-475e-9849-607aea0f1205"), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5734), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") }, - { new Guid("7177b007-6621-4c41-9a11-94016d42a49d"), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5759), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") }, - { new Guid("729a8579-2b84-45b3-8dac-bcf1a757aa20"), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5817), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") }, - { new Guid("7c7f7a86-3e0a-4683-81be-a5fc70389ad5"), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5783), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") }, - { new Guid("81dc8b8f-3a02-4e97-a5d4-68765ac4cac4"), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5857), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") }, - { new Guid("86ed0f1d-71af-4e45-a88b-bc4b64f46ed8"), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(6067), new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") }, - { new Guid("95bafb20-1569-414b-aaa4-7865f143a497"), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5744), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") }, - { new Guid("c80b971f-3231-4448-9faa-88a375cb49d9"), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5925), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") }, - { new Guid("db1e25d0-98e2-44a4-87e4-11b00e387b41"), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5832), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") }, - { new Guid("dccc06fd-eb6c-4d92-8e2b-21c8b91db59a"), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5871), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") }, - { new Guid("e4e77b57-54e4-4344-9a95-b9d0d9f48547"), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(6018), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("e7359601-6e5e-42bb-91cd-7c5e93c3f73e"), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(6003), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") }, - { new Guid("f68d3679-246f-45a5-ad16-5927d3263de5"), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), new DateTime(2023, 3, 9, 16, 18, 3, 870, DateTimeKind.Utc).AddTicks(5935), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") } - }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "UserEntity", - keyColumn: "Id", - keyValue: new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), - columns: new[] { "ConcurrencyStamp", "PasswordHash" }, - values: new object[] { "991cebf0-505d-4cfb-9daf-e5c15dacd681", "AQAAAAEAACcQAAAAEA8BzPR7YQ/+GbLhEl1derKOUY3j+h13IZg1zcnO49QFh601wNgRIBT7WqWU/+YAGA==" }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "UserEntity", - keyColumn: "Id", - keyValue: new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), - columns: new[] { "ConcurrencyStamp", "PasswordHash" }, - values: new object[] { "64ba066d-6eb1-4066-bc94-bf9eae04087e", "AQAAAAEAACcQAAAAEDZVXdYXhZ9CNpEcCZxlVWIlOxqnBOQQm4JBT2AhbuqqVKNGmBoqErPBrQIOrZmteQ==" }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "UserEntity", - keyColumn: "Id", - keyValue: new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), - columns: new[] { "ConcurrencyStamp", "PasswordHash" }, - values: new object[] { "80edce90-5ecd-4868-8e1a-1ac12b05ad6a", "AQAAAAEAACcQAAAAEB7bhxKsttucxtefw6TO+UTyiDuElL1NNgvVoo0nCnpgZKKj3kS1NRevexdRVC7/4A==" }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "UserEntity", - keyColumn: "Id", - keyValue: new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), - columns: new[] { "ConcurrencyStamp", "PasswordHash" }, - values: new object[] { "a3fe252e-9460-4deb-9c49-fa45118bf736", "AQAAAAEAACcQAAAAEFsOc5W82yorDT0HiIzkmnZAGle0ZoByCvGrl9Niy2+XJXR4NZvsF9imWeay8yEpPA==" }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "UserEntity", - keyColumn: "Id", - keyValue: new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), - columns: new[] { "ConcurrencyStamp", "PasswordHash" }, - values: new object[] { "b8fdf94e-4ba3-43c3-9ed0-06b538f49d2d", "AQAAAAEAACcQAAAAEL3BrZqQnomRxcf0Hpvswo/CptRKGk+TF4389adWcK3Wq9UippagXTcOJ1b5hBceUw==" }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "UserEntity", - keyColumn: "Id", - keyValue: new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), - columns: new[] { "ConcurrencyStamp", "PasswordHash" }, - values: new object[] { "e38f3eb0-b3e8-4dff-b07d-d94401b8f654", "AQAAAAEAACcQAAAAENSnH6yxJYOeyvLZiFeh/ULTo1vTxVOM1mp/L/tV1s4aP/7rSJBV5FPtioZJQCsx2w==" }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "UserEntity", - keyColumn: "Id", - keyValue: new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), - columns: new[] { "ConcurrencyStamp", "PasswordHash" }, - values: new object[] { "85358c43-0438-4399-b435-7423bf61d8a5", "AQAAAAEAACcQAAAAEP3PL5bB6qMqRvoBzMUTQrlv8kS1u6kpZ7f2DsFj+bvPoyR8SWqHlr3tvsc93L8SYg==" }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "UserEntity", - keyColumn: "Id", - keyValue: new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), - columns: new[] { "ConcurrencyStamp", "PasswordHash" }, - values: new object[] { "dd3603cb-b08a-44be-ae0f-251cc553fca2", "AQAAAAEAACcQAAAAEIxP+Hx8FJj9Ci55XVp5OELB0Ye3D+UNbf/Rbw9F1w3NhhoPld4sxta28nx+sQzmfg==" }); - - migrationBuilder.UpdateData( - schema: "mango", - table: "UserEntity", - keyColumn: "Id", - keyValue: new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - columns: new[] { "ConcurrencyStamp", "PasswordHash" }, - values: new object[] { "15c603fb-8ddc-4d4b-8df5-6d03374a8b7e", "AQAAAAEAACcQAAAAEEj7YLvqFNXh0KhVKDGiaQ/xi8emzw7oSt6vuIFIUJKr68pawjkHGimgh+T6KuzehA==" }); - - migrationBuilder.InsertData( - schema: "mango", - table: "UserInformationEntity", - columns: new[] { "Id", "Address", "BirthDay", "CreatedAt", "Facebook", "Instagram", "LinkedIn", "ProfilePicture", "Twitter", "UpdatedAt", "UserId", "Website" }, - values: new object[,] - { - { new Guid("07356a86-e915-42fb-9013-eb7e74334601"), "Poznan, Poland", new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6123), new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6142), "serhii.holishevskii", "serhii.holishevskii", "serhii.holishevskii", null, "serhii.holishevskii", new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6133), new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), "serhii.holishevskii.com" }, - { new Guid("21f01e34-ff46-4b17-929a-1b59b2ef910f"), "Saint-Petersburg, Russia", new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6328), new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6348), "kolbasator", null, null, "profile.png", null, new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6338), new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), "kolbasator.com" }, - { new Guid("587d09c6-7cd1-41a0-bee9-fec14f55fb7f"), "Poznan, Poland", new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6084), new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6103), "illia.zubachov", "illia.zubachov", "illia.zubachov", null, "illia.zubachov", new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6094), new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), "illia.zubachov.com" }, - { new Guid("9eb02f2c-0634-420d-87ce-dfe3113172b7"), "Odessa, Ukraine", new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6289), new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6309), "razumovsky_r", "razumovsky_r", "razumovsky_r", null, "razumovsky_r", new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6299), new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), "razumovsky.com" }, - { new Guid("be0733f1-3a62-4c0d-97b8-fd8f510d40af"), "Poznan, Poland", new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6196), new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6221), "szymon.murawski", "szymon.murawski", "szymon.murawski", null, "szymon.murawski", new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6211), new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), "szymon.murawski.com" }, - { new Guid("c7aed1e8-c385-43c9-9241-c5668ae0385f"), "Moscow, Russia", new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6235), new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6260), null, "khachapur.mudrenych", "khachapur.mudrenych", null, null, new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6250), new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), "khachapur.com" } - }); - - migrationBuilder.InsertData( - schema: "mango", - table: "UserInformationEntity", - columns: new[] { "Id", "Address", "BirthDay", "CreatedAt", "Facebook", "Instagram", "LinkedIn", "ProfilePicture", "Twitter", "UpdatedAt", "UserId", "Website" }, - values: new object[] { new Guid("ddb7008d-6c11-4503-91ef-3cdada4d83e0"), "Moscow, Russia", new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6362), new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6387), "TheMoonlightSonata", "TheMoonlightSonata", null, null, "TheMoonlightSonata", new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6377), new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), null }); - - migrationBuilder.InsertData( - schema: "mango", - table: "UserInformationEntity", - columns: new[] { "Id", "Address", "BirthDay", "CreatedAt", "Facebook", "Instagram", "LinkedIn", "ProfilePicture", "Twitter", "UpdatedAt", "UserId", "Website" }, - values: new object[] { new Guid("e4d11b30-fe6d-44bf-9d3b-f5a717b77319"), "Poznan, Poland", new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6035), new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6064), "petro.kolosov", "petro.kolosov", "petro.kolosov", null, "petro.kolosov", new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6050), new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), "petro.kolosov.com" }); - - migrationBuilder.InsertData( - schema: "mango", - table: "UserInformationEntity", - columns: new[] { "Id", "Address", "BirthDay", "CreatedAt", "Facebook", "Instagram", "LinkedIn", "ProfilePicture", "Twitter", "UpdatedAt", "UserId", "Website" }, - values: new object[] { new Guid("f1672ff5-fab9-422c-856d-da0f7ae77bea"), "Poznan, Poland", new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6162), new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6182), "arslan.temirbekov", "arslan.temirbekov", "arslan.temirbekov", null, "arslan.temirbekov", new DateTime(2023, 3, 9, 16, 18, 3, 992, DateTimeKind.Utc).AddTicks(6172), new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), "arslan.temirbekov.com" }); - } - } -} diff --git a/MangoAPI.Infrastructure/Migrations/20230312114248_InitialMigration.Designer.cs b/MangoAPI.Infrastructure/Migrations/20230312114248_InitialMigration.Designer.cs new file mode 100644 index 000000000..c57a07be5 --- /dev/null +++ b/MangoAPI.Infrastructure/Migrations/20230312114248_InitialMigration.Designer.cs @@ -0,0 +1,676 @@ +// +using System; +using MangoAPI.Infrastructure.Database; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace MangoAPI.Infrastructure.Migrations +{ + [DbContext(typeof(MangoDbContext))] + [Migration("20230312114248_InitialMigration")] + partial class InitialMigration + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "6.0.14") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1); + + modelBuilder.Entity("MangoAPI.Domain.Entities.ChatEntity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CommunityType") + .HasColumnType("int"); + + b.Property("CreatedAt") + .HasColumnType("datetime2"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("Image") + .HasColumnType("nvarchar(max)"); + + b.Property("LastMessageAuthor") + .HasColumnType("nvarchar(max)"); + + b.Property("LastMessageId") + .HasColumnType("uniqueidentifier"); + + b.Property("LastMessageText") + .HasColumnType("nvarchar(max)"); + + b.Property("LastMessageTime") + .HasColumnType("datetime2"); + + b.Property("MembersCount") + .HasColumnType("int"); + + b.Property("Title") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("ChatEntity", "mango"); + }); + + modelBuilder.Entity("MangoAPI.Domain.Entities.DiffieHellmanKeyExchangeEntity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreatedAt") + .HasColumnType("datetime2"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("KeyExchangeType") + .HasColumnType("int"); + + b.Property("ReceiverId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReceiverPublicKey") + .HasColumnType("varbinary(max)"); + + b.Property("SenderId") + .HasColumnType("uniqueidentifier"); + + b.Property("SenderPublicKey") + .IsRequired() + .HasColumnType("varbinary(max)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("DiffieHellmanKeyExchangeEntity", "mango"); + }); + + modelBuilder.Entity("MangoAPI.Domain.Entities.DiffieHellmanParameterEntity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreatedAt") + .HasColumnType("datetime2"); + + b.Property("CreatedBy") + .HasColumnType("uniqueidentifier"); + + b.Property("OpenSslDhParameter") + .IsRequired() + .HasColumnType("varbinary(max)"); + + b.HasKey("Id"); + + b.ToTable("DiffieHellmanParameterEntity", "mango"); + }); + + modelBuilder.Entity("MangoAPI.Domain.Entities.DocumentEntity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UploadedAt") + .HasColumnType("datetime2"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("DocumentEntity", "mango"); + }); + + modelBuilder.Entity("MangoAPI.Domain.Entities.MessageEntity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AttachmentFileName") + .HasColumnType("nvarchar(max)"); + + b.Property("ChatId") + .HasColumnType("uniqueidentifier"); + + b.Property("Content") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CreatedAt") + .HasColumnType("datetime2"); + + b.Property("InReplayToAuthor") + .HasColumnType("nvarchar(max)"); + + b.Property("InReplayToText") + .HasColumnType("nvarchar(max)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime2"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ChatId"); + + b.HasIndex("UserId"); + + b.ToTable("MessageEntity", "mango"); + }); + + modelBuilder.Entity("MangoAPI.Domain.Entities.RoleEntity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("NormalizedName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName") + .IsUnique() + .HasDatabaseName("RoleNameIndex") + .HasFilter("[NormalizedName] IS NOT NULL"); + + b.ToTable("AspNetRoles", (string)null); + }); + + modelBuilder.Entity("MangoAPI.Domain.Entities.SessionEntity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreatedAt") + .HasColumnType("datetime2"); + + b.Property("ExpiresAt") + .HasColumnType("datetime2"); + + b.Property("RefreshToken") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("SessionEntity", "mango"); + }); + + modelBuilder.Entity("MangoAPI.Domain.Entities.UserChatEntity", b => + { + b.Property("ChatId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsArchived") + .HasColumnType("bit"); + + b.Property("RoleId") + .HasColumnType("int"); + + b.HasKey("ChatId", "UserId"); + + b.HasIndex("UserId"); + + b.ToTable("UserChatEntity", "mango"); + }); + + modelBuilder.Entity("MangoAPI.Domain.Entities.UserContactEntity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ContactId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreatedAt") + .HasColumnType("datetime2"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("UserContactEntity", "mango"); + }); + + modelBuilder.Entity("MangoAPI.Domain.Entities.UserEntity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AccessFailedCount") + .HasColumnType("int"); + + b.Property("Bio") + .HasColumnType("nvarchar(max)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("nvarchar(max)"); + + b.Property("DisplayName") + .HasColumnType("nvarchar(max)"); + + b.Property("DisplayNameColour") + .HasColumnType("int"); + + b.Property("Email") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("EmailConfirmed") + .HasColumnType("bit"); + + b.Property("Image") + .HasColumnType("nvarchar(max)"); + + b.Property("LockoutEnabled") + .HasColumnType("bit"); + + b.Property("LockoutEnd") + .HasColumnType("datetimeoffset"); + + b.Property("NormalizedEmail") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("NormalizedUserName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("PasswordHash") + .HasColumnType("nvarchar(max)"); + + b.Property("PhoneNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("PhoneNumberConfirmed") + .HasColumnType("bit"); + + b.Property("SecurityStamp") + .HasColumnType("nvarchar(max)"); + + b.Property("TwoFactorEnabled") + .HasColumnType("bit"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("UserNameChanged") + .HasColumnType("bit"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedEmail") + .HasDatabaseName("EmailIndex"); + + b.HasIndex("NormalizedUserName") + .IsUnique() + .HasDatabaseName("UserNameIndex") + .HasFilter("[NormalizedUserName] IS NOT NULL"); + + b.ToTable("UserEntity", "mango"); + }); + + modelBuilder.Entity("MangoAPI.Domain.Entities.UserInformationEntity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Address") + .HasColumnType("nvarchar(max)"); + + b.Property("BirthDay") + .HasColumnType("datetime2"); + + b.Property("CreatedAt") + .HasColumnType("datetime2"); + + b.Property("Facebook") + .HasColumnType("nvarchar(max)"); + + b.Property("Instagram") + .HasColumnType("nvarchar(max)"); + + b.Property("LinkedIn") + .HasColumnType("nvarchar(max)"); + + b.Property("ProfilePicture") + .HasColumnType("nvarchar(max)"); + + b.Property("Twitter") + .HasColumnType("nvarchar(max)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime2"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Website") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("UserId") + .IsUnique(); + + b.ToTable("UserInformationEntity", "mango"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1); + + b.Property("ClaimType") + .HasColumnType("nvarchar(max)"); + + b.Property("ClaimValue") + .HasColumnType("nvarchar(max)"); + + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AspNetRoleClaims", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1); + + b.Property("ClaimType") + .HasColumnType("nvarchar(max)"); + + b.Property("ClaimValue") + .HasColumnType("nvarchar(max)"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AspNetUserClaims", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => + { + b.Property("LoginProvider") + .HasColumnType("nvarchar(450)"); + + b.Property("ProviderKey") + .HasColumnType("nvarchar(450)"); + + b.Property("ProviderDisplayName") + .HasColumnType("nvarchar(max)"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("LoginProvider", "ProviderKey"); + + b.HasIndex("UserId"); + + b.ToTable("AspNetUserLogins", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId"); + + b.ToTable("AspNetUserRoles", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("LoginProvider") + .HasColumnType("nvarchar(450)"); + + b.Property("Name") + .HasColumnType("nvarchar(450)"); + + b.Property("Value") + .HasColumnType("nvarchar(max)"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AspNetUserTokens", (string)null); + }); + + modelBuilder.Entity("MangoAPI.Domain.Entities.DocumentEntity", b => + { + b.HasOne("MangoAPI.Domain.Entities.UserEntity", "User") + .WithMany("Documents") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); + }); + + modelBuilder.Entity("MangoAPI.Domain.Entities.MessageEntity", b => + { + b.HasOne("MangoAPI.Domain.Entities.ChatEntity", "Chat") + .WithMany("Messages") + .HasForeignKey("ChatId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("MangoAPI.Domain.Entities.UserEntity", "User") + .WithMany("Messages") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Chat"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("MangoAPI.Domain.Entities.SessionEntity", b => + { + b.HasOne("MangoAPI.Domain.Entities.UserEntity", "UserEntity") + .WithMany("Sessions") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("UserEntity"); + }); + + modelBuilder.Entity("MangoAPI.Domain.Entities.UserChatEntity", b => + { + b.HasOne("MangoAPI.Domain.Entities.ChatEntity", "Chat") + .WithMany("ChatUsers") + .HasForeignKey("ChatId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("MangoAPI.Domain.Entities.UserEntity", "User") + .WithMany("UserChats") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Chat"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("MangoAPI.Domain.Entities.UserContactEntity", b => + { + b.HasOne("MangoAPI.Domain.Entities.UserEntity", "User") + .WithMany("Contacts") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); + }); + + modelBuilder.Entity("MangoAPI.Domain.Entities.UserInformationEntity", b => + { + b.HasOne("MangoAPI.Domain.Entities.UserEntity", "User") + .WithOne("UserInformation") + .HasForeignKey("MangoAPI.Domain.Entities.UserInformationEntity", "UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => + { + b.HasOne("MangoAPI.Domain.Entities.RoleEntity", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => + { + b.HasOne("MangoAPI.Domain.Entities.UserEntity", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => + { + b.HasOne("MangoAPI.Domain.Entities.UserEntity", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => + { + b.HasOne("MangoAPI.Domain.Entities.RoleEntity", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("MangoAPI.Domain.Entities.UserEntity", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.HasOne("MangoAPI.Domain.Entities.UserEntity", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("MangoAPI.Domain.Entities.ChatEntity", b => + { + b.Navigation("ChatUsers"); + + b.Navigation("Messages"); + }); + + modelBuilder.Entity("MangoAPI.Domain.Entities.UserEntity", b => + { + b.Navigation("Contacts"); + + b.Navigation("Documents"); + + b.Navigation("Messages"); + + b.Navigation("Sessions"); + + b.Navigation("UserChats"); + + b.Navigation("UserInformation"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/MangoAPI.Infrastructure/Migrations/20230312114248_InitialMigration.cs b/MangoAPI.Infrastructure/Migrations/20230312114248_InitialMigration.cs new file mode 100644 index 000000000..0c0709f26 --- /dev/null +++ b/MangoAPI.Infrastructure/Migrations/20230312114248_InitialMigration.cs @@ -0,0 +1,534 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace MangoAPI.Infrastructure.Migrations +{ + public partial class InitialMigration : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.EnsureSchema( + name: "mango"); + + migrationBuilder.CreateTable( + name: "AspNetRoles", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + NormalizedName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AspNetRoles", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "ChatEntity", + schema: "mango", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Title = table.Column(type: "nvarchar(max)", nullable: false), + CommunityType = table.Column(type: "int", nullable: false), + Description = table.Column(type: "nvarchar(max)", nullable: true), + Image = table.Column(type: "nvarchar(max)", nullable: true), + CreatedAt = table.Column(type: "datetime2", nullable: false), + UpdatedAt = table.Column(type: "datetime2", nullable: true), + MembersCount = table.Column(type: "int", nullable: false), + LastMessageAuthor = table.Column(type: "nvarchar(max)", nullable: true), + LastMessageText = table.Column(type: "nvarchar(max)", nullable: true), + LastMessageTime = table.Column(type: "datetime2", nullable: true), + LastMessageId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_ChatEntity", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "DiffieHellmanKeyExchangeEntity", + schema: "mango", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + SenderId = table.Column(type: "uniqueidentifier", nullable: false), + ReceiverId = table.Column(type: "uniqueidentifier", nullable: false), + SenderPublicKey = table.Column(type: "varbinary(max)", nullable: false), + ReceiverPublicKey = table.Column(type: "varbinary(max)", nullable: true), + IsConfirmed = table.Column(type: "bit", nullable: false), + CreatedAt = table.Column(type: "datetime2", nullable: false), + UpdatedAt = table.Column(type: "datetime2", nullable: true), + KeyExchangeType = table.Column(type: "int", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_DiffieHellmanKeyExchangeEntity", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "DiffieHellmanParameterEntity", + schema: "mango", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + OpenSslDhParameter = table.Column(type: "varbinary(max)", nullable: false), + CreatedBy = table.Column(type: "uniqueidentifier", nullable: false), + CreatedAt = table.Column(type: "datetime2", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_DiffieHellmanParameterEntity", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "UserEntity", + schema: "mango", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + DisplayName = table.Column(type: "nvarchar(max)", nullable: true), + Image = table.Column(type: "nvarchar(max)", nullable: true), + Bio = table.Column(type: "nvarchar(max)", nullable: true), + UserNameChanged = table.Column(type: "bit", nullable: false), + DisplayNameColour = table.Column(type: "int", nullable: false), + UserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + NormalizedUserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + Email = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + NormalizedEmail = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + EmailConfirmed = table.Column(type: "bit", nullable: false), + PasswordHash = table.Column(type: "nvarchar(max)", nullable: true), + SecurityStamp = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(max)", nullable: true), + PhoneNumber = table.Column(type: "nvarchar(max)", nullable: true), + PhoneNumberConfirmed = table.Column(type: "bit", nullable: false), + TwoFactorEnabled = table.Column(type: "bit", nullable: false), + LockoutEnd = table.Column(type: "datetimeoffset", nullable: true), + LockoutEnabled = table.Column(type: "bit", nullable: false), + AccessFailedCount = table.Column(type: "int", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_UserEntity", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AspNetRoleClaims", + columns: table => new + { + Id = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + RoleId = table.Column(type: "uniqueidentifier", nullable: false), + ClaimType = table.Column(type: "nvarchar(max)", nullable: true), + ClaimValue = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AspNetRoleClaims", x => x.Id); + table.ForeignKey( + name: "FK_AspNetRoleClaims_AspNetRoles_RoleId", + column: x => x.RoleId, + principalTable: "AspNetRoles", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AspNetUserClaims", + columns: table => new + { + Id = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + UserId = table.Column(type: "uniqueidentifier", nullable: false), + ClaimType = table.Column(type: "nvarchar(max)", nullable: true), + ClaimValue = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AspNetUserClaims", x => x.Id); + table.ForeignKey( + name: "FK_AspNetUserClaims_UserEntity_UserId", + column: x => x.UserId, + principalSchema: "mango", + principalTable: "UserEntity", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AspNetUserLogins", + columns: table => new + { + LoginProvider = table.Column(type: "nvarchar(450)", nullable: false), + ProviderKey = table.Column(type: "nvarchar(450)", nullable: false), + ProviderDisplayName = table.Column(type: "nvarchar(max)", nullable: true), + UserId = table.Column(type: "uniqueidentifier", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AspNetUserLogins", x => new { x.LoginProvider, x.ProviderKey }); + table.ForeignKey( + name: "FK_AspNetUserLogins_UserEntity_UserId", + column: x => x.UserId, + principalSchema: "mango", + principalTable: "UserEntity", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AspNetUserRoles", + columns: table => new + { + UserId = table.Column(type: "uniqueidentifier", nullable: false), + RoleId = table.Column(type: "uniqueidentifier", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AspNetUserRoles", x => new { x.UserId, x.RoleId }); + table.ForeignKey( + name: "FK_AspNetUserRoles_AspNetRoles_RoleId", + column: x => x.RoleId, + principalTable: "AspNetRoles", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_AspNetUserRoles_UserEntity_UserId", + column: x => x.UserId, + principalSchema: "mango", + principalTable: "UserEntity", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AspNetUserTokens", + columns: table => new + { + UserId = table.Column(type: "uniqueidentifier", nullable: false), + LoginProvider = table.Column(type: "nvarchar(450)", nullable: false), + Name = table.Column(type: "nvarchar(450)", nullable: false), + Value = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AspNetUserTokens", x => new { x.UserId, x.LoginProvider, x.Name }); + table.ForeignKey( + name: "FK_AspNetUserTokens_UserEntity_UserId", + column: x => x.UserId, + principalSchema: "mango", + principalTable: "UserEntity", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "DocumentEntity", + schema: "mango", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + UserId = table.Column(type: "uniqueidentifier", nullable: false), + FileName = table.Column(type: "nvarchar(max)", nullable: false), + UploadedAt = table.Column(type: "datetime2", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_DocumentEntity", x => x.Id); + table.ForeignKey( + name: "FK_DocumentEntity_UserEntity_UserId", + column: x => x.UserId, + principalSchema: "mango", + principalTable: "UserEntity", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "MessageEntity", + schema: "mango", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + UserId = table.Column(type: "uniqueidentifier", nullable: false), + ChatId = table.Column(type: "uniqueidentifier", nullable: false), + Content = table.Column(type: "nvarchar(max)", nullable: false), + InReplayToAuthor = table.Column(type: "nvarchar(max)", nullable: true), + InReplayToText = table.Column(type: "nvarchar(max)", nullable: true), + AttachmentFileName = table.Column(type: "nvarchar(max)", nullable: true), + CreatedAt = table.Column(type: "datetime2", nullable: false), + UpdatedAt = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_MessageEntity", x => x.Id); + table.ForeignKey( + name: "FK_MessageEntity_ChatEntity_ChatId", + column: x => x.ChatId, + principalSchema: "mango", + principalTable: "ChatEntity", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_MessageEntity_UserEntity_UserId", + column: x => x.UserId, + principalSchema: "mango", + principalTable: "UserEntity", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "SessionEntity", + schema: "mango", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + UserId = table.Column(type: "uniqueidentifier", nullable: false), + RefreshToken = table.Column(type: "uniqueidentifier", nullable: false), + CreatedAt = table.Column(type: "datetime2", nullable: false), + ExpiresAt = table.Column(type: "datetime2", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_SessionEntity", x => x.Id); + table.ForeignKey( + name: "FK_SessionEntity_UserEntity_UserId", + column: x => x.UserId, + principalSchema: "mango", + principalTable: "UserEntity", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "UserChatEntity", + schema: "mango", + columns: table => new + { + UserId = table.Column(type: "uniqueidentifier", nullable: false), + ChatId = table.Column(type: "uniqueidentifier", nullable: false), + RoleId = table.Column(type: "int", nullable: false), + IsArchived = table.Column(type: "bit", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_UserChatEntity", x => new { x.ChatId, x.UserId }); + table.ForeignKey( + name: "FK_UserChatEntity_ChatEntity_ChatId", + column: x => x.ChatId, + principalSchema: "mango", + principalTable: "ChatEntity", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_UserChatEntity_UserEntity_UserId", + column: x => x.UserId, + principalSchema: "mango", + principalTable: "UserEntity", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "UserContactEntity", + schema: "mango", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + ContactId = table.Column(type: "uniqueidentifier", nullable: false), + UserId = table.Column(type: "uniqueidentifier", nullable: false), + CreatedAt = table.Column(type: "datetime2", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_UserContactEntity", x => x.Id); + table.ForeignKey( + name: "FK_UserContactEntity_UserEntity_UserId", + column: x => x.UserId, + principalSchema: "mango", + principalTable: "UserEntity", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "UserInformationEntity", + schema: "mango", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + UserId = table.Column(type: "uniqueidentifier", nullable: false), + BirthDay = table.Column(type: "datetime2", nullable: true), + Website = table.Column(type: "nvarchar(max)", nullable: true), + Address = table.Column(type: "nvarchar(max)", nullable: true), + Facebook = table.Column(type: "nvarchar(max)", nullable: true), + Twitter = table.Column(type: "nvarchar(max)", nullable: true), + Instagram = table.Column(type: "nvarchar(max)", nullable: true), + LinkedIn = table.Column(type: "nvarchar(max)", nullable: true), + ProfilePicture = table.Column(type: "nvarchar(max)", nullable: true), + CreatedAt = table.Column(type: "datetime2", nullable: false), + UpdatedAt = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_UserInformationEntity", x => x.Id); + table.ForeignKey( + name: "FK_UserInformationEntity_UserEntity_UserId", + column: x => x.UserId, + principalSchema: "mango", + principalTable: "UserEntity", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateIndex( + name: "IX_AspNetRoleClaims_RoleId", + table: "AspNetRoleClaims", + column: "RoleId"); + + migrationBuilder.CreateIndex( + name: "RoleNameIndex", + table: "AspNetRoles", + column: "NormalizedName", + unique: true, + filter: "[NormalizedName] IS NOT NULL"); + + migrationBuilder.CreateIndex( + name: "IX_AspNetUserClaims_UserId", + table: "AspNetUserClaims", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "IX_AspNetUserLogins_UserId", + table: "AspNetUserLogins", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "IX_AspNetUserRoles_RoleId", + table: "AspNetUserRoles", + column: "RoleId"); + + migrationBuilder.CreateIndex( + name: "IX_DocumentEntity_UserId", + schema: "mango", + table: "DocumentEntity", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "IX_MessageEntity_ChatId", + schema: "mango", + table: "MessageEntity", + column: "ChatId"); + + migrationBuilder.CreateIndex( + name: "IX_MessageEntity_UserId", + schema: "mango", + table: "MessageEntity", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "IX_SessionEntity_UserId", + schema: "mango", + table: "SessionEntity", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "IX_UserChatEntity_UserId", + schema: "mango", + table: "UserChatEntity", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "IX_UserContactEntity_UserId", + schema: "mango", + table: "UserContactEntity", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "EmailIndex", + schema: "mango", + table: "UserEntity", + column: "NormalizedEmail"); + + migrationBuilder.CreateIndex( + name: "UserNameIndex", + schema: "mango", + table: "UserEntity", + column: "NormalizedUserName", + unique: true, + filter: "[NormalizedUserName] IS NOT NULL"); + + migrationBuilder.CreateIndex( + name: "IX_UserInformationEntity_UserId", + schema: "mango", + table: "UserInformationEntity", + column: "UserId", + unique: true); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "AspNetRoleClaims"); + + migrationBuilder.DropTable( + name: "AspNetUserClaims"); + + migrationBuilder.DropTable( + name: "AspNetUserLogins"); + + migrationBuilder.DropTable( + name: "AspNetUserRoles"); + + migrationBuilder.DropTable( + name: "AspNetUserTokens"); + + migrationBuilder.DropTable( + name: "DiffieHellmanKeyExchangeEntity", + schema: "mango"); + + migrationBuilder.DropTable( + name: "DiffieHellmanParameterEntity", + schema: "mango"); + + migrationBuilder.DropTable( + name: "DocumentEntity", + schema: "mango"); + + migrationBuilder.DropTable( + name: "MessageEntity", + schema: "mango"); + + migrationBuilder.DropTable( + name: "SessionEntity", + schema: "mango"); + + migrationBuilder.DropTable( + name: "UserChatEntity", + schema: "mango"); + + migrationBuilder.DropTable( + name: "UserContactEntity", + schema: "mango"); + + migrationBuilder.DropTable( + name: "UserInformationEntity", + schema: "mango"); + + migrationBuilder.DropTable( + name: "AspNetRoles"); + + migrationBuilder.DropTable( + name: "ChatEntity", + schema: "mango"); + + migrationBuilder.DropTable( + name: "UserEntity", + schema: "mango"); + } + } +} diff --git a/MangoAPI.Infrastructure/Migrations/MangoDbContextModelSnapshot.cs b/MangoAPI.Infrastructure/Migrations/MangoDbContextModelSnapshot.cs index 419576a3b..49abdc974 100644 --- a/MangoAPI.Infrastructure/Migrations/MangoDbContextModelSnapshot.cs +++ b/MangoAPI.Infrastructure/Migrations/MangoDbContextModelSnapshot.cs @@ -65,143 +65,6 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasKey("Id"); b.ToTable("ChatEntity", "mango"); - - b.HasData( - new - { - Id = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - CommunityType = 2, - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2711), - Description = "WSB Public Group", - Image = "wsb_group_logo.png", - LastMessageAuthor = "Szymon Murawski", - LastMessageText = "Great! Good luck to all of you", - LastMessageTime = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2716), - MembersCount = 5, - Title = "WSB", - UpdatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2713) - }, - new - { - Id = new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), - CommunityType = 2, - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2717), - Description = "Extreme Code Main Public Group", - Image = "extreme_code_main.jpg", - LastMessageAuthor = "Amelit", - LastMessageText = "TypeScript The Best", - LastMessageTime = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2719), - MembersCount = 4, - Title = "Extreme Code Main", - UpdatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2718) - }, - new - { - Id = new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), - CommunityType = 2, - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2720), - Description = "Extreme Code Flood Public Group", - Image = "extremecode_rest_logo.jpg", - LastMessageAuthor = "Amelit", - LastMessageText = "Слава Партии!!", - LastMessageTime = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2721), - MembersCount = 4, - Title = "Extreme Code Flood", - UpdatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2721) - }, - new - { - Id = new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), - CommunityType = 2, - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2722), - Description = "Extreme Code C++ Public Group", - Image = "extremecode_cpp_logo.jpg", - LastMessageAuthor = "Amelit", - LastMessageText = "Hello world!", - LastMessageTime = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2723), - MembersCount = 4, - Title = "Extreme Code C++", - UpdatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2722) - }, - new - { - Id = new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), - CommunityType = 2, - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2724), - Description = "Extreme Code .NET Public Group", - Image = "extremecode_dotnet.png", - LastMessageAuthor = "Amelit", - LastMessageText = "Hello world!", - LastMessageTime = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2725), - MembersCount = 4, - Title = "Extreme Code .NET", - UpdatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2724) - }, - new - { - Id = new Guid("f5b7824f-e52b-4246-9984-06fc8e964f0c"), - CommunityType = 1, - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2725), - Description = "Direct chat between Khachatur Khachatryan and razumovsky r", - LastMessageAuthor = "razumovsky r", - LastMessageText = "Hello world!", - LastMessageTime = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2727), - MembersCount = 2, - Title = "Khachatur Khachatryan / razumovsky r", - UpdatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2726) - }, - new - { - Id = new Guid("f8729a12-5746-443f-ad31-378d846fce30"), - CommunityType = 1, - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2727), - Description = "Direct chat between Мусяка Колбасяка and razumovsky r", - LastMessageAuthor = "razumovsky r", - LastMessageText = "Hello world!", - LastMessageTime = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2728), - MembersCount = 2, - Title = "Мусяка Колбасяка / razumovsky r", - UpdatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2728) - }, - new - { - Id = new Guid("b119914a-6d95-4047-bf8a-db27deeb7dc9"), - CommunityType = 1, - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2729), - Description = "Direct chat between Amelit and razumovsky r", - LastMessageAuthor = "razumovsky r", - LastMessageText = "Hello world!", - LastMessageTime = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2730), - MembersCount = 2, - Title = "Amelit / razumovsky r", - UpdatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2729) - }, - new - { - Id = new Guid("9f205dde-0ddc-401f-8fe9-6c794b661f5d"), - CommunityType = 1, - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2731), - Description = "Direct chat between Khachatur Khachatryan and Мусяка Колбасяка", - LastMessageAuthor = "Khachatur Khachatryan", - LastMessageText = "Hello world!", - LastMessageTime = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2732), - MembersCount = 2, - Title = "Khachatur Khachatryan / Мусяка Колбасяка", - UpdatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2731) - }, - new - { - Id = new Guid("3fce8b2c-252d-4514-a1bb-fbdf73c47b78"), - CommunityType = 1, - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2732), - Description = "Direct chat between Petro Kolosov and Szymon Murawski", - LastMessageAuthor = "Petro Kolosov", - LastMessageText = "Hello world!", - LastMessageTime = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2733), - MembersCount = 2, - Title = "Petro Kolosov / Szymon Murawski", - UpdatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(2733) - }); }); modelBuilder.Entity("MangoAPI.Domain.Entities.DiffieHellmanKeyExchangeEntity", b => @@ -322,256 +185,6 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasIndex("UserId"); b.ToTable("MessageEntity", "mango"); - - b.HasData( - new - { - Id = new Guid("08dbb138-829f-4790-870f-40ddf22eb94b"), - ChatId = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - Content = "Hello guys, how your diploma project goes?", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6337), - UserId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") - }, - new - { - Id = new Guid("5ea2c650-6382-478d-be44-c7c260b6d98d"), - ChatId = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - Content = "Well, I'm doing UI/UX part of the project", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6339), - UserId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") - }, - new - { - Id = new Guid("19e642d7-8c05-451d-927f-b2d5c293bfc2"), - ChatId = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - Content = "Hi teacher, I perform QA of the current version", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6341), - UserId = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") - }, - new - { - Id = new Guid("c378cef2-599e-4756-b98e-0c9c7c466882"), - ChatId = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - Content = "Greetings. I currently workout the back-end part", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6342), - UserId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") - }, - new - { - Id = new Guid("63002292-fce5-4423-9310-03fe7314e1c5"), - ChatId = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - Content = "I work with backend too...", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6353), - UserId = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") - }, - new - { - Id = new Guid("11428540-b134-4e20-9082-8cde30ccc43a"), - ChatId = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - Content = "Great! Good luck to all of you", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6355), - UserId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") - }, - new - { - Id = new Guid("f38e06fe-f6fe-41b4-912a-8ab06a3ac4c1"), - ChatId = new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6357), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") - }, - new - { - Id = new Guid("8037b41d-63a8-4a1f-b464-3310a0b7be47"), - ChatId = new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), - Content = "F# The Best", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6357), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("0e016aa7-2570-4576-83b9-50dd0901ef29"), - ChatId = new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), - Content = "C# The Best", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6358), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") - }, - new - { - Id = new Guid("10294c17-9c23-4a28-b2c3-8e55c212e548"), - ChatId = new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), - Content = "TypeScript The Best", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6359), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") - }, - new - { - Id = new Guid("c004bf75-a1b1-4d5a-8775-921757c43ba1"), - ChatId = new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), - Content = "Слава Партии!!", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6361), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") - }, - new - { - Id = new Guid("49497e7c-b819-4960-ae9a-cd9f995a620d"), - ChatId = new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), - Content = "Слава Партии!!", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6362), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("a9981f4e-cd57-48f5-85d4-505e51f8ea83"), - ChatId = new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), - Content = "Слава Партии!!", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6371), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") - }, - new - { - Id = new Guid("1341a7ed-70c1-4b2e-adba-27d6704289e5"), - ChatId = new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), - Content = "Слава Партии!!", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6372), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") - }, - new - { - Id = new Guid("47aff891-5254-40c7-b706-489106ce81a7"), - ChatId = new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6373), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") - }, - new - { - Id = new Guid("f3a1170d-84fe-4586-a6f1-14977ec8bd1b"), - ChatId = new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6374), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("fc924fc7-ac8c-4a85-9526-b49907766a3f"), - ChatId = new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6375), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") - }, - new - { - Id = new Guid("fa484a5f-06c8-44a0-b1ad-753b6d198ad5"), - ChatId = new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6376), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") - }, - new - { - Id = new Guid("a50f577e-cf40-4705-9422-2346ae9a1512"), - ChatId = new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6377), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") - }, - new - { - Id = new Guid("3c0c34be-ee09-4b00-9c4d-147fcfbfdbd4"), - ChatId = new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6378), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("0e1b34ba-78b0-4ae8-8840-4003a4c8be97"), - ChatId = new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6381), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") - }, - new - { - Id = new Guid("4fef0fcd-21c7-4b67-9ff4-8f54bba05cb6"), - ChatId = new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6382), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") - }, - new - { - Id = new Guid("820f9073-c741-4560-875c-6b50537b1425"), - ChatId = new Guid("f5b7824f-e52b-4246-9984-06fc8e964f0c"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6383), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") - }, - new - { - Id = new Guid("fe4c9a26-330f-4587-adbd-e1ff642dd5c1"), - ChatId = new Guid("f5b7824f-e52b-4246-9984-06fc8e964f0c"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6384), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("97fe67d2-396d-43e8-804a-c6b61b92fe15"), - ChatId = new Guid("f8729a12-5746-443f-ad31-378d846fce30"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6385), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") - }, - new - { - Id = new Guid("364d08a7-ba5d-4708-a991-99cec7a8e254"), - ChatId = new Guid("f8729a12-5746-443f-ad31-378d846fce30"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6386), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("888194fe-d407-492f-ba40-c74b2f4206ba"), - ChatId = new Guid("b119914a-6d95-4047-bf8a-db27deeb7dc9"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6387), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") - }, - new - { - Id = new Guid("da770aea-85ef-44cb-b7cb-a168f3c74106"), - ChatId = new Guid("b119914a-6d95-4047-bf8a-db27deeb7dc9"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6388), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("0105b31a-ba61-41c8-a257-5fb0011ca6ed"), - ChatId = new Guid("9f205dde-0ddc-401f-8fe9-6c794b661f5d"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6390), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") - }, - new - { - Id = new Guid("70a4e5a5-303f-4060-b3ee-9f893575517a"), - ChatId = new Guid("9f205dde-0ddc-401f-8fe9-6c794b661f5d"), - Content = "Hello World", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6391), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") - }, - new - { - Id = new Guid("913c9dc0-1a09-4904-b3e2-c7c70522ec34"), - ChatId = new Guid("3fce8b2c-252d-4514-a1bb-fbdf73c47b78"), - Content = "Hi teacher", - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 617, DateTimeKind.Utc).AddTicks(6392), - UserId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") - }); }); modelBuilder.Entity("MangoAPI.Domain.Entities.RoleEntity", b => @@ -646,225 +259,6 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasIndex("UserId"); b.ToTable("UserChatEntity", "mango"); - - b.HasData( - new - { - ChatId = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - UserId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), - IsArchived = false, - RoleId = 2 - }, - new - { - ChatId = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - UserId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), - IsArchived = false, - RoleId = 4 - }, - new - { - ChatId = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - UserId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - UserId = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("b6ca4533-fc21-4f44-9747-687361e3031c"), - UserId = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - IsArchived = false, - RoleId = 3 - }, - new - { - ChatId = new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), - IsArchived = false, - RoleId = 2 - }, - new - { - ChatId = new Guid("0dae5a74-3528-4e85-95bb-2036bd80432c"), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), - IsArchived = false, - RoleId = 4 - }, - new - { - ChatId = new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - IsArchived = false, - RoleId = 4 - }, - new - { - ChatId = new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), - IsArchived = false, - RoleId = 2 - }, - new - { - ChatId = new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("5e656ec2-205f-471c-b095-1c80b93b7655"), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), - IsArchived = false, - RoleId = 4 - }, - new - { - ChatId = new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - IsArchived = false, - RoleId = 3 - }, - new - { - ChatId = new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("cd358b94-c3b9-4022-923a-13f787f70055"), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - IsArchived = false, - RoleId = 4 - }, - new - { - ChatId = new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("6f66e318-1e94-44ae-9b33-fe001e070842"), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("f5b7824f-e52b-4246-9984-06fc8e964f0c"), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("f5b7824f-e52b-4246-9984-06fc8e964f0c"), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("f8729a12-5746-443f-ad31-378d846fce30"), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("f8729a12-5746-443f-ad31-378d846fce30"), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("b119914a-6d95-4047-bf8a-db27deeb7dc9"), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("b119914a-6d95-4047-bf8a-db27deeb7dc9"), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("9f205dde-0ddc-401f-8fe9-6c794b661f5d"), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("9f205dde-0ddc-401f-8fe9-6c794b661f5d"), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("3fce8b2c-252d-4514-a1bb-fbdf73c47b78"), - UserId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), - IsArchived = false, - RoleId = 1 - }, - new - { - ChatId = new Guid("3fce8b2c-252d-4514-a1bb-fbdf73c47b78"), - UserId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), - IsArchived = false, - RoleId = 1 - }); }); modelBuilder.Entity("MangoAPI.Domain.Entities.UserContactEntity", b => @@ -887,204 +281,6 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasIndex("UserId"); b.ToTable("UserContactEntity", "mango"); - - b.HasData( - new - { - Id = new Guid("845bf9a1-ea0a-4e74-98c0-e8ba6f05d79a"), - ContactId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(115), - UserId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") - }, - new - { - Id = new Guid("70e1af12-7dea-4be9-9a59-498c5a4fc7b7"), - ContactId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(117), - UserId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") - }, - new - { - Id = new Guid("e7fd2b89-5d61-4a06-b312-12b6986b8d09"), - ContactId = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(119), - UserId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") - }, - new - { - Id = new Guid("b0953e09-00ce-4789-9810-077fc179f10d"), - ContactId = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(120), - UserId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4") - }, - new - { - Id = new Guid("b2f445c3-108a-4a45-97f1-c8efc23b28c1"), - ContactId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(121), - UserId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") - }, - new - { - Id = new Guid("46c930ab-b6d9-479f-ae41-0f0f6ed3d046"), - ContactId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(127), - UserId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") - }, - new - { - Id = new Guid("30436ffa-510e-46f6-bae9-41d57bbff811"), - ContactId = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(127), - UserId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") - }, - new - { - Id = new Guid("d61aba3f-5085-4d51-a6cb-ed561f5aee16"), - ContactId = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(128), - UserId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c") - }, - new - { - Id = new Guid("e56d6db4-533e-4884-bc93-67f18059c8b1"), - ContactId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(129), - UserId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") - }, - new - { - Id = new Guid("2130e631-caec-40a7-8a99-565e6d4f0b2c"), - ContactId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(130), - UserId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") - }, - new - { - Id = new Guid("e095810c-16a9-48c4-bb8f-a83810a7085a"), - ContactId = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(131), - UserId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") - }, - new - { - Id = new Guid("bc29498b-3f67-4474-9dd0-c2453ad29c23"), - ContactId = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(132), - UserId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9") - }, - new - { - Id = new Guid("a04e5de0-74c2-468b-b19b-1c1e8fa2d307"), - ContactId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(133), - UserId = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") - }, - new - { - Id = new Guid("21765bdd-964f-4e62-bddd-a61daae327e0"), - ContactId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(136), - UserId = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") - }, - new - { - Id = new Guid("82e1696c-c1c0-49c5-8c03-9669271301f1"), - ContactId = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(137), - UserId = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") - }, - new - { - Id = new Guid("c993ae38-e4e4-4be0-a4a3-40625bd8a111"), - ContactId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(144), - UserId = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7") - }, - new - { - Id = new Guid("43b6da58-938e-4507-940a-842aaae4d38c"), - ContactId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(145), - UserId = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") - }, - new - { - Id = new Guid("bb779603-e891-43aa-9a6a-4e702de5e5fa"), - ContactId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(146), - UserId = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") - }, - new - { - Id = new Guid("f829ac53-0222-444b-bb2b-af28004738dd"), - ContactId = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(147), - UserId = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") - }, - new - { - Id = new Guid("1a08df11-cfe5-4fae-b513-9a606d71bb11"), - ContactId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(148), - UserId = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c") - }, - new - { - Id = new Guid("eab44d50-e986-4f67-bafe-66f6d0423d92"), - ContactId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(149), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a") - }, - new - { - Id = new Guid("38004d6d-baba-4ef7-841c-264c1093628b"), - ContactId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(151), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("7369cc3f-1348-4cb7-9826-d1332e515527"), - ContactId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(152), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("bab3130a-f362-4cbb-8751-e8a1e1e49842"), - ContactId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(153), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("eea9179e-cc11-4407-a717-eef258945a8a"), - ContactId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(154), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("1f5d595d-9c48-4638-9245-8c848334ebc6"), - ContactId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(155), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b") - }, - new - { - Id = new Guid("d898a1a8-5782-4396-9bd0-a8a8a88f5825"), - ContactId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(156), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b") - }, - new - { - Id = new Guid("5f38374f-8f78-4bad-a89f-11a17ab69a37"), - ContactId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 618, DateTimeKind.Utc).AddTicks(157), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") - }); }); modelBuilder.Entity("MangoAPI.Domain.Entities.UserEntity", b => @@ -1166,188 +362,6 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasFilter("[NormalizedUserName] IS NOT NULL"); b.ToTable("UserEntity", "mango"); - - b.HasData( - new - { - Id = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), - AccessFailedCount = 0, - Bio = "13 y. o. | C# pozer, Hearts Of Iron IV noob", - ConcurrencyStamp = "07a80b1b-a290-47ef-bd9f-b859566c40fb", - DisplayName = "Khachatur Khachatryan", - DisplayNameColour = 6, - Email = "xachulxx@gmail.com", - EmailConfirmed = true, - Image = "khachatur_picture.jpg", - LockoutEnabled = false, - NormalizedEmail = "XACHULXX@GMAIL.COM", - PasswordHash = "AQAAAAEAACcQAAAAEH4Y6emlTrY/qD9r0wVIdPr+jMlEg5UQFWo3B2ml+WV3a+V/US0Qz0QYD2Wb8UFWHQ==", - PhoneNumber = "374775554310", - PhoneNumberConfirmed = true, - TwoFactorEnabled = false, - UserName = "KHACHATUR228", - UserNameChanged = false - }, - new - { - Id = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - AccessFailedCount = 0, - Bio = "11011 y.o Dotnet Developer from $\"{cityName}\"", - ConcurrencyStamp = "64e5c929-f9ed-4729-b7b4-e875fdb5ba35", - DisplayName = "razumovsky r", - DisplayNameColour = 9, - Email = "kolosovp95@gmail.com", - EmailConfirmed = true, - Image = "razumovsky_picture.jpg", - LockoutEnabled = false, - NormalizedEmail = "KOLOSOVP94@GMAIL.COM", - PasswordHash = "AQAAAAEAACcQAAAAEABxyhRnIA/HR4Y/+qhG20spWL/A1Os1b4cduWfjrZqzPRxM+/l5if53Ox1JfnHOXA==", - PhoneNumber = "48743615532", - PhoneNumberConfirmed = true, - TwoFactorEnabled = false, - UserName = "razumovsky_r", - UserNameChanged = false - }, - new - { - Id = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), - AccessFailedCount = 0, - Bio = "Колбасятор.", - ConcurrencyStamp = "2cfcf039-ae5f-4fde-bc6f-d91277f51197", - DisplayName = "Мусяка Колбасяка", - DisplayNameColour = 5, - Email = "kolbasator@gmail.com", - EmailConfirmed = true, - Image = "musyaka_picture.jpg", - LockoutEnabled = false, - NormalizedEmail = "KOLBASATOR@GMAIL.COM", - PasswordHash = "AQAAAAEAACcQAAAAEOPQ96FosJ5yyTEz+R7nTveBD8Zj45H+STyCI4g6pfrED+wta53QLvfpFMXsvK8wQQ==", - PhoneNumber = "77017506265", - PhoneNumberConfirmed = true, - TwoFactorEnabled = false, - UserName = "kolbasator", - UserNameChanged = false - }, - new - { - Id = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0"), - AccessFailedCount = 0, - Bio = "Дипломат", - ConcurrencyStamp = "49141190-8cf4-4c9d-a73c-7ba8a4ee5637", - DisplayName = "Amelit", - DisplayNameColour = 4, - Email = "amelit@gmail.com", - EmailConfirmed = true, - Image = "amelit_picture.jpg", - LockoutEnabled = false, - NormalizedEmail = "AMELIT@GMAIL.COM", - PasswordHash = "AQAAAAEAACcQAAAAEBBjGV/32Rdf8yWrUGiS0PWeDqlQM8moKN2AQ25FXKES/LVxLkGBGTWLI8KGXmxaWw==", - PhoneNumber = "12025550152", - PhoneNumberConfirmed = true, - TwoFactorEnabled = false, - UserName = "TheMoonlightSonata", - UserNameChanged = false - }, - new - { - Id = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), - AccessFailedCount = 0, - Bio = "Third year student of WSB at Poznan", - ConcurrencyStamp = "e3aac790-6e45-4257-8714-5fb83202ffc4", - DisplayName = "Petro Kolosov", - DisplayNameColour = 1, - Email = "petro.kolosov@wp.pl", - EmailConfirmed = true, - Image = "razumovsky_picture.jpg", - LockoutEnabled = false, - NormalizedEmail = "PETRO.KOLOSOV@WP.PL", - PasswordHash = "AQAAAAEAACcQAAAAEF65OsfiGeZX6vlIi3QgRn6kKWaJ3GaiyF99v5amR4qZ7HaPkk/fYuxXuO+Jt24E8g==", - PhoneNumber = "48743615532", - PhoneNumberConfirmed = true, - TwoFactorEnabled = false, - UserName = "petro.kolosov", - UserNameChanged = false - }, - new - { - Id = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), - AccessFailedCount = 0, - Bio = "Teacher of Computer Science at WSB Poznan", - ConcurrencyStamp = "f4113452-21a9-47d9-bf3f-7c9f12c6d606", - DisplayName = "Szymon Murawski", - DisplayNameColour = 7, - Email = "szymon.murawski@wp.pl", - EmailConfirmed = true, - Image = "szymon_picture.png", - LockoutEnabled = false, - NormalizedEmail = "SZYMON.MURAWSKI@WP.PL", - PasswordHash = "AQAAAAEAACcQAAAAEIMMC/eudhJER8IMwet1K/CpkaZchLCy7l5iwfOP3JgPZ8LmmJS3VS2uoRNkd51S3g==", - PhoneNumber = "48743615532", - PhoneNumberConfirmed = true, - TwoFactorEnabled = false, - UserName = "szymon.murawski", - UserNameChanged = false - }, - new - { - Id = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), - AccessFailedCount = 0, - Bio = "Third year student of WSB at Poznan", - ConcurrencyStamp = "6f589714-f982-4c27-92aa-780a7cfb0765", - DisplayName = "Illia Zubachov", - DisplayNameColour = 10, - Email = "illia.zubachov@wp.pl", - EmailConfirmed = true, - Image = "illia_picture.png", - LockoutEnabled = false, - NormalizedEmail = "ILLIA.ZUBACHOW@WP.PL", - PasswordHash = "AQAAAAEAACcQAAAAENn4b3kmg7enwkvttBPqmkCO/a41U6IMVj/ZhEZp+lS7zDrMYx8Yz5jauc9pBPhjLQ==", - PhoneNumber = "48352643123", - PhoneNumberConfirmed = true, - TwoFactorEnabled = false, - UserName = "illia.zubachov", - UserNameChanged = false - }, - new - { - Id = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), - AccessFailedCount = 0, - Bio = "Third year student of WSB at Poznan", - ConcurrencyStamp = "a214f8ec-40e8-4204-be6a-4f40a792d72b", - DisplayName = "Arslanbek Temirbekov", - DisplayNameColour = 2, - Email = "arslanbek.temirbekov@wp.pl", - EmailConfirmed = true, - Image = "arslan_picture.png", - LockoutEnabled = false, - NormalizedEmail = "ARSLANBEK.TEMIRBEKOV@WP.PL", - PasswordHash = "AQAAAAEAACcQAAAAEKtadrp8PMU9vk6Y+t9XQPeUoEpU4zSs6PDQdrnsiDKi8yjOmqliUt2SZMlNEHqtOQ==", - PhoneNumber = "48278187781", - PhoneNumberConfirmed = true, - TwoFactorEnabled = false, - UserName = "arslanbek.temirbekov", - UserNameChanged = false - }, - new - { - Id = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), - AccessFailedCount = 0, - Bio = "Third year student of WSB at Poznan", - ConcurrencyStamp = "0a160bc7-0ca1-4104-a97b-e85b3069fafc", - DisplayName = "Serhii Holishevskii", - DisplayNameColour = 8, - Email = "serhii.holishevskii@wp.pl", - EmailConfirmed = true, - Image = "serhii_picture.png", - LockoutEnabled = false, - NormalizedEmail = "SERHII.HOLISHEVSKII@WP.PL", - PasswordHash = "AQAAAAEAACcQAAAAEAL5LUypbP+sH34nbd2xf7DWaas2Fplrj/V9MRJ/J2l56sYEOMMp8GeajO+fq42i6g==", - PhoneNumber = "48175481653", - PhoneNumberConfirmed = true, - TwoFactorEnabled = false, - UserName = "serhii.holishevskii", - UserNameChanged = false - }); }); modelBuilder.Entity("MangoAPI.Domain.Entities.UserInformationEntity", b => @@ -1395,128 +409,6 @@ protected override void BuildModel(ModelBuilder modelBuilder) .IsUnique(); b.ToTable("UserInformationEntity", "mango"); - - b.HasData( - new - { - Id = new Guid("78abac19-6d5d-4ec7-88c3-9bf3377f729d"), - Address = "Poznan, Poland", - BirthDay = new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2652), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2656), - Facebook = "petro.kolosov", - Instagram = "petro.kolosov", - LinkedIn = "petro.kolosov", - Twitter = "petro.kolosov", - UpdatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2655), - UserId = new Guid("2cd4b9a0-f70d-476d-a3cc-908da43f93c4"), - Website = "petro.kolosov.com" - }, - new - { - Id = new Guid("3a670908-ef44-4f5e-b798-833ad41e0fa4"), - Address = "Poznan, Poland", - BirthDay = new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2659), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2660), - Facebook = "illia.zubachov", - Instagram = "illia.zubachov", - LinkedIn = "illia.zubachov", - Twitter = "illia.zubachov", - UpdatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2659), - UserId = new Guid("72a7a013-8bc4-4ae6-89cb-d9f19e0c9cf9"), - Website = "illia.zubachov.com" - }, - new - { - Id = new Guid("4808ba6f-8f9d-4287-8065-cb8f47a26e61"), - Address = "Poznan, Poland", - BirthDay = new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2661), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2662), - Facebook = "serhii.holishevskii", - Instagram = "serhii.holishevskii", - LinkedIn = "serhii.holishevskii", - Twitter = "serhii.holishevskii", - UpdatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2662), - UserId = new Guid("d1ae1de1-1aa8-4650-937c-4ed882038ad7"), - Website = "serhii.holishevskii.com" - }, - new - { - Id = new Guid("d35b5b3a-2ea2-4550-80bf-55bb74068047"), - Address = "Poznan, Poland", - BirthDay = new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2664), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2664), - Facebook = "arslan.temirbekov", - Instagram = "arslan.temirbekov", - LinkedIn = "arslan.temirbekov", - Twitter = "arslan.temirbekov", - UpdatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2664), - UserId = new Guid("56d6294f-7b80-4a78-856a-92b141de2d1c"), - Website = "arslan.temirbekov.com" - }, - new - { - Id = new Guid("88617cff-ebb1-47b5-baf9-543c2dbebf7a"), - Address = "Poznan, Poland", - BirthDay = new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2666), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2666), - Facebook = "szymon.murawski", - Instagram = "szymon.murawski", - LinkedIn = "szymon.murawski", - Twitter = "szymon.murawski", - UpdatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2666), - UserId = new Guid("5e7274ad-3132-4ad7-be36-38778a8f7b1c"), - Website = "szymon.murawski.com" - }, - new - { - Id = new Guid("373fdd53-4ca1-4ec3-876e-73977cab1d6c"), - Address = "Moscow, Russia", - BirthDay = new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2672), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2673), - Instagram = "khachapur.mudrenych", - LinkedIn = "khachapur.mudrenych", - UpdatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2673), - UserId = new Guid("e77cf2cb-3f3a-4f0b-ac5a-90a3263d075a"), - Website = "khachapur.com" - }, - new - { - Id = new Guid("873b6cab-9c7b-4f3c-b69a-c56d5b6d0910"), - Address = "Odessa, Ukraine", - BirthDay = new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2675), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2676), - Facebook = "razumovsky_r", - Instagram = "razumovsky_r", - LinkedIn = "razumovsky_r", - Twitter = "razumovsky_r", - UpdatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2675), - UserId = new Guid("fd3c67c5-c6ff-4a5d-a166-98ece1b7752b"), - Website = "razumovsky.com" - }, - new - { - Id = new Guid("2353df10-362c-4d25-a80d-463061c448f6"), - Address = "Saint-Petersburg, Russia", - BirthDay = new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2677), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2678), - Facebook = "kolbasator", - ProfilePicture = "profile.png", - UpdatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2677), - UserId = new Guid("5b515247-f6f5-47e1-ad06-95f317a0599b"), - Website = "kolbasator.com" - }, - new - { - Id = new Guid("40112876-1179-48c5-bb9d-93a51f8a9a0a"), - Address = "Moscow, Russia", - BirthDay = new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2679), - CreatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2680), - Facebook = "TheMoonlightSonata", - Instagram = "TheMoonlightSonata", - Twitter = "TheMoonlightSonata", - UpdatedAt = new DateTime(2023, 3, 11, 15, 17, 0, 628, DateTimeKind.Utc).AddTicks(2680), - UserId = new Guid("d942706b-e4e2-48f9-bbdc-b022816471f0") - }); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => From b8e8300936a8f14da81ecf9df9b0b7bbd4984353 Mon Sep 17 00:00:00 2001 From: kolosovpetro Date: Sun, 12 Mar 2023 13:51:31 +0100 Subject: [PATCH 02/71] chat entity tests --- .../workflows/build-test-coverage-dotnet.yml | 10 ++ .../CreateChannelCommandHandler.cs | 1 + .../Communities/CreateChatCommandHandler.cs | 1 + .../Communities/CreateCommunityResponse.cs | 1 + .../Communities/JoinChatCommandHandler.cs | 1 + .../Users/RegisterCommandHandler.cs | 13 +-- MangoAPI.BusinessLogic/Models/Chat.cs | 1 + .../Entities/{ => ChatEntities}/ChatEntity.cs | 14 ++- .../ChatEntities/ChatEntityValidator.cs | 26 ++++++ .../{ => ChatEntities}/UserChatEntity.cs | 6 +- MangoAPI.Domain/Entities/MessageEntity.cs | 3 +- MangoAPI.Domain/Entities/UserEntity.cs | 3 +- .../Entities/UserInformationEntity.cs | 2 - MangoAPI.Domain/MangoAPI.Domain.csproj | 29 +++--- .../Configurations/ChatEntityConfiguration.cs | 1 + .../UserChatEntityConfiguration.cs | 1 + .../Database/MangoDbContext.cs | 1 + ...230312124540_InitialMigration.Designer.cs} | 91 +++++++++---------- ....cs => 20230312124540_InitialMigration.cs} | 1 - .../Migrations/MangoDbContextModelSnapshot.cs | 89 +++++++++--------- .../MangoAPI.IntegrationTests.csproj | 1 - ...hatEntityCreateShouldThrowCommunityType.cs | 6 ++ .../ChatEntityCreateShouldThrowDescription.cs | 34 +++++++ .../ChatEntityCreateShouldThrowImage.cs | 6 ++ .../ChatEntityCreateShouldThrowMemberCount.cs | 6 ++ .../ChatEntityCreateShouldThrowTitle.cs | 6 ++ .../ChatEntityCreateTestSuccess.cs | 6 ++ .../Helpers/ChatEntityHelper.cs | 25 +++++ MangoAPI.UnitTests/MangoAPI.UnitTests.csproj | 28 ++++++ MangoAPI.sln | 6 ++ 30 files changed, 293 insertions(+), 126 deletions(-) rename MangoAPI.Domain/Entities/{ => ChatEntities}/ChatEntity.cs (89%) create mode 100644 MangoAPI.Domain/Entities/ChatEntities/ChatEntityValidator.cs rename MangoAPI.Domain/Entities/{ => ChatEntities}/UserChatEntity.cs (90%) rename MangoAPI.Infrastructure/Migrations/{20230312114248_InitialMigration.Designer.cs => 20230312124540_InitialMigration.Designer.cs} (98%) rename MangoAPI.Infrastructure/Migrations/{20230312114248_InitialMigration.cs => 20230312124540_InitialMigration.cs} (99%) create mode 100644 MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityCreateShouldThrowCommunityType.cs create mode 100644 MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityCreateShouldThrowDescription.cs create mode 100644 MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityCreateShouldThrowImage.cs create mode 100644 MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityCreateShouldThrowMemberCount.cs create mode 100644 MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityCreateShouldThrowTitle.cs create mode 100644 MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityCreateTestSuccess.cs create mode 100644 MangoAPI.UnitTests/Helpers/ChatEntityHelper.cs create mode 100644 MangoAPI.UnitTests/MangoAPI.UnitTests.csproj diff --git a/.github/workflows/build-test-coverage-dotnet.yml b/.github/workflows/build-test-coverage-dotnet.yml index 029e384a8..f62a4cc0a 100644 --- a/.github/workflows/build-test-coverage-dotnet.yml +++ b/.github/workflows/build-test-coverage-dotnet.yml @@ -46,6 +46,16 @@ jobs: - name: Build .NET Project run: | dotnet build --no-restore /p:ContinuousIntegrationBuild=true --configuration Release + + - name: Run unit tests + run: | + dotnet test MangoAPI.UnitTests/MangoAPI.UnitTests.csproj --configuration Release --no-build + env: + CollectCoverage: true + CoverletOutputFormat: lcov + ThresholdStat: total + ThresholdType: Line + CoverletOutput: TestResults/ - name: Install and Run Azurite shell: bash diff --git a/MangoAPI.BusinessLogic/ApiCommands/Communities/CreateChannelCommandHandler.cs b/MangoAPI.BusinessLogic/ApiCommands/Communities/CreateChannelCommandHandler.cs index f1ac244da..0afcab339 100644 --- a/MangoAPI.BusinessLogic/ApiCommands/Communities/CreateChannelCommandHandler.cs +++ b/MangoAPI.BusinessLogic/ApiCommands/Communities/CreateChannelCommandHandler.cs @@ -7,6 +7,7 @@ using MangoAPI.BusinessLogic.Responses; using MangoAPI.Domain.Constants; using MangoAPI.Domain.Entities; +using MangoAPI.Domain.Entities.ChatEntities; using MangoAPI.Domain.Enums; using MangoAPI.Infrastructure.Database; using MediatR; diff --git a/MangoAPI.BusinessLogic/ApiCommands/Communities/CreateChatCommandHandler.cs b/MangoAPI.BusinessLogic/ApiCommands/Communities/CreateChatCommandHandler.cs index 6b0512f38..389ccf789 100644 --- a/MangoAPI.BusinessLogic/ApiCommands/Communities/CreateChatCommandHandler.cs +++ b/MangoAPI.BusinessLogic/ApiCommands/Communities/CreateChatCommandHandler.cs @@ -7,6 +7,7 @@ using MangoAPI.BusinessLogic.Responses; using MangoAPI.Domain.Constants; using MangoAPI.Domain.Entities; +using MangoAPI.Domain.Entities.ChatEntities; using MangoAPI.Domain.Enums; using MangoAPI.Infrastructure.Database; using MediatR; diff --git a/MangoAPI.BusinessLogic/ApiCommands/Communities/CreateCommunityResponse.cs b/MangoAPI.BusinessLogic/ApiCommands/Communities/CreateCommunityResponse.cs index 88a614c39..70c650ca1 100644 --- a/MangoAPI.BusinessLogic/ApiCommands/Communities/CreateCommunityResponse.cs +++ b/MangoAPI.BusinessLogic/ApiCommands/Communities/CreateCommunityResponse.cs @@ -3,6 +3,7 @@ using MangoAPI.BusinessLogic.Responses; using MangoAPI.Domain.Constants; using MangoAPI.Domain.Entities; +using MangoAPI.Domain.Entities.ChatEntities; namespace MangoAPI.BusinessLogic.ApiCommands.Communities; diff --git a/MangoAPI.BusinessLogic/ApiCommands/Communities/JoinChatCommandHandler.cs b/MangoAPI.BusinessLogic/ApiCommands/Communities/JoinChatCommandHandler.cs index c310d3417..4fe27d679 100644 --- a/MangoAPI.BusinessLogic/ApiCommands/Communities/JoinChatCommandHandler.cs +++ b/MangoAPI.BusinessLogic/ApiCommands/Communities/JoinChatCommandHandler.cs @@ -4,6 +4,7 @@ using MangoAPI.BusinessLogic.Responses; using MangoAPI.Domain.Constants; using MangoAPI.Domain.Entities; +using MangoAPI.Domain.Entities.ChatEntities; using MangoAPI.Domain.Enums; using MangoAPI.Infrastructure.Database; using MediatR; diff --git a/MangoAPI.BusinessLogic/ApiCommands/Users/RegisterCommandHandler.cs b/MangoAPI.BusinessLogic/ApiCommands/Users/RegisterCommandHandler.cs index 41439faaf..4dd046e9a 100644 --- a/MangoAPI.BusinessLogic/ApiCommands/Users/RegisterCommandHandler.cs +++ b/MangoAPI.BusinessLogic/ApiCommands/Users/RegisterCommandHandler.cs @@ -2,10 +2,10 @@ using System.Threading; using System.Threading.Tasks; using MangoAPI.Application.Interfaces; -using MangoAPI.Application.Services; using MangoAPI.BusinessLogic.Responses; using MangoAPI.Domain.Constants; using MangoAPI.Domain.Entities; +using MangoAPI.Domain.Entities.ChatEntities; using MangoAPI.Domain.Enums; using MangoAPI.Infrastructure.Database; using MediatR; @@ -21,7 +21,7 @@ public class RegisterCommandHandler : IRequestHandler responseFactory, IBlobServiceSettings blobServiceSettings, - PasswordHashService passwordHashService, + // PasswordHashService passwordHashService, IMangoUserSettings mangoUserSettings, IAvatarService avatarService) { @@ -57,7 +57,7 @@ public RegisterCommandHandler( this.jwtGenerator = jwtGenerator; this.jwtGeneratorSettings = jwtGeneratorSettings; this.blobServiceSettings = blobServiceSettings; - this.passwordHashService = passwordHashService; + // this.passwordHashService = passwordHashService; this.mangoUserSettings = mangoUserSettings; this.avatarService = avatarService; } @@ -112,8 +112,9 @@ public async Task> Handle(RegisterCommand request, Cancel if (isMangoUserExists == false) { - passwordHashService.HashPassword(mangoUser, mangoUserSettings.Password); - dbContext.Users.Add(mangoUser); + // passwordHashService.HashPassword(mangoUser, mangoUserSettings.Password); + // dbContext.Users.Add(mangoUser); + await userManager.CreateAsync(mangoUser, mangoUserSettings.Password); } // var mangoChatEntity = new ChatEntity diff --git a/MangoAPI.BusinessLogic/Models/Chat.cs b/MangoAPI.BusinessLogic/Models/Chat.cs index 0eef566e4..58b749c87 100644 --- a/MangoAPI.BusinessLogic/Models/Chat.cs +++ b/MangoAPI.BusinessLogic/Models/Chat.cs @@ -1,6 +1,7 @@ using System; using System.ComponentModel; using MangoAPI.Domain.Entities; +using MangoAPI.Domain.Entities.ChatEntities; using MangoAPI.Domain.Enums; namespace MangoAPI.BusinessLogic.Models; diff --git a/MangoAPI.Domain/Entities/ChatEntity.cs b/MangoAPI.Domain/Entities/ChatEntities/ChatEntity.cs similarity index 89% rename from MangoAPI.Domain/Entities/ChatEntity.cs rename to MangoAPI.Domain/Entities/ChatEntities/ChatEntity.cs index 10d7f9f7a..f2742cba9 100644 --- a/MangoAPI.Domain/Entities/ChatEntity.cs +++ b/MangoAPI.Domain/Entities/ChatEntities/ChatEntity.cs @@ -1,8 +1,9 @@ -using System; -using System.Collections.Generic; +using FluentValidation; using MangoAPI.Domain.Enums; +using System; +using System.Collections.Generic; -namespace MangoAPI.Domain.Entities; +namespace MangoAPI.Domain.Entities.ChatEntities; public sealed class ChatEntity { @@ -46,7 +47,7 @@ private ChatEntity( string description, string image, DateTime createdAt, - int membersCount) : base() + int membersCount) { Title = title; CommunityType = communityType; @@ -58,6 +59,8 @@ private ChatEntity( _messages = new List(); _chatUsers = new List(); Id = Guid.NewGuid(); + + new ChatEntityValidator().ValidateAndThrow(this); } public static ChatEntity Create( @@ -76,11 +79,13 @@ public static ChatEntity Create( public void IncrementMembersCount(int value) { MembersCount += value; + new ChatEntityValidator().ValidateAndThrow(this); } public void ChangeChatImage(string fileName) { Image = fileName; + new ChatEntityValidator().ValidateAndThrow(this); } public void UpdateLastMessage( @@ -104,6 +109,7 @@ public void UpdateLastMessage(string lastMessageText, DateTime lastMessageDate) public void UpdateTitle(string title) { Title = title; + new ChatEntityValidator().ValidateAndThrow(this); } // var channel = new ChatEntity diff --git a/MangoAPI.Domain/Entities/ChatEntities/ChatEntityValidator.cs b/MangoAPI.Domain/Entities/ChatEntities/ChatEntityValidator.cs new file mode 100644 index 000000000..b8032984f --- /dev/null +++ b/MangoAPI.Domain/Entities/ChatEntities/ChatEntityValidator.cs @@ -0,0 +1,26 @@ +using FluentValidation; + +namespace MangoAPI.Domain.Entities.ChatEntities; + +public class ChatEntityValidator : AbstractValidator +{ + public ChatEntityValidator() + { + RuleFor(x => x.Title).NotEmpty(); + + RuleFor(x => x.CommunityType).IsInEnum(); + + RuleFor(x => x.Description) + .NotEmpty() + .WithMessage("Description is required.") + .MaximumLength(100) + .WithMessage("Description cannot exceed 100 characters."); + + RuleFor(x => x.Image).MaximumLength(100) + .WithMessage("Image cannot exceed 100 characters."); + + RuleFor(x => x.CreatedAt).NotEmpty(); + + RuleFor(x => x.MembersCount).GreaterThanOrEqualTo(0); + } +} \ No newline at end of file diff --git a/MangoAPI.Domain/Entities/UserChatEntity.cs b/MangoAPI.Domain/Entities/ChatEntities/UserChatEntity.cs similarity index 90% rename from MangoAPI.Domain/Entities/UserChatEntity.cs rename to MangoAPI.Domain/Entities/ChatEntities/UserChatEntity.cs index c49172adc..43fae5157 100644 --- a/MangoAPI.Domain/Entities/UserChatEntity.cs +++ b/MangoAPI.Domain/Entities/ChatEntities/UserChatEntity.cs @@ -1,7 +1,7 @@ -using System; -using MangoAPI.Domain.Enums; +using MangoAPI.Domain.Enums; +using System; -namespace MangoAPI.Domain.Entities; +namespace MangoAPI.Domain.Entities.ChatEntities; public sealed class UserChatEntity { diff --git a/MangoAPI.Domain/Entities/MessageEntity.cs b/MangoAPI.Domain/Entities/MessageEntity.cs index 5f6036a3f..d0c8e31d1 100644 --- a/MangoAPI.Domain/Entities/MessageEntity.cs +++ b/MangoAPI.Domain/Entities/MessageEntity.cs @@ -1,4 +1,5 @@ -using System; +using MangoAPI.Domain.Entities.ChatEntities; +using System; namespace MangoAPI.Domain.Entities; diff --git a/MangoAPI.Domain/Entities/UserEntity.cs b/MangoAPI.Domain/Entities/UserEntity.cs index aab001577..36f5af364 100644 --- a/MangoAPI.Domain/Entities/UserEntity.cs +++ b/MangoAPI.Domain/Entities/UserEntity.cs @@ -1,4 +1,5 @@ -using System; +using MangoAPI.Domain.Entities.ChatEntities; +using System; using System.Collections.Generic; using MangoAPI.Domain.Enums; using Microsoft.AspNetCore.Identity; diff --git a/MangoAPI.Domain/Entities/UserInformationEntity.cs b/MangoAPI.Domain/Entities/UserInformationEntity.cs index 8189d3c2d..56f54b6c0 100644 --- a/MangoAPI.Domain/Entities/UserInformationEntity.cs +++ b/MangoAPI.Domain/Entities/UserInformationEntity.cs @@ -22,8 +22,6 @@ public sealed class UserInformationEntity public string LinkedIn { get; set; } - public string ProfilePicture { get; set; } - public DateTime CreatedAt { get; set; } public DateTime? UpdatedAt { get; set; } diff --git a/MangoAPI.Domain/MangoAPI.Domain.csproj b/MangoAPI.Domain/MangoAPI.Domain.csproj index af327eae7..7bddd0a6b 100644 --- a/MangoAPI.Domain/MangoAPI.Domain.csproj +++ b/MangoAPI.Domain/MangoAPI.Domain.csproj @@ -13,19 +13,20 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - - - - + + + + + + + + + + + + + + + diff --git a/MangoAPI.Infrastructure/Database/Configurations/ChatEntityConfiguration.cs b/MangoAPI.Infrastructure/Database/Configurations/ChatEntityConfiguration.cs index bfcf0b370..d2d632218 100644 --- a/MangoAPI.Infrastructure/Database/Configurations/ChatEntityConfiguration.cs +++ b/MangoAPI.Infrastructure/Database/Configurations/ChatEntityConfiguration.cs @@ -1,6 +1,7 @@ using System; using MangoAPI.Domain.Constants; using MangoAPI.Domain.Entities; +using MangoAPI.Domain.Entities.ChatEntities; using MangoAPI.Domain.Enums; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; diff --git a/MangoAPI.Infrastructure/Database/Configurations/UserChatEntityConfiguration.cs b/MangoAPI.Infrastructure/Database/Configurations/UserChatEntityConfiguration.cs index 16dd812d1..efa259b89 100644 --- a/MangoAPI.Infrastructure/Database/Configurations/UserChatEntityConfiguration.cs +++ b/MangoAPI.Infrastructure/Database/Configurations/UserChatEntityConfiguration.cs @@ -1,5 +1,6 @@ using MangoAPI.Domain.Constants; using MangoAPI.Domain.Entities; +using MangoAPI.Domain.Entities.ChatEntities; using MangoAPI.Domain.Enums; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; diff --git a/MangoAPI.Infrastructure/Database/MangoDbContext.cs b/MangoAPI.Infrastructure/Database/MangoDbContext.cs index 274a5de41..95f3b29f7 100644 --- a/MangoAPI.Infrastructure/Database/MangoDbContext.cs +++ b/MangoAPI.Infrastructure/Database/MangoDbContext.cs @@ -1,6 +1,7 @@ using System; using System.Reflection; using MangoAPI.Domain.Entities; +using MangoAPI.Domain.Entities.ChatEntities; using Microsoft.AspNetCore.Identity.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; diff --git a/MangoAPI.Infrastructure/Migrations/20230312114248_InitialMigration.Designer.cs b/MangoAPI.Infrastructure/Migrations/20230312124540_InitialMigration.Designer.cs similarity index 98% rename from MangoAPI.Infrastructure/Migrations/20230312114248_InitialMigration.Designer.cs rename to MangoAPI.Infrastructure/Migrations/20230312124540_InitialMigration.Designer.cs index c57a07be5..7e8c77f92 100644 --- a/MangoAPI.Infrastructure/Migrations/20230312114248_InitialMigration.Designer.cs +++ b/MangoAPI.Infrastructure/Migrations/20230312124540_InitialMigration.Designer.cs @@ -12,7 +12,7 @@ namespace MangoAPI.Infrastructure.Migrations { [DbContext(typeof(MangoDbContext))] - [Migration("20230312114248_InitialMigration")] + [Migration("20230312124540_InitialMigration")] partial class InitialMigration { protected override void BuildTargetModel(ModelBuilder modelBuilder) @@ -24,7 +24,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1); - modelBuilder.Entity("MangoAPI.Domain.Entities.ChatEntity", b => + modelBuilder.Entity("MangoAPI.Domain.Entities.ChatEntities.ChatEntity", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -69,6 +69,27 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.ToTable("ChatEntity", "mango"); }); + modelBuilder.Entity("MangoAPI.Domain.Entities.ChatEntities.UserChatEntity", b => + { + b.Property("ChatId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsArchived") + .HasColumnType("bit"); + + b.Property("RoleId") + .HasColumnType("int"); + + b.HasKey("ChatId", "UserId"); + + b.HasIndex("UserId"); + + b.ToTable("UserChatEntity", "mango"); + }); + modelBuilder.Entity("MangoAPI.Domain.Entities.DiffieHellmanKeyExchangeEntity", b => { b.Property("Id") @@ -242,27 +263,6 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.ToTable("SessionEntity", "mango"); }); - modelBuilder.Entity("MangoAPI.Domain.Entities.UserChatEntity", b => - { - b.Property("ChatId") - .HasColumnType("uniqueidentifier"); - - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.Property("IsArchived") - .HasColumnType("bit"); - - b.Property("RoleId") - .HasColumnType("int"); - - b.HasKey("ChatId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("UserChatEntity", "mango"); - }); - modelBuilder.Entity("MangoAPI.Domain.Entities.UserContactEntity", b => { b.Property("Id") @@ -390,9 +390,6 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Property("LinkedIn") .HasColumnType("nvarchar(max)"); - b.Property("ProfilePicture") - .HasColumnType("nvarchar(max)"); - b.Property("Twitter") .HasColumnType("nvarchar(max)"); @@ -516,6 +513,25 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.ToTable("AspNetUserTokens", (string)null); }); + modelBuilder.Entity("MangoAPI.Domain.Entities.ChatEntities.UserChatEntity", b => + { + b.HasOne("MangoAPI.Domain.Entities.ChatEntities.ChatEntity", "Chat") + .WithMany("ChatUsers") + .HasForeignKey("ChatId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("MangoAPI.Domain.Entities.UserEntity", "User") + .WithMany("UserChats") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Chat"); + + b.Navigation("User"); + }); + modelBuilder.Entity("MangoAPI.Domain.Entities.DocumentEntity", b => { b.HasOne("MangoAPI.Domain.Entities.UserEntity", "User") @@ -529,7 +545,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) modelBuilder.Entity("MangoAPI.Domain.Entities.MessageEntity", b => { - b.HasOne("MangoAPI.Domain.Entities.ChatEntity", "Chat") + b.HasOne("MangoAPI.Domain.Entities.ChatEntities.ChatEntity", "Chat") .WithMany("Messages") .HasForeignKey("ChatId") .OnDelete(DeleteBehavior.Cascade) @@ -557,25 +573,6 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("UserEntity"); }); - modelBuilder.Entity("MangoAPI.Domain.Entities.UserChatEntity", b => - { - b.HasOne("MangoAPI.Domain.Entities.ChatEntity", "Chat") - .WithMany("ChatUsers") - .HasForeignKey("ChatId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("MangoAPI.Domain.Entities.UserEntity", "User") - .WithMany("UserChats") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Chat"); - - b.Navigation("User"); - }); - modelBuilder.Entity("MangoAPI.Domain.Entities.UserContactEntity", b => { b.HasOne("MangoAPI.Domain.Entities.UserEntity", "User") @@ -649,7 +646,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .IsRequired(); }); - modelBuilder.Entity("MangoAPI.Domain.Entities.ChatEntity", b => + modelBuilder.Entity("MangoAPI.Domain.Entities.ChatEntities.ChatEntity", b => { b.Navigation("ChatUsers"); diff --git a/MangoAPI.Infrastructure/Migrations/20230312114248_InitialMigration.cs b/MangoAPI.Infrastructure/Migrations/20230312124540_InitialMigration.cs similarity index 99% rename from MangoAPI.Infrastructure/Migrations/20230312114248_InitialMigration.cs rename to MangoAPI.Infrastructure/Migrations/20230312124540_InitialMigration.cs index 0c0709f26..09d648bf9 100644 --- a/MangoAPI.Infrastructure/Migrations/20230312114248_InitialMigration.cs +++ b/MangoAPI.Infrastructure/Migrations/20230312124540_InitialMigration.cs @@ -369,7 +369,6 @@ protected override void Up(MigrationBuilder migrationBuilder) Twitter = table.Column(type: "nvarchar(max)", nullable: true), Instagram = table.Column(type: "nvarchar(max)", nullable: true), LinkedIn = table.Column(type: "nvarchar(max)", nullable: true), - ProfilePicture = table.Column(type: "nvarchar(max)", nullable: true), CreatedAt = table.Column(type: "datetime2", nullable: false), UpdatedAt = table.Column(type: "datetime2", nullable: true) }, diff --git a/MangoAPI.Infrastructure/Migrations/MangoDbContextModelSnapshot.cs b/MangoAPI.Infrastructure/Migrations/MangoDbContextModelSnapshot.cs index 49abdc974..71249929d 100644 --- a/MangoAPI.Infrastructure/Migrations/MangoDbContextModelSnapshot.cs +++ b/MangoAPI.Infrastructure/Migrations/MangoDbContextModelSnapshot.cs @@ -22,7 +22,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1); - modelBuilder.Entity("MangoAPI.Domain.Entities.ChatEntity", b => + modelBuilder.Entity("MangoAPI.Domain.Entities.ChatEntities.ChatEntity", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -67,6 +67,27 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.ToTable("ChatEntity", "mango"); }); + modelBuilder.Entity("MangoAPI.Domain.Entities.ChatEntities.UserChatEntity", b => + { + b.Property("ChatId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsArchived") + .HasColumnType("bit"); + + b.Property("RoleId") + .HasColumnType("int"); + + b.HasKey("ChatId", "UserId"); + + b.HasIndex("UserId"); + + b.ToTable("UserChatEntity", "mango"); + }); + modelBuilder.Entity("MangoAPI.Domain.Entities.DiffieHellmanKeyExchangeEntity", b => { b.Property("Id") @@ -240,27 +261,6 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.ToTable("SessionEntity", "mango"); }); - modelBuilder.Entity("MangoAPI.Domain.Entities.UserChatEntity", b => - { - b.Property("ChatId") - .HasColumnType("uniqueidentifier"); - - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.Property("IsArchived") - .HasColumnType("bit"); - - b.Property("RoleId") - .HasColumnType("int"); - - b.HasKey("ChatId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("UserChatEntity", "mango"); - }); - modelBuilder.Entity("MangoAPI.Domain.Entities.UserContactEntity", b => { b.Property("Id") @@ -388,9 +388,6 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Property("LinkedIn") .HasColumnType("nvarchar(max)"); - b.Property("ProfilePicture") - .HasColumnType("nvarchar(max)"); - b.Property("Twitter") .HasColumnType("nvarchar(max)"); @@ -514,6 +511,25 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.ToTable("AspNetUserTokens", (string)null); }); + modelBuilder.Entity("MangoAPI.Domain.Entities.ChatEntities.UserChatEntity", b => + { + b.HasOne("MangoAPI.Domain.Entities.ChatEntities.ChatEntity", "Chat") + .WithMany("ChatUsers") + .HasForeignKey("ChatId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("MangoAPI.Domain.Entities.UserEntity", "User") + .WithMany("UserChats") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Chat"); + + b.Navigation("User"); + }); + modelBuilder.Entity("MangoAPI.Domain.Entities.DocumentEntity", b => { b.HasOne("MangoAPI.Domain.Entities.UserEntity", "User") @@ -527,7 +543,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) modelBuilder.Entity("MangoAPI.Domain.Entities.MessageEntity", b => { - b.HasOne("MangoAPI.Domain.Entities.ChatEntity", "Chat") + b.HasOne("MangoAPI.Domain.Entities.ChatEntities.ChatEntity", "Chat") .WithMany("Messages") .HasForeignKey("ChatId") .OnDelete(DeleteBehavior.Cascade) @@ -555,25 +571,6 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Navigation("UserEntity"); }); - modelBuilder.Entity("MangoAPI.Domain.Entities.UserChatEntity", b => - { - b.HasOne("MangoAPI.Domain.Entities.ChatEntity", "Chat") - .WithMany("ChatUsers") - .HasForeignKey("ChatId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("MangoAPI.Domain.Entities.UserEntity", "User") - .WithMany("UserChats") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Chat"); - - b.Navigation("User"); - }); - modelBuilder.Entity("MangoAPI.Domain.Entities.UserContactEntity", b => { b.HasOne("MangoAPI.Domain.Entities.UserEntity", "User") @@ -647,7 +644,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) .IsRequired(); }); - modelBuilder.Entity("MangoAPI.Domain.Entities.ChatEntity", b => + modelBuilder.Entity("MangoAPI.Domain.Entities.ChatEntities.ChatEntity", b => { b.Navigation("ChatUsers"); diff --git a/MangoAPI.IntegrationTests/MangoAPI.IntegrationTests.csproj b/MangoAPI.IntegrationTests/MangoAPI.IntegrationTests.csproj index 55bca8e0d..0e35aca79 100644 --- a/MangoAPI.IntegrationTests/MangoAPI.IntegrationTests.csproj +++ b/MangoAPI.IntegrationTests/MangoAPI.IntegrationTests.csproj @@ -23,7 +23,6 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - diff --git a/MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityCreateShouldThrowCommunityType.cs b/MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityCreateShouldThrowCommunityType.cs new file mode 100644 index 000000000..156228403 --- /dev/null +++ b/MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityCreateShouldThrowCommunityType.cs @@ -0,0 +1,6 @@ +namespace MangoAPI.UnitTests.Domain.ChatEntityTests; + +public class ChatEntityCreateShouldThrowCommunityType +{ + +} \ No newline at end of file diff --git a/MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityCreateShouldThrowDescription.cs b/MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityCreateShouldThrowDescription.cs new file mode 100644 index 000000000..2b75d3e65 --- /dev/null +++ b/MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityCreateShouldThrowDescription.cs @@ -0,0 +1,34 @@ +using FluentAssertions; +using FluentValidation; +using MangoAPI.Domain.Entities.ChatEntities; +using MangoAPI.UnitTests.Helpers; +using System; +using System.Linq; +using Xunit; + +namespace MangoAPI.UnitTests.Domain.ChatEntityTests; + +public class ChatEntityCreateShouldThrowDescription +{ + [Theory] + [InlineData(null)] + [InlineData("")] + public void ChatEntityCreateShouldThrowDescriptionEmpty(string testParam) + { + Func CreateChatEntity = () => ChatEntityHelper.CreateWithDescription(testParam); + + CreateChatEntity.Should().ThrowExactly() + .Where(x => x.Message.Contains("Description is required.")); + } + + [Fact] + public void ChatEntityCreateShouldThrowDescriptionOverflow() + { + var overflow = new string(Enumerable.Repeat('a', 102).ToArray()); + + Func CreateChatEntity = () => ChatEntityHelper.CreateWithDescription(overflow); + + CreateChatEntity.Should().ThrowExactly() + .Where(x => x.Message.Contains("Description cannot exceed 100 characters.")); + } +} \ No newline at end of file diff --git a/MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityCreateShouldThrowImage.cs b/MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityCreateShouldThrowImage.cs new file mode 100644 index 000000000..97f293197 --- /dev/null +++ b/MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityCreateShouldThrowImage.cs @@ -0,0 +1,6 @@ +namespace MangoAPI.UnitTests.Domain.ChatEntityTests; + +public class ChatEntityCreateShouldThrowImage +{ + +} \ No newline at end of file diff --git a/MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityCreateShouldThrowMemberCount.cs b/MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityCreateShouldThrowMemberCount.cs new file mode 100644 index 000000000..5e121ce8c --- /dev/null +++ b/MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityCreateShouldThrowMemberCount.cs @@ -0,0 +1,6 @@ +namespace MangoAPI.UnitTests.Domain.ChatEntityTests; + +public class ChatEntityCreateShouldThrowMemberCount +{ + +} \ No newline at end of file diff --git a/MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityCreateShouldThrowTitle.cs b/MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityCreateShouldThrowTitle.cs new file mode 100644 index 000000000..44787cc9f --- /dev/null +++ b/MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityCreateShouldThrowTitle.cs @@ -0,0 +1,6 @@ +namespace MangoAPI.UnitTests.Domain.ChatEntityTests; + +public class ChatEntityCreateShouldThrowTitle +{ + +} \ No newline at end of file diff --git a/MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityCreateTestSuccess.cs b/MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityCreateTestSuccess.cs new file mode 100644 index 000000000..28f3bab50 --- /dev/null +++ b/MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityCreateTestSuccess.cs @@ -0,0 +1,6 @@ +namespace MangoAPI.UnitTests.Domain.ChatEntityTests; + +public class ChatEntityCreateTestSuccess +{ + +} \ No newline at end of file diff --git a/MangoAPI.UnitTests/Helpers/ChatEntityHelper.cs b/MangoAPI.UnitTests/Helpers/ChatEntityHelper.cs new file mode 100644 index 000000000..078a40bcc --- /dev/null +++ b/MangoAPI.UnitTests/Helpers/ChatEntityHelper.cs @@ -0,0 +1,25 @@ +using MangoAPI.Domain.Entities.ChatEntities; +using MangoAPI.Domain.Enums; +using System; + +namespace MangoAPI.UnitTests.Helpers; + +public class ChatEntityHelper +{ + public const string Title = "Mango Messenger"; + public const string Description = "Service notifications"; + public const string Image = "mango_image.png"; + + public static ChatEntity CreateWithDescription(string description) + { + var chat = ChatEntity.Create( + Title, + CommunityType.DirectChat, + description, + Image, + DateTime.UtcNow, + membersCount: 2); + + return chat; + } +} \ No newline at end of file diff --git a/MangoAPI.UnitTests/MangoAPI.UnitTests.csproj b/MangoAPI.UnitTests/MangoAPI.UnitTests.csproj new file mode 100644 index 000000000..24d152b72 --- /dev/null +++ b/MangoAPI.UnitTests/MangoAPI.UnitTests.csproj @@ -0,0 +1,28 @@ + + + + net6.0 + false + true + Recommended + true + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + + + + + diff --git a/MangoAPI.sln b/MangoAPI.sln index be2f584f4..0bf93f3e4 100644 --- a/MangoAPI.sln +++ b/MangoAPI.sln @@ -208,6 +208,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "keyvault-secrets", "keyvaul terraform\modules\keyvault-secrets\variables.tf = terraform\modules\keyvault-secrets\variables.tf EndProjectSection EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MangoAPI.UnitTests", "MangoAPI.UnitTests\MangoAPI.UnitTests.csproj", "{4128BDA5-00F6-4500-A249-1B12C84840AA}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -246,6 +248,10 @@ Global {D60AA7DE-4121-4C89-91D3-8DBBF735E13F}.Debug|Any CPU.Build.0 = Debug|Any CPU {D60AA7DE-4121-4C89-91D3-8DBBF735E13F}.Release|Any CPU.ActiveCfg = Release|Any CPU {D60AA7DE-4121-4C89-91D3-8DBBF735E13F}.Release|Any CPU.Build.0 = Release|Any CPU + {4128BDA5-00F6-4500-A249-1B12C84840AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4128BDA5-00F6-4500-A249-1B12C84840AA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4128BDA5-00F6-4500-A249-1B12C84840AA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4128BDA5-00F6-4500-A249-1B12C84840AA}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE From d0d046b922fbdc803e6302b29aca3773021b2e40 Mon Sep 17 00:00:00 2001 From: kolosovpetro Date: Sun, 12 Mar 2023 13:59:59 +0100 Subject: [PATCH 03/71] workflow fix --- .github/workflows/build-test-coverage-dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-test-coverage-dotnet.yml b/.github/workflows/build-test-coverage-dotnet.yml index f62a4cc0a..8866189f5 100644 --- a/.github/workflows/build-test-coverage-dotnet.yml +++ b/.github/workflows/build-test-coverage-dotnet.yml @@ -50,7 +50,7 @@ jobs: - name: Run unit tests run: | dotnet test MangoAPI.UnitTests/MangoAPI.UnitTests.csproj --configuration Release --no-build - env: + env: CollectCoverage: true CoverletOutputFormat: lcov ThresholdStat: total From 895a1baf819cb50408341985ddea9ed4e601ab0d Mon Sep 17 00:00:00 2001 From: kolosovpetro Date: Sun, 12 Mar 2023 14:03:54 +0100 Subject: [PATCH 04/71] add coverlet msbuild --- MangoAPI.UnitTests/MangoAPI.UnitTests.csproj | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/MangoAPI.UnitTests/MangoAPI.UnitTests.csproj b/MangoAPI.UnitTests/MangoAPI.UnitTests.csproj index 24d152b72..c2f8d84d3 100644 --- a/MangoAPI.UnitTests/MangoAPI.UnitTests.csproj +++ b/MangoAPI.UnitTests/MangoAPI.UnitTests.csproj @@ -9,6 +9,10 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + From ef817097c056294d7b11a4888f315a832e3caccf Mon Sep 17 00:00:00 2001 From: kolosovpetro Date: Sun, 12 Mar 2023 15:16:28 +0100 Subject: [PATCH 05/71] chat image test --- .../Entities/ChatEntities/ChatEntity.cs | 10 ------- .../ChatEntities/ChatEntityValidator.cs | 3 ++- .../ChatEntityCreateShouldThrowImage.cs | 20 ++++++++++++-- .../ChatEntityCreateTestSuccess.cs | 16 ++++++++++-- .../Helpers/ChatEntityHelper.cs | 26 +++++++++++++++++++ 5 files changed, 60 insertions(+), 15 deletions(-) diff --git a/MangoAPI.Domain/Entities/ChatEntities/ChatEntity.cs b/MangoAPI.Domain/Entities/ChatEntities/ChatEntity.cs index f2742cba9..212783e76 100644 --- a/MangoAPI.Domain/Entities/ChatEntities/ChatEntity.cs +++ b/MangoAPI.Domain/Entities/ChatEntities/ChatEntity.cs @@ -111,14 +111,4 @@ public void UpdateTitle(string title) Title = title; new ChatEntityValidator().ValidateAndThrow(this); } - - // var channel = new ChatEntity - // { - // CommunityType = CommunityType.PublicChannel, - // Title = request.ChannelTitle, - // CreatedAt = DateTime.UtcNow, - // Description = request.ChannelDescription, - // MembersCount = 1, - // Image = "default_group_logo.png", - // }; } \ No newline at end of file diff --git a/MangoAPI.Domain/Entities/ChatEntities/ChatEntityValidator.cs b/MangoAPI.Domain/Entities/ChatEntities/ChatEntityValidator.cs index b8032984f..3d4ecdea4 100644 --- a/MangoAPI.Domain/Entities/ChatEntities/ChatEntityValidator.cs +++ b/MangoAPI.Domain/Entities/ChatEntities/ChatEntityValidator.cs @@ -16,7 +16,8 @@ public ChatEntityValidator() .MaximumLength(100) .WithMessage("Description cannot exceed 100 characters."); - RuleFor(x => x.Image).MaximumLength(100) + RuleFor(x => x.Image) + .MaximumLength(100) .WithMessage("Image cannot exceed 100 characters."); RuleFor(x => x.CreatedAt).NotEmpty(); diff --git a/MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityCreateShouldThrowImage.cs b/MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityCreateShouldThrowImage.cs index 97f293197..91d9a2e91 100644 --- a/MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityCreateShouldThrowImage.cs +++ b/MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityCreateShouldThrowImage.cs @@ -1,6 +1,22 @@ -namespace MangoAPI.UnitTests.Domain.ChatEntityTests; +using FluentAssertions; +using FluentValidation; +using MangoAPI.Domain.Entities.ChatEntities; +using MangoAPI.UnitTests.Helpers; +using System; +using System.Linq; +using Xunit; + +namespace MangoAPI.UnitTests.Domain.ChatEntityTests; public class ChatEntityCreateShouldThrowImage { - + [Fact] + public void ChatEntityCreateShouldThrowImageOverflow() + { + var imageName = new string(Enumerable.Repeat('a', 102).ToArray()); + Func CreateWithImage = () => ChatEntityHelper.CreateWithImage(imageName); + + CreateWithImage.Should().ThrowExactly() + .Where(x => x.Message.Contains("Image cannot exceed 100 characters.")); + } } \ No newline at end of file diff --git a/MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityCreateTestSuccess.cs b/MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityCreateTestSuccess.cs index 28f3bab50..45c596447 100644 --- a/MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityCreateTestSuccess.cs +++ b/MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityCreateTestSuccess.cs @@ -1,6 +1,18 @@ -namespace MangoAPI.UnitTests.Domain.ChatEntityTests; +using FluentAssertions; +using MangoAPI.Domain.Entities.ChatEntities; +using MangoAPI.UnitTests.Helpers; +using System; +using Xunit; + +namespace MangoAPI.UnitTests.Domain.ChatEntityTests; public class ChatEntityCreateTestSuccess { - + [Fact] + public void CreateChatEntityTestSuccess() + { + Func CreateChatEntity = () => ChatEntityHelper.CreateSuccess(); + + CreateChatEntity.Should().NotThrow(); + } } \ No newline at end of file diff --git a/MangoAPI.UnitTests/Helpers/ChatEntityHelper.cs b/MangoAPI.UnitTests/Helpers/ChatEntityHelper.cs index 078a40bcc..652da9c1d 100644 --- a/MangoAPI.UnitTests/Helpers/ChatEntityHelper.cs +++ b/MangoAPI.UnitTests/Helpers/ChatEntityHelper.cs @@ -22,4 +22,30 @@ public static ChatEntity CreateWithDescription(string description) return chat; } + + public static ChatEntity CreateWithImage(string image) + { + var chat = ChatEntity.Create( + Title, + CommunityType.DirectChat, + Description, + image, + DateTime.UtcNow, + membersCount: 2); + + return chat; + } + + public static ChatEntity CreateSuccess() + { + var chat = ChatEntity.Create( + Title, + CommunityType.DirectChat, + Description, + Image, + DateTime.UtcNow, + membersCount: 2); + + return chat; + } } \ No newline at end of file From 5e7fa6bf5186ea808ea05269799d9cf4744c7dc3 Mon Sep 17 00:00:00 2001 From: kolosovpetro Date: Sun, 12 Mar 2023 16:21:14 +0100 Subject: [PATCH 06/71] chat entity validator --- .../Messages/EditMessageCommandHandler.cs | 2 - .../Messages/SendMessageCommandHandler.cs | 6 -- .../Entities/ChatEntities/ChatEntity.cs | 13 ++-- .../ChatEntities/ChatEntityValidator.cs | 24 ++++--- .../Entities/ChatEntities/UserChatEntity.cs | 5 -- ...hatEntityCreateShouldThrowCommunityType.cs | 23 ++++++- .../ChatEntityCreateShouldThrowDescription.cs | 6 +- .../ChatEntityCreateShouldThrowImage.cs | 3 +- ...tEntityCreateShouldThrowLastMessageText.cs | 30 +++++++++ .../ChatEntityCreateShouldThrowMemberCount.cs | 15 ++++- .../ChatEntityCreateShouldThrowTitle.cs | 29 ++++++++- .../ChatEntityShouldThrowLastAuthor.cs | 30 +++++++++ .../Helpers/ChatEntityHelper.cs | 62 ++++++++++++++++++- 13 files changed, 206 insertions(+), 42 deletions(-) create mode 100644 MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityCreateShouldThrowLastMessageText.cs create mode 100644 MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityShouldThrowLastAuthor.cs diff --git a/MangoAPI.BusinessLogic/ApiCommands/Messages/EditMessageCommandHandler.cs b/MangoAPI.BusinessLogic/ApiCommands/Messages/EditMessageCommandHandler.cs index f704c193d..896825f7e 100644 --- a/MangoAPI.BusinessLogic/ApiCommands/Messages/EditMessageCommandHandler.cs +++ b/MangoAPI.BusinessLogic/ApiCommands/Messages/EditMessageCommandHandler.cs @@ -82,8 +82,6 @@ public async Task> Handle( if (messageIsLast) { - // chat.LastMessageText = request.ModifiedText; - // chat.LastMessageTime = updatedAt; chat.UpdateLastMessage(request.ModifiedText, updatedAt); } diff --git a/MangoAPI.BusinessLogic/ApiCommands/Messages/SendMessageCommandHandler.cs b/MangoAPI.BusinessLogic/ApiCommands/Messages/SendMessageCommandHandler.cs index 78c04cf8f..ff0ca1db1 100644 --- a/MangoAPI.BusinessLogic/ApiCommands/Messages/SendMessageCommandHandler.cs +++ b/MangoAPI.BusinessLogic/ApiCommands/Messages/SendMessageCommandHandler.cs @@ -86,12 +86,6 @@ public async Task> Handle( InReplayToText = request.InReplayToText, }; - // userChat.Chat.UpdatedAt = messageEntity.CreatedAt; - // userChat.Chat.LastMessageAuthor = user.DisplayName; - // userChat.Chat.LastMessageText = messageEntity.Content; - // userChat.Chat.LastMessageTime = messageEntity.CreatedAt; - // userChat.Chat.LastMessageId = messageEntity.Id; - userChat.Chat.UpdateLastMessage( lastMessageAuthor: user.DisplayName, lastMessageText: messageEntity.Content, diff --git a/MangoAPI.Domain/Entities/ChatEntities/ChatEntity.cs b/MangoAPI.Domain/Entities/ChatEntities/ChatEntity.cs index 212783e76..fbbecd31b 100644 --- a/MangoAPI.Domain/Entities/ChatEntities/ChatEntity.cs +++ b/MangoAPI.Domain/Entities/ChatEntities/ChatEntity.cs @@ -55,11 +55,11 @@ private ChatEntity( Image = image; CreatedAt = createdAt; MembersCount = membersCount; - + _messages = new List(); _chatUsers = new List(); Id = Guid.NewGuid(); - + new ChatEntityValidator().ValidateAndThrow(this); } @@ -91,19 +91,20 @@ public void ChangeChatImage(string fileName) public void UpdateLastMessage( string lastMessageAuthor, string lastMessageText, - DateTime? lastMessageTime, + DateTime? lastMessageDate, Guid? lastMessageId) { + UpdateLastMessage(lastMessageText, lastMessageDate); LastMessageAuthor = lastMessageAuthor; - LastMessageText = lastMessageText; - LastMessageTime = lastMessageTime; LastMessageId = lastMessageId; + new ChatEntityValidator().ValidateAndThrow(this); } - public void UpdateLastMessage(string lastMessageText, DateTime lastMessageDate) + public void UpdateLastMessage(string lastMessageText, DateTime? lastMessageDate) { LastMessageText = lastMessageText; LastMessageTime = lastMessageDate; + new ChatEntityValidator().ValidateAndThrow(this); } public void UpdateTitle(string title) diff --git a/MangoAPI.Domain/Entities/ChatEntities/ChatEntityValidator.cs b/MangoAPI.Domain/Entities/ChatEntities/ChatEntityValidator.cs index 3d4ecdea4..adc6e2d25 100644 --- a/MangoAPI.Domain/Entities/ChatEntities/ChatEntityValidator.cs +++ b/MangoAPI.Domain/Entities/ChatEntities/ChatEntityValidator.cs @@ -6,22 +6,28 @@ public class ChatEntityValidator : AbstractValidator { public ChatEntityValidator() { - RuleFor(x => x.Title).NotEmpty(); + RuleFor(x => x.Title) + .NotEmpty() + .MaximumLength(100); - RuleFor(x => x.CommunityType).IsInEnum(); + RuleFor(x => x.CommunityType) + .IsInEnum(); RuleFor(x => x.Description) .NotEmpty() - .WithMessage("Description is required.") - .MaximumLength(100) - .WithMessage("Description cannot exceed 100 characters."); + .MaximumLength(100); RuleFor(x => x.Image) - .MaximumLength(100) - .WithMessage("Image cannot exceed 100 characters."); + .MaximumLength(100); + + RuleFor(x => x.CreatedAt) + .NotEmpty(); + + RuleFor(x => x.MembersCount) + .GreaterThanOrEqualTo(0); - RuleFor(x => x.CreatedAt).NotEmpty(); + RuleFor(x => x.LastMessageText).MaximumLength(300); - RuleFor(x => x.MembersCount).GreaterThanOrEqualTo(0); + RuleFor(x => x.LastMessageAuthor).MaximumLength(50); } } \ No newline at end of file diff --git a/MangoAPI.Domain/Entities/ChatEntities/UserChatEntity.cs b/MangoAPI.Domain/Entities/ChatEntities/UserChatEntity.cs index 43fae5157..978ec4f84 100644 --- a/MangoAPI.Domain/Entities/ChatEntities/UserChatEntity.cs +++ b/MangoAPI.Domain/Entities/ChatEntities/UserChatEntity.cs @@ -17,11 +17,6 @@ public sealed class UserChatEntity public ChatEntity Chat { get; private set; } - // dbContext.UserChats.Add(new UserChatEntity - // { - // ChatId = channel.Id, RoleId = UserRole.Owner, UserId = request.UserId, - // }); - private UserChatEntity() { } diff --git a/MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityCreateShouldThrowCommunityType.cs b/MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityCreateShouldThrowCommunityType.cs index 156228403..7fdb67472 100644 --- a/MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityCreateShouldThrowCommunityType.cs +++ b/MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityCreateShouldThrowCommunityType.cs @@ -1,6 +1,25 @@ -namespace MangoAPI.UnitTests.Domain.ChatEntityTests; +using FluentAssertions; +using FluentValidation; +using MangoAPI.Domain.Entities.ChatEntities; +using MangoAPI.Domain.Enums; +using MangoAPI.UnitTests.Helpers; +using System; +using Xunit; + +namespace MangoAPI.UnitTests.Domain.ChatEntityTests; public class ChatEntityCreateShouldThrowCommunityType { - + [Theory] + [InlineData(-1)] + [InlineData(0)] + [InlineData(3)] + [InlineData(4)] + public void ChatEntityCreateShouldThrowCommunityTypeOutOfRange(int communityType) + { + var community = (CommunityType)communityType; + Func CreateWithCommunity = () => ChatEntityHelper.CreateWithCommunityType(community); + + CreateWithCommunity.Should().ThrowExactly(); + } } \ No newline at end of file diff --git a/MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityCreateShouldThrowDescription.cs b/MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityCreateShouldThrowDescription.cs index 2b75d3e65..bc0e3010b 100644 --- a/MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityCreateShouldThrowDescription.cs +++ b/MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityCreateShouldThrowDescription.cs @@ -17,8 +17,7 @@ public void ChatEntityCreateShouldThrowDescriptionEmpty(string testParam) { Func CreateChatEntity = () => ChatEntityHelper.CreateWithDescription(testParam); - CreateChatEntity.Should().ThrowExactly() - .Where(x => x.Message.Contains("Description is required.")); + CreateChatEntity.Should().ThrowExactly(); } [Fact] @@ -28,7 +27,6 @@ public void ChatEntityCreateShouldThrowDescriptionOverflow() Func CreateChatEntity = () => ChatEntityHelper.CreateWithDescription(overflow); - CreateChatEntity.Should().ThrowExactly() - .Where(x => x.Message.Contains("Description cannot exceed 100 characters.")); + CreateChatEntity.Should().ThrowExactly(); } } \ No newline at end of file diff --git a/MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityCreateShouldThrowImage.cs b/MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityCreateShouldThrowImage.cs index 91d9a2e91..86ad66f58 100644 --- a/MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityCreateShouldThrowImage.cs +++ b/MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityCreateShouldThrowImage.cs @@ -16,7 +16,6 @@ public void ChatEntityCreateShouldThrowImageOverflow() var imageName = new string(Enumerable.Repeat('a', 102).ToArray()); Func CreateWithImage = () => ChatEntityHelper.CreateWithImage(imageName); - CreateWithImage.Should().ThrowExactly() - .Where(x => x.Message.Contains("Image cannot exceed 100 characters.")); + CreateWithImage.Should().ThrowExactly(); } } \ No newline at end of file diff --git a/MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityCreateShouldThrowLastMessageText.cs b/MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityCreateShouldThrowLastMessageText.cs new file mode 100644 index 000000000..00ac84e62 --- /dev/null +++ b/MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityCreateShouldThrowLastMessageText.cs @@ -0,0 +1,30 @@ +using FluentAssertions; +using FluentValidation; +using MangoAPI.Domain.Entities.ChatEntities; +using MangoAPI.UnitTests.Helpers; +using System; +using System.Linq; +using Xunit; + +namespace MangoAPI.UnitTests.Domain.ChatEntityTests; + +public class ChatEntityCreateShouldThrowLastMessageText +{ + [Theory] + [InlineData(300)] + [InlineData(301)] + [InlineData(302)] + public void ChatEntityCreateShouldThrowLastMessageTextOverflow(int size) + { + var lastMessage = new string(Enumerable.Repeat('a', size).ToArray()); + Func CreateWithLastText = () => ChatEntityHelper.CreateWithLastMessageText(lastMessage); + + if (size <= 300) + { + CreateWithLastText.Should().NotThrow(); + return; + } + + CreateWithLastText.Should().ThrowExactly(); + } +} \ No newline at end of file diff --git a/MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityCreateShouldThrowMemberCount.cs b/MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityCreateShouldThrowMemberCount.cs index 5e121ce8c..89a702734 100644 --- a/MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityCreateShouldThrowMemberCount.cs +++ b/MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityCreateShouldThrowMemberCount.cs @@ -1,6 +1,17 @@ -namespace MangoAPI.UnitTests.Domain.ChatEntityTests; +using FluentAssertions; +using FluentValidation; +using MangoAPI.UnitTests.Helpers; +using Xunit; + +namespace MangoAPI.UnitTests.Domain.ChatEntityTests; public class ChatEntityCreateShouldThrowMemberCount { - + [Fact] + public void ChatEntityCreateShouldThrowMemberCountNegative() + { + var createChat = () => ChatEntityHelper.CreateWithMembersCount(-10); + + createChat.Should().ThrowExactly(); + } } \ No newline at end of file diff --git a/MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityCreateShouldThrowTitle.cs b/MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityCreateShouldThrowTitle.cs index 44787cc9f..76a024b25 100644 --- a/MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityCreateShouldThrowTitle.cs +++ b/MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityCreateShouldThrowTitle.cs @@ -1,6 +1,31 @@ -namespace MangoAPI.UnitTests.Domain.ChatEntityTests; +using FluentAssertions; +using FluentValidation; +using MangoAPI.Domain.Entities.ChatEntities; +using MangoAPI.UnitTests.Helpers; +using System; +using System.Linq; +using Xunit; + +namespace MangoAPI.UnitTests.Domain.ChatEntityTests; public class ChatEntityCreateShouldThrowTitle { - + [Theory] + [InlineData(null)] + [InlineData("")] + public void ChatEntityCreateShouldThrowTitleNullOrEmpty(string title) + { + Func CreateWithTitle = () => ChatEntityHelper.CreateWithTitle(title); + + CreateWithTitle.Should().ThrowExactly(); + } + + [Fact] + public void ChatEntityCreateShouldThrowTitleOverflow() + { + var title = new string(Enumerable.Repeat('a', 102).ToArray()); + Func CreateWithTitle = () => ChatEntityHelper.CreateWithTitle(title); + + CreateWithTitle.Should().ThrowExactly(); + } } \ No newline at end of file diff --git a/MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityShouldThrowLastAuthor.cs b/MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityShouldThrowLastAuthor.cs new file mode 100644 index 000000000..22426acdc --- /dev/null +++ b/MangoAPI.UnitTests/Domain/ChatEntityTests/ChatEntityShouldThrowLastAuthor.cs @@ -0,0 +1,30 @@ +using FluentAssertions; +using FluentValidation; +using MangoAPI.Domain.Entities.ChatEntities; +using MangoAPI.UnitTests.Helpers; +using System; +using System.Linq; +using Xunit; + +namespace MangoAPI.UnitTests.Domain.ChatEntityTests; + +public class ChatEntityShouldThrowLastAuthor +{ + [Theory] + [InlineData(50)] + [InlineData(51)] + [InlineData(52)] + public void ChatEntityCreateShouldThrowLastAuthorOverflow(int size) + { + var lastAuthor = new string(Enumerable.Repeat('a', size).ToArray()); + Func CreateWithLastAuthor = () => ChatEntityHelper.CreateWithLastMessageAuthor(lastAuthor); + + if (size <= 50) + { + CreateWithLastAuthor.Should().NotThrow(); + return; + } + + CreateWithLastAuthor.Should().ThrowExactly(); + } +} \ No newline at end of file diff --git a/MangoAPI.UnitTests/Helpers/ChatEntityHelper.cs b/MangoAPI.UnitTests/Helpers/ChatEntityHelper.cs index 652da9c1d..de5addc8e 100644 --- a/MangoAPI.UnitTests/Helpers/ChatEntityHelper.cs +++ b/MangoAPI.UnitTests/Helpers/ChatEntityHelper.cs @@ -4,7 +4,7 @@ namespace MangoAPI.UnitTests.Helpers; -public class ChatEntityHelper +public static class ChatEntityHelper { public const string Title = "Mango Messenger"; public const string Description = "Service notifications"; @@ -22,7 +22,7 @@ public static ChatEntity CreateWithDescription(string description) return chat; } - + public static ChatEntity CreateWithImage(string image) { var chat = ChatEntity.Create( @@ -36,6 +36,64 @@ public static ChatEntity CreateWithImage(string image) return chat; } + public static ChatEntity CreateWithMembersCount(int membersCount) + { + var chat = ChatEntity.Create( + Title, + CommunityType.DirectChat, + Description, + Image, + DateTime.UtcNow, + membersCount); + + return chat; + } + + public static ChatEntity CreateWithTitle(string title) + { + var chat = ChatEntity.Create( + title, + CommunityType.DirectChat, + Description, + Image, + DateTime.UtcNow, + membersCount: 2); + + return chat; + } + + public static ChatEntity CreateWithCommunityType(CommunityType communityType) + { + var chat = ChatEntity.Create( + Title, + communityType, + Description, + Image, + DateTime.UtcNow, + membersCount: 2); + + return chat; + } + + public static ChatEntity CreateWithLastMessageText(string lastMessageText) + { + var chat = CreateSuccess(); + + chat.UpdateLastMessage(lastMessageText, DateTime.UtcNow); + + return chat; + } + + public static ChatEntity CreateWithLastMessageAuthor(string lastAuthor) + { + var chat = CreateSuccess(); + const string LastMessage = "Hello, world!"; + + chat.UpdateLastMessage(lastAuthor, LastMessage, DateTime.UtcNow, Guid.NewGuid()); + + return chat; + } + public static ChatEntity CreateSuccess() { var chat = ChatEntity.Create( From dd0c10619ba85b69c20f7a8c08c250d97db5b024 Mon Sep 17 00:00:00 2001 From: kolosovpetro Date: Sun, 12 Mar 2023 16:36:35 +0100 Subject: [PATCH 07/71] user chat entity validator and tests --- .../Entities/ChatEntities/UserChatEntity.cs | 7 ++- .../ChatEntities/UserChatEntityValidator.cs | 13 ++++++ .../UserChatEntityTestSuccess.cs | 23 ++++++++++ .../UserChatEntityTestsShouldThrow.cs | 44 +++++++++++++++++++ 4 files changed, 85 insertions(+), 2 deletions(-) create mode 100644 MangoAPI.Domain/Entities/ChatEntities/UserChatEntityValidator.cs create mode 100644 MangoAPI.UnitTests/Domain/UserChatEntityTests/UserChatEntityTestSuccess.cs create mode 100644 MangoAPI.UnitTests/Domain/UserChatEntityTests/UserChatEntityTestsShouldThrow.cs diff --git a/MangoAPI.Domain/Entities/ChatEntities/UserChatEntity.cs b/MangoAPI.Domain/Entities/ChatEntities/UserChatEntity.cs index 978ec4f84..371ec1422 100644 --- a/MangoAPI.Domain/Entities/ChatEntities/UserChatEntity.cs +++ b/MangoAPI.Domain/Entities/ChatEntities/UserChatEntity.cs @@ -1,4 +1,5 @@ -using MangoAPI.Domain.Enums; +using FluentValidation; +using MangoAPI.Domain.Enums; using System; namespace MangoAPI.Domain.Entities.ChatEntities; @@ -26,6 +27,8 @@ private UserChatEntity(Guid userId, Guid chatId, UserRole roleId) UserId = userId; ChatId = chatId; RoleId = roleId; + + new UserChatEntityValidator().ValidateAndThrow(this); } public static UserChatEntity Create(Guid userId, Guid chatId, UserRole roleId) @@ -34,7 +37,7 @@ public static UserChatEntity Create(Guid userId, Guid chatId, UserRole roleId) return userChat; } - + public void Archive() { IsArchived = true; diff --git a/MangoAPI.Domain/Entities/ChatEntities/UserChatEntityValidator.cs b/MangoAPI.Domain/Entities/ChatEntities/UserChatEntityValidator.cs new file mode 100644 index 000000000..f3d01e88e --- /dev/null +++ b/MangoAPI.Domain/Entities/ChatEntities/UserChatEntityValidator.cs @@ -0,0 +1,13 @@ +using FluentValidation; + +namespace MangoAPI.Domain.Entities.ChatEntities; + +public class UserChatEntityValidator : AbstractValidator +{ + public UserChatEntityValidator() + { + RuleFor(x => x.ChatId).NotEmpty(); + RuleFor(x => x.UserId).NotEmpty(); + RuleFor(x => x.RoleId).IsInEnum(); + } +} \ No newline at end of file diff --git a/MangoAPI.UnitTests/Domain/UserChatEntityTests/UserChatEntityTestSuccess.cs b/MangoAPI.UnitTests/Domain/UserChatEntityTests/UserChatEntityTestSuccess.cs new file mode 100644 index 000000000..48855fa2c --- /dev/null +++ b/MangoAPI.UnitTests/Domain/UserChatEntityTests/UserChatEntityTestSuccess.cs @@ -0,0 +1,23 @@ +using FluentAssertions; +using MangoAPI.Domain.Entities.ChatEntities; +using MangoAPI.Domain.Enums; +using System; +using Xunit; + +namespace MangoAPI.UnitTests.Domain.UserChatEntityTests; + +public class UserChatEntityTestSuccess +{ + [Theory] + [InlineData(1)] + [InlineData(2)] + [InlineData(3)] + [InlineData(4)] + public void UserChatEntityCreateShouldSuccess(int roleId) + { + var role = (UserRole)roleId; + Func CreateSuccess = () => UserChatEntity.Create(Guid.NewGuid(), Guid.NewGuid(), role); + + CreateSuccess.Should().NotThrow(); + } +} \ No newline at end of file diff --git a/MangoAPI.UnitTests/Domain/UserChatEntityTests/UserChatEntityTestsShouldThrow.cs b/MangoAPI.UnitTests/Domain/UserChatEntityTests/UserChatEntityTestsShouldThrow.cs new file mode 100644 index 000000000..c58296107 --- /dev/null +++ b/MangoAPI.UnitTests/Domain/UserChatEntityTests/UserChatEntityTestsShouldThrow.cs @@ -0,0 +1,44 @@ +using FluentAssertions; +using FluentValidation; +using MangoAPI.Domain.Entities.ChatEntities; +using MangoAPI.Domain.Enums; +using System; +using Xunit; + +namespace MangoAPI.UnitTests.Domain.UserChatEntityTests; + +public class UserChatEntityTestsShouldThrow +{ + [Fact] + public void UserChatEntityCreateShouldThrowChatIdEmpty() + { + Func CreateChatIdEmpty = + () => UserChatEntity.Create(Guid.NewGuid(), chatId: Guid.Empty, UserRole.User); + + CreateChatIdEmpty.Should().ThrowExactly(); + } + + [Fact] + public void UserChatEntityCreateShouldThrowUserIdEmpty() + { + Func CreateUserIdEmpty = + () => UserChatEntity.Create(userId: Guid.Empty, Guid.NewGuid(), UserRole.User); + + CreateUserIdEmpty.Should().ThrowExactly(); + } + + [Theory] + [InlineData(-1)] + [InlineData(0)] + [InlineData(5)] + [InlineData(6)] + public void UserChatEntityCreateShouldThrowRoleOutOfRange(int role) + { + var enumRole = (UserRole)role; + + Func CreateRoleOutOfRange = + () => UserChatEntity.Create(Guid.NewGuid(), Guid.NewGuid(), enumRole); + + CreateRoleOutOfRange.Should().ThrowExactly(); + } +} \ No newline at end of file From 24198ee5d99137ea2870220629174aa593a0cc88 Mon Sep 17 00:00:00 2001 From: kami no me Date: Sun, 12 Mar 2023 23:01:42 +0400 Subject: [PATCH 08/71] add logging --- .../Controllers/ApiControllerBase.cs | 31 ++++++++++++++----- .../Controllers/AppInfoController.cs | 10 ++++-- .../Controllers/CommunitiesController.cs | 10 ++++-- .../Controllers/ContactsController.cs | 11 +++++-- .../Controllers/KeyExchangeController.cs | 11 +++++-- .../Controllers/MessagesController.cs | 11 +++++-- .../Controllers/SessionsController.cs | 11 +++++-- .../Controllers/UserChatsController.cs | 11 +++++-- .../Controllers/UsersController.cs | 11 +++++-- .../ExceptionHandlingMiddleware.cs | 4 +-- MangoAPI.Presentation/Startup.cs | 2 +- 11 files changed, 90 insertions(+), 33 deletions(-) diff --git a/MangoAPI.Presentation/Controllers/ApiControllerBase.cs b/MangoAPI.Presentation/Controllers/ApiControllerBase.cs index 69d29cd8e..bc7f38b08 100644 --- a/MangoAPI.Presentation/Controllers/ApiControllerBase.cs +++ b/MangoAPI.Presentation/Controllers/ApiControllerBase.cs @@ -4,15 +4,18 @@ using AutoMapper; using MangoAPI.Application.Interfaces; using MangoAPI.BusinessLogic.Responses; +using MangoAPI.Domain.Constants; +using MangoAPI.Presentation.Middlewares; using MediatR; using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Logging; namespace MangoAPI.Presentation.Controllers; /// /// Base controller class. Encapsulates common logic. /// -public class ApiControllerBase : ControllerBase +public class ApiControllerBase : ControllerBase where TController : ControllerBase { protected IMediator Mediator { get; } @@ -20,17 +23,21 @@ public class ApiControllerBase : ControllerBase protected ICorrelationContext CorrelationContext { get; } + private readonly ILogger _logger; + /// /// Initializes a new instance of the class. /// /// Mediator instance. /// Automapper instance. /// ICorrelationContext instance. - public ApiControllerBase(IMediator mediator, IMapper mapper, ICorrelationContext correlationContext) + /// + public ApiControllerBase(IMediator mediator, IMapper mapper, ICorrelationContext correlationContext, ILogger logger) { Mediator = mediator; Mapper = mapper; CorrelationContext = correlationContext; + _logger = logger; } /// @@ -47,11 +54,21 @@ protected async Task RequestAsync( { var response = await Mediator.Send(request, cancellationToken); - return response.StatusCode switch + var errorDetails = ResponseMessageCodes.ErrorDictionary[ResponseMessageCodes.InvalidRequestModel]; + var loggerMessage = $"ERROR ${response.StatusCode}: \n " + + $"Error message: ${response.Error.ErrorMessage}, \n " + + $"Error details: ${errorDetails}"; + + switch (response.StatusCode) { - HttpStatusCode.BadRequest => BadRequest(response.Error), - HttpStatusCode.Conflict => Conflict(response.Error), - _ => Ok(response.Response), - }; + case HttpStatusCode.BadRequest: + LoggingHelper.LoggerError(_logger, loggerMessage, null); + return BadRequest(response.Error); + case HttpStatusCode.Conflict: + LoggingHelper.LoggerError(_logger, loggerMessage, null); + return Conflict(response.Error); + default: + return Ok(response.Response); + } } } diff --git a/MangoAPI.Presentation/Controllers/AppInfoController.cs b/MangoAPI.Presentation/Controllers/AppInfoController.cs index 4d28b5d7c..4796a3ad4 100644 --- a/MangoAPI.Presentation/Controllers/AppInfoController.cs +++ b/MangoAPI.Presentation/Controllers/AppInfoController.cs @@ -5,6 +5,7 @@ using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Logging; using System.Threading; using System.Threading.Tasks; @@ -13,9 +14,14 @@ namespace MangoAPI.Presentation.Controllers; [ApiController] [Route("api/app-info")] [Authorize] -public class AppInfoController : ApiControllerBase +public class AppInfoController : ApiControllerBase { - public AppInfoController(IMediator mediator, IMapper mapper, ICorrelationContext correlationContext) : base(mediator, mapper, correlationContext) + public AppInfoController( + IMediator mediator, + IMapper mapper, + ICorrelationContext correlationContext, + ILogger logger) + : base(mediator, mapper, correlationContext, logger) { } diff --git a/MangoAPI.Presentation/Controllers/CommunitiesController.cs b/MangoAPI.Presentation/Controllers/CommunitiesController.cs index 73d65fed1..0c86c6710 100644 --- a/MangoAPI.Presentation/Controllers/CommunitiesController.cs +++ b/MangoAPI.Presentation/Controllers/CommunitiesController.cs @@ -11,6 +11,7 @@ using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Logging; using Swashbuckle.AspNetCore.Annotations; namespace MangoAPI.Presentation.Controllers; @@ -22,10 +23,13 @@ namespace MangoAPI.Presentation.Controllers; [Route("api/communities")] [Produces("application/json")] [Authorize] -public class CommunitiesController : ApiControllerBase, ICommunitiesController +public class CommunitiesController : ApiControllerBase, ICommunitiesController { - public CommunitiesController(IMediator mediator, IMapper mapper, ICorrelationContext correlationContext) - : base(mediator, mapper, correlationContext) + public CommunitiesController(IMediator mediator, + IMapper mapper, + ICorrelationContext correlationContext, + ILogger logger) + : base(mediator, mapper, correlationContext, logger) { } diff --git a/MangoAPI.Presentation/Controllers/ContactsController.cs b/MangoAPI.Presentation/Controllers/ContactsController.cs index 3e8ce82d0..bda3ee98e 100644 --- a/MangoAPI.Presentation/Controllers/ContactsController.cs +++ b/MangoAPI.Presentation/Controllers/ContactsController.cs @@ -11,6 +11,7 @@ using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Logging; using Swashbuckle.AspNetCore.Annotations; namespace MangoAPI.Presentation.Controllers; @@ -21,10 +22,14 @@ namespace MangoAPI.Presentation.Controllers; [ApiController] [Route("api/contacts")] [Authorize] -public class ContactsController : ApiControllerBase, IContactsController +public class ContactsController : ApiControllerBase, IContactsController { - public ContactsController(IMediator mediator, IMapper mapper, ICorrelationContext correlationContext) - : base(mediator, mapper, correlationContext) + public ContactsController( + IMediator mediator, + IMapper mapper, + ICorrelationContext correlationContext, + ILogger logger) + : base(mediator, mapper, correlationContext, logger) { } diff --git a/MangoAPI.Presentation/Controllers/KeyExchangeController.cs b/MangoAPI.Presentation/Controllers/KeyExchangeController.cs index 2c6801de4..e6ad5cdad 100644 --- a/MangoAPI.Presentation/Controllers/KeyExchangeController.cs +++ b/MangoAPI.Presentation/Controllers/KeyExchangeController.cs @@ -12,6 +12,7 @@ using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Logging; using Swashbuckle.AspNetCore.Annotations; namespace MangoAPI.Presentation.Controllers; @@ -23,10 +24,14 @@ namespace MangoAPI.Presentation.Controllers; [Route("api/key-exchange-requests")] [Produces("application/json")] [Authorize] -public class KeyExchangeController : ApiControllerBase, IKeyExchangeController +public class KeyExchangeController : ApiControllerBase, IKeyExchangeController { - public KeyExchangeController(IMediator mediator, IMapper mapper, ICorrelationContext correlationContext) - : base(mediator, mapper, correlationContext) + public KeyExchangeController( + IMediator mediator, + IMapper mapper, + ICorrelationContext correlationContext, + ILogger logger) + : base(mediator, mapper, correlationContext, logger) { } diff --git a/MangoAPI.Presentation/Controllers/MessagesController.cs b/MangoAPI.Presentation/Controllers/MessagesController.cs index 98734ecde..8998d789d 100644 --- a/MangoAPI.Presentation/Controllers/MessagesController.cs +++ b/MangoAPI.Presentation/Controllers/MessagesController.cs @@ -11,6 +11,7 @@ using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Logging; using Swashbuckle.AspNetCore.Annotations; namespace MangoAPI.Presentation.Controllers; @@ -21,10 +22,14 @@ namespace MangoAPI.Presentation.Controllers; [ApiController] [Route("api/messages")] [Authorize] -public class MessagesController : ApiControllerBase, IMessagesController +public class MessagesController : ApiControllerBase, IMessagesController { - public MessagesController(IMediator mediator, IMapper mapper, ICorrelationContext correlationContext) - : base(mediator, mapper, correlationContext) + public MessagesController( + IMediator mediator, + IMapper mapper, + ICorrelationContext correlationContext, + ILogger logger) + : base(mediator, mapper, correlationContext, logger) { } diff --git a/MangoAPI.Presentation/Controllers/SessionsController.cs b/MangoAPI.Presentation/Controllers/SessionsController.cs index db37248ad..d321cf798 100644 --- a/MangoAPI.Presentation/Controllers/SessionsController.cs +++ b/MangoAPI.Presentation/Controllers/SessionsController.cs @@ -10,6 +10,7 @@ using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Logging; using Swashbuckle.AspNetCore.Annotations; namespace MangoAPI.Presentation.Controllers; @@ -19,10 +20,14 @@ namespace MangoAPI.Presentation.Controllers; /// [ApiController] [Route("api/sessions")] -public class SessionsController : ApiControllerBase, ISessionsController +public class SessionsController : ApiControllerBase, ISessionsController { - public SessionsController(IMediator mediator, IMapper mapper, ICorrelationContext correlationContext) - : base(mediator, mapper, correlationContext) + public SessionsController( + IMediator mediator, + IMapper mapper, + ICorrelationContext correlationContext, + ILogger logger) + : base(mediator, mapper, correlationContext, logger) { } diff --git a/MangoAPI.Presentation/Controllers/UserChatsController.cs b/MangoAPI.Presentation/Controllers/UserChatsController.cs index 80c26514e..66bd4cf78 100644 --- a/MangoAPI.Presentation/Controllers/UserChatsController.cs +++ b/MangoAPI.Presentation/Controllers/UserChatsController.cs @@ -10,6 +10,7 @@ using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Logging; using Swashbuckle.AspNetCore.Annotations; namespace MangoAPI.Presentation.Controllers; @@ -20,10 +21,14 @@ namespace MangoAPI.Presentation.Controllers; [ApiController] [Route("api/user-chats/{chatId:guid}")] [Authorize] -public class UserChatsController : ApiControllerBase, IUserChatsController +public class UserChatsController : ApiControllerBase, IUserChatsController { - public UserChatsController(IMediator mediator, IMapper mapper, ICorrelationContext correlationContext) - : base(mediator, mapper, correlationContext) + public UserChatsController( + IMediator mediator, + IMapper mapper, + ICorrelationContext correlationContext, + ILogger logger) + : base(mediator, mapper, correlationContext, logger) { } diff --git a/MangoAPI.Presentation/Controllers/UsersController.cs b/MangoAPI.Presentation/Controllers/UsersController.cs index ae1875463..dce56069d 100644 --- a/MangoAPI.Presentation/Controllers/UsersController.cs +++ b/MangoAPI.Presentation/Controllers/UsersController.cs @@ -11,6 +11,7 @@ using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Logging; using Swashbuckle.AspNetCore.Annotations; namespace MangoAPI.Presentation.Controllers; @@ -20,10 +21,14 @@ namespace MangoAPI.Presentation.Controllers; /// [ApiController] [Route("api/users")] -public class UsersController : ApiControllerBase, IUsersController +public class UsersController : ApiControllerBase, IUsersController { - public UsersController(IMediator mediator, IMapper mapper, ICorrelationContext correlationContext) - : base(mediator, mapper, correlationContext) + public UsersController( + IMediator mediator, + IMapper mapper, + ICorrelationContext correlationContext, + ILogger logger) + : base(mediator, mapper, correlationContext, logger) { } diff --git a/MangoAPI.Presentation/Middlewares/ExceptionHandlingMiddleware.cs b/MangoAPI.Presentation/Middlewares/ExceptionHandlingMiddleware.cs index 230726769..039b49c94 100644 --- a/MangoAPI.Presentation/Middlewares/ExceptionHandlingMiddleware.cs +++ b/MangoAPI.Presentation/Middlewares/ExceptionHandlingMiddleware.cs @@ -13,9 +13,9 @@ namespace MangoAPI.Presentation.Middlewares; public class ExceptionHandlingMiddleware { private readonly RequestDelegate next; - private readonly ILogger logger; + private readonly ILogger logger; - public ExceptionHandlingMiddleware(RequestDelegate next, ILogger logger) + public ExceptionHandlingMiddleware(RequestDelegate next, ILogger logger) { this.next = next; this.logger = logger; diff --git a/MangoAPI.Presentation/Startup.cs b/MangoAPI.Presentation/Startup.cs index 0ce4dcd3e..8a486c183 100644 --- a/MangoAPI.Presentation/Startup.cs +++ b/MangoAPI.Presentation/Startup.cs @@ -169,7 +169,7 @@ public void ConfigureServices(IServiceCollection services) services.AddTransient(); - services.AddAutoMapper(typeof(ApiControllerBase)); + services.AddAutoMapper(typeof(ApiControllerBase)); services.AddMvc(); From a8dffebb0a657f9744d8ab4476cf041729b5591e Mon Sep 17 00:00:00 2001 From: kolosovpetro Date: Sun, 12 Mar 2023 18:38:44 +0100 Subject: [PATCH 09/71] login | register | change password --- .editorconfig | 1 + .../Interfaces/IPasswordService.cs | 10 + .../Interfaces/ISignInManagerService.cs | 10 - .../Interfaces/IUserManagerService.cs | 16 - .../MangoAPI.Application.csproj | 2 +- MangoAPI.Application/Services/JwtGenerator.cs | 2 +- .../Services/PasswordHashService.cs | 14 - .../Services/PasswordService.cs | 39 ++ .../Services/SignInManagerService.cs | 26 - .../Services/UserManagerService.cs | 44 -- .../CreateChannelCommandHandler.cs | 1 - .../Communities/CreateChatCommandHandler.cs | 1 - .../Communities/CreateCommunityResponse.cs | 1 - .../Communities/JoinChatCommandHandler.cs | 1 - .../UpdateChannelPictureCommandValidator.cs | 1 - .../ApiCommands/Sessions/LoginCommand.cs | 2 +- .../Sessions/LoginCommandHandler.cs | 36 +- .../Sessions/LoginCommandValidator.cs | 15 +- .../ApiCommands/Sessions/LoginRequest.cs | 8 +- .../Users/ChangePasswordCommandHandler.cs | 26 +- .../ApiCommands/Users/RegisterCommand.cs | 3 +- .../Users/RegisterCommandHandler.cs | 149 +++--- .../Users/RegisterCommandValidator.cs | 19 +- .../ApiCommands/Users/RegisterRequest.cs | 13 +- .../UpdateUserAccountInfoCommandHandler.cs | 2 +- .../Contacts/GetContactsQueryHandler.cs | 2 +- .../Contacts/SearchContactQueryHandler.cs | 2 +- .../ApiQueries/Users/GetUserQueryHandler.cs | 3 +- .../Configuration/MangoStartup.cs | 6 - .../IdentityDependencyInjection.cs | 28 -- .../SingInManagerDependencyInjection.cs | 17 - MangoAPI.BusinessLogic/Models/Chat.cs | 1 - MangoAPI.BusinessLogic/Models/Contact.cs | 2 +- MangoAPI.Domain/Entities/UserEntity.cs | 17 +- MangoAPI.Domain/MangoAPI.Domain.csproj | 2 - .../Configurations/ChatEntityConfiguration.cs | 143 +----- .../MessageEntityConfiguration.cs | 254 +--------- .../UserChatEntityConfiguration.cs | 193 +------- .../UserContactEntityConfiguration.cs | 219 +-------- .../Configurations/UserEntityConfiguration.cs | 164 +------ .../UserInformationEntityConfiguration.cs | 122 ----- .../Database/MangoDbContext.cs | 19 +- .../MangoAPI.Infrastructure.csproj | 2 - ...0230312165859_IdentityRemoved.Designer.cs} | 244 +--------- ...n.cs => 20230312165859_IdentityRemoved.cs} | 204 +------- ...12172331_UserEntityConstraints.Designer.cs | 449 ++++++++++++++++++ .../20230312172331_UserEntityConstraints.cs | 78 +++ .../Migrations/MangoDbContextModelSnapshot.cs | 246 +--------- .../Helpers/CommandHelper.cs | 8 +- MangoAPI.Presentation/Startup.cs | 24 +- 50 files changed, 791 insertions(+), 2100 deletions(-) create mode 100644 MangoAPI.Application/Interfaces/IPasswordService.cs delete mode 100644 MangoAPI.Application/Interfaces/ISignInManagerService.cs delete mode 100644 MangoAPI.Application/Interfaces/IUserManagerService.cs delete mode 100644 MangoAPI.Application/Services/PasswordHashService.cs create mode 100644 MangoAPI.Application/Services/PasswordService.cs delete mode 100644 MangoAPI.Application/Services/SignInManagerService.cs delete mode 100644 MangoAPI.Application/Services/UserManagerService.cs delete mode 100644 MangoAPI.BusinessLogic/DependencyInjection/IdentityDependencyInjection.cs delete mode 100644 MangoAPI.BusinessLogic/DependencyInjection/SingInManagerDependencyInjection.cs rename MangoAPI.Infrastructure/Migrations/{20230312124540_InitialMigration.Designer.cs => 20230312165859_IdentityRemoved.Designer.cs} (62%) rename MangoAPI.Infrastructure/Migrations/{20230312124540_InitialMigration.cs => 20230312165859_IdentityRemoved.cs} (62%) create mode 100644 MangoAPI.Infrastructure/Migrations/20230312172331_UserEntityConstraints.Designer.cs create mode 100644 MangoAPI.Infrastructure/Migrations/20230312172331_UserEntityConstraints.cs diff --git a/.editorconfig b/.editorconfig index 6ee8cfd9c..4b1ea7cfb 100644 --- a/.editorconfig +++ b/.editorconfig @@ -9,6 +9,7 @@ dotnet_diagnostic.CA1822.severity = warning dotnet_diagnostic.CA1416.severity = warning dotnet_diagnostic.IDE0072.severity = warning dotnet_diagnostic.IDE0270.severity = warning +dotnet_diagnostic.CA1825.severity = warning # populate switch dotnet_diagnostic.IDE0010.severity = warning diff --git a/MangoAPI.Application/Interfaces/IPasswordService.cs b/MangoAPI.Application/Interfaces/IPasswordService.cs new file mode 100644 index 000000000..084d5d5a1 --- /dev/null +++ b/MangoAPI.Application/Interfaces/IPasswordService.cs @@ -0,0 +1,10 @@ +using MangoAPI.Domain.Entities; + +namespace MangoAPI.Application.Interfaces; + +public interface IPasswordService +{ + bool ValidateCredentials(UserEntity user, string currentPassword); + + UserEntity ChangePassword(UserEntity user, string newPassword); +} \ No newline at end of file diff --git a/MangoAPI.Application/Interfaces/ISignInManagerService.cs b/MangoAPI.Application/Interfaces/ISignInManagerService.cs deleted file mode 100644 index c30a97e3f..000000000 --- a/MangoAPI.Application/Interfaces/ISignInManagerService.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System.Threading.Tasks; -using MangoAPI.Domain.Entities; -using Microsoft.AspNetCore.Identity; - -namespace MangoAPI.Application.Interfaces; - -public interface ISignInManagerService -{ - Task CheckPasswordSignInAsync(UserEntity user, string password, bool lockoutOnFailure); -} \ No newline at end of file diff --git a/MangoAPI.Application/Interfaces/IUserManagerService.cs b/MangoAPI.Application/Interfaces/IUserManagerService.cs deleted file mode 100644 index d9e52a02b..000000000 --- a/MangoAPI.Application/Interfaces/IUserManagerService.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System.Threading.Tasks; -using MangoAPI.Domain.Entities; -using Microsoft.AspNetCore.Identity; - -namespace MangoAPI.Application.Interfaces; - -public interface IUserManagerService -{ - Task CreateAsync(UserEntity user, string password); - - Task RemovePasswordAsync(UserEntity user); - - Task AddPasswordAsync(UserEntity user, string password); - - Task CheckPasswordAsync(UserEntity user, string password); -} \ No newline at end of file diff --git a/MangoAPI.Application/MangoAPI.Application.csproj b/MangoAPI.Application/MangoAPI.Application.csproj index 68b5bf70e..69e295c1c 100644 --- a/MangoAPI.Application/MangoAPI.Application.csproj +++ b/MangoAPI.Application/MangoAPI.Application.csproj @@ -9,6 +9,6 @@ - + diff --git a/MangoAPI.Application/Services/JwtGenerator.cs b/MangoAPI.Application/Services/JwtGenerator.cs index c635f1cea..837ad7f71 100644 --- a/MangoAPI.Application/Services/JwtGenerator.cs +++ b/MangoAPI.Application/Services/JwtGenerator.cs @@ -32,7 +32,7 @@ private string GenerateJwtToken(UserEntity userEntity, int lifetimeMinutes) var claims = new List { new Claim(JwtRegisteredClaimNames.Jti, userEntity.Id.ToString()), - new Claim(JwtRegisteredClaimNames.Name, userEntity.UserName), + new Claim(JwtRegisteredClaimNames.Name, userEntity.Username), }; var credentials = new SigningCredentials(key, SecurityAlgorithms.HmacSha256); diff --git a/MangoAPI.Application/Services/PasswordHashService.cs b/MangoAPI.Application/Services/PasswordHashService.cs deleted file mode 100644 index 104e9f982..000000000 --- a/MangoAPI.Application/Services/PasswordHashService.cs +++ /dev/null @@ -1,14 +0,0 @@ -using MangoAPI.Domain.Entities; -using Microsoft.AspNetCore.Identity; - -namespace MangoAPI.Application.Services; - -public class PasswordHashService : PasswordHasher -{ - public override string HashPassword(UserEntity user, string password) - { - user.PasswordHash = base.HashPassword(user, password); - - return user.PasswordHash; - } -} diff --git a/MangoAPI.Application/Services/PasswordService.cs b/MangoAPI.Application/Services/PasswordService.cs new file mode 100644 index 000000000..0b008d1d9 --- /dev/null +++ b/MangoAPI.Application/Services/PasswordService.cs @@ -0,0 +1,39 @@ +using MangoAPI.Application.Interfaces; +using MangoAPI.Domain.Entities; +using System.Security.Cryptography; +using System.Text; + +namespace MangoAPI.Application.Services; + +public class PasswordService : IPasswordService +{ + public bool ValidateCredentials(UserEntity user, string currentPassword) + { + var hmac = new HMACSHA512(user.PasswordSalt); + + var computedHash = hmac.ComputeHash(Encoding.UTF8.GetBytes(currentPassword)); + + var result = true; + + for (var i = 0; i < computedHash.Length; i++) + { + if (computedHash[i] != user.PasswordHash[i]) + { + result = false; + } + } + + return result; + } + + public UserEntity ChangePassword(UserEntity user, string newPassword) + { + var hmac = new HMACSHA512(); + + user.PasswordSalt = hmac.Key; + + user.PasswordHash = hmac.ComputeHash(Encoding.UTF8.GetBytes(newPassword)); + + return user; + } +} \ No newline at end of file diff --git a/MangoAPI.Application/Services/SignInManagerService.cs b/MangoAPI.Application/Services/SignInManagerService.cs deleted file mode 100644 index dea04b127..000000000 --- a/MangoAPI.Application/Services/SignInManagerService.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System.Threading.Tasks; -using MangoAPI.Application.Interfaces; -using MangoAPI.Domain.Entities; -using Microsoft.AspNetCore.Identity; - -namespace MangoAPI.Application.Services; - -public class SignInManagerService : ISignInManagerService -{ - private readonly SignInManager signInManager; - - public SignInManagerService(SignInManager signInManager) - { - this.signInManager = signInManager; - } - - public async Task CheckPasswordSignInAsync( - UserEntity user, - string password, - bool lockoutOnFailure) - { - var result = await signInManager.CheckPasswordSignInAsync(user, password, lockoutOnFailure); - - return result; - } -} diff --git a/MangoAPI.Application/Services/UserManagerService.cs b/MangoAPI.Application/Services/UserManagerService.cs deleted file mode 100644 index ad1ad6477..000000000 --- a/MangoAPI.Application/Services/UserManagerService.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System.Threading.Tasks; -using MangoAPI.Application.Interfaces; -using MangoAPI.Domain.Entities; -using Microsoft.AspNetCore.Identity; - -namespace MangoAPI.Application.Services; - -public class UserManagerService : IUserManagerService -{ - private readonly UserManager userManager; - - public UserManagerService(UserManager userManager) - { - this.userManager = userManager; - } - - public async Task CreateAsync(UserEntity user, string password) - { - var result = await userManager.CreateAsync(user, password); - - return result; - } - - public async Task RemovePasswordAsync(UserEntity user) - { - var result = await userManager.RemovePasswordAsync(user); - - return result; - } - - public async Task AddPasswordAsync(UserEntity user, string password) - { - var result = await userManager.AddPasswordAsync(user, password); - - return result; - } - - public async Task CheckPasswordAsync(UserEntity user, string password) - { - var result = await userManager.CheckPasswordAsync(user, password); - - return result; - } -} diff --git a/MangoAPI.BusinessLogic/ApiCommands/Communities/CreateChannelCommandHandler.cs b/MangoAPI.BusinessLogic/ApiCommands/Communities/CreateChannelCommandHandler.cs index 0afcab339..6257f1e4f 100644 --- a/MangoAPI.BusinessLogic/ApiCommands/Communities/CreateChannelCommandHandler.cs +++ b/MangoAPI.BusinessLogic/ApiCommands/Communities/CreateChannelCommandHandler.cs @@ -6,7 +6,6 @@ using MangoAPI.BusinessLogic.Models; using MangoAPI.BusinessLogic.Responses; using MangoAPI.Domain.Constants; -using MangoAPI.Domain.Entities; using MangoAPI.Domain.Entities.ChatEntities; using MangoAPI.Domain.Enums; using MangoAPI.Infrastructure.Database; diff --git a/MangoAPI.BusinessLogic/ApiCommands/Communities/CreateChatCommandHandler.cs b/MangoAPI.BusinessLogic/ApiCommands/Communities/CreateChatCommandHandler.cs index 389ccf789..96a5d1e19 100644 --- a/MangoAPI.BusinessLogic/ApiCommands/Communities/CreateChatCommandHandler.cs +++ b/MangoAPI.BusinessLogic/ApiCommands/Communities/CreateChatCommandHandler.cs @@ -6,7 +6,6 @@ using MangoAPI.BusinessLogic.Models; using MangoAPI.BusinessLogic.Responses; using MangoAPI.Domain.Constants; -using MangoAPI.Domain.Entities; using MangoAPI.Domain.Entities.ChatEntities; using MangoAPI.Domain.Enums; using MangoAPI.Infrastructure.Database; diff --git a/MangoAPI.BusinessLogic/ApiCommands/Communities/CreateCommunityResponse.cs b/MangoAPI.BusinessLogic/ApiCommands/Communities/CreateCommunityResponse.cs index 70c650ca1..cd2fdd3a3 100644 --- a/MangoAPI.BusinessLogic/ApiCommands/Communities/CreateCommunityResponse.cs +++ b/MangoAPI.BusinessLogic/ApiCommands/Communities/CreateCommunityResponse.cs @@ -2,7 +2,6 @@ using System.ComponentModel; using MangoAPI.BusinessLogic.Responses; using MangoAPI.Domain.Constants; -using MangoAPI.Domain.Entities; using MangoAPI.Domain.Entities.ChatEntities; namespace MangoAPI.BusinessLogic.ApiCommands.Communities; diff --git a/MangoAPI.BusinessLogic/ApiCommands/Communities/JoinChatCommandHandler.cs b/MangoAPI.BusinessLogic/ApiCommands/Communities/JoinChatCommandHandler.cs index 4fe27d679..5fba5e079 100644 --- a/MangoAPI.BusinessLogic/ApiCommands/Communities/JoinChatCommandHandler.cs +++ b/MangoAPI.BusinessLogic/ApiCommands/Communities/JoinChatCommandHandler.cs @@ -3,7 +3,6 @@ using System.Threading.Tasks; using MangoAPI.BusinessLogic.Responses; using MangoAPI.Domain.Constants; -using MangoAPI.Domain.Entities; using MangoAPI.Domain.Entities.ChatEntities; using MangoAPI.Domain.Enums; using MangoAPI.Infrastructure.Database; diff --git a/MangoAPI.BusinessLogic/ApiCommands/Communities/UpdateChannelPictureCommandValidator.cs b/MangoAPI.BusinessLogic/ApiCommands/Communities/UpdateChannelPictureCommandValidator.cs index bfaee8e6b..31d3795c0 100644 --- a/MangoAPI.BusinessLogic/ApiCommands/Communities/UpdateChannelPictureCommandValidator.cs +++ b/MangoAPI.BusinessLogic/ApiCommands/Communities/UpdateChannelPictureCommandValidator.cs @@ -1,5 +1,4 @@ using FluentValidation; -using MangoAPI.BusinessLogic.Pipelines; namespace MangoAPI.BusinessLogic.ApiCommands.Communities; diff --git a/MangoAPI.BusinessLogic/ApiCommands/Sessions/LoginCommand.cs b/MangoAPI.BusinessLogic/ApiCommands/Sessions/LoginCommand.cs index c291c4abf..d82c660a5 100644 --- a/MangoAPI.BusinessLogic/ApiCommands/Sessions/LoginCommand.cs +++ b/MangoAPI.BusinessLogic/ApiCommands/Sessions/LoginCommand.cs @@ -3,5 +3,5 @@ namespace MangoAPI.BusinessLogic.ApiCommands.Sessions; -public record LoginCommand(string Email, string Password) +public record LoginCommand(string Username, string Password) : IRequest>; diff --git a/MangoAPI.BusinessLogic/ApiCommands/Sessions/LoginCommandHandler.cs b/MangoAPI.BusinessLogic/ApiCommands/Sessions/LoginCommandHandler.cs index e0139960b..c98b57aa0 100644 --- a/MangoAPI.BusinessLogic/ApiCommands/Sessions/LoginCommandHandler.cs +++ b/MangoAPI.BusinessLogic/ApiCommands/Sessions/LoginCommandHandler.cs @@ -1,40 +1,40 @@ -using System; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using MangoAPI.Application.Interfaces; +using MangoAPI.Application.Interfaces; using MangoAPI.BusinessLogic.Responses; using MangoAPI.Domain.Constants; using MangoAPI.Domain.Entities; using MangoAPI.Infrastructure.Database; using MediatR; using Microsoft.EntityFrameworkCore; +using System; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; namespace MangoAPI.BusinessLogic.ApiCommands.Sessions; public class LoginCommandHandler : IRequestHandler> { - private readonly IJwtGenerator jwtGenerator; + private readonly IBlobServiceSettings blobServiceSettings; private readonly MangoDbContext dbContext; - private readonly ISignInManagerService signInManager; - private readonly ResponseFactory responseFactory; + private readonly IJwtGenerator jwtGenerator; private readonly IJwtGeneratorSettings jwtGeneratorSettings; - private readonly IBlobServiceSettings blobServiceSettings; + private readonly ResponseFactory responseFactory; + private readonly IPasswordService passwordService; public LoginCommandHandler( - ISignInManagerService signInManager, IJwtGenerator jwtGenerator, MangoDbContext dbContext, ResponseFactory responseFactory, IJwtGeneratorSettings jwtGeneratorSettings, - IBlobServiceSettings blobServiceSettings) + IBlobServiceSettings blobServiceSettings, + IPasswordService passwordService) { - this.signInManager = signInManager; this.jwtGenerator = jwtGenerator; this.dbContext = dbContext; this.responseFactory = responseFactory; this.jwtGeneratorSettings = jwtGeneratorSettings; this.blobServiceSettings = blobServiceSettings; + this.passwordService = passwordService; } public async Task> Handle( @@ -43,10 +43,10 @@ public async Task> Handle( { var user = await dbContext.Users .FirstOrDefaultAsync( - userEntity => userEntity.Email == request.Email, + userEntity => userEntity.Username == request.Username, cancellationToken); - if (user is null) + if (user == null) { const string errorMessage = ResponseMessageCodes.InvalidCredentials; var details = ResponseMessageCodes.ErrorDictionary[errorMessage]; @@ -54,9 +54,9 @@ public async Task> Handle( return responseFactory.ConflictResponse(errorMessage, details); } - var result = await signInManager.CheckPasswordSignInAsync(user, request.Password, false); + var result = passwordService.ValidateCredentials(user, request.Password); - if (!result.Succeeded) + if (!result) { const string errorMessage = ResponseMessageCodes.InvalidCredentials; var details = ResponseMessageCodes.ErrorDictionary[errorMessage]; @@ -69,7 +69,7 @@ public async Task> Handle( UserId = user.Id, RefreshToken = Guid.NewGuid(), ExpiresAt = DateTime.UtcNow.AddDays(jwtGeneratorSettings.MangoRefreshTokenLifetimeDays), - CreatedAt = DateTime.UtcNow, + CreatedAt = DateTime.UtcNow }; var accessToken = jwtGenerator.GenerateJwtToken(user); @@ -102,4 +102,4 @@ public async Task> Handle( return responseFactory.SuccessResponse(tokens); } -} +} \ No newline at end of file diff --git a/MangoAPI.BusinessLogic/ApiCommands/Sessions/LoginCommandValidator.cs b/MangoAPI.BusinessLogic/ApiCommands/Sessions/LoginCommandValidator.cs index 732ed70d7..e2b0fd6f4 100644 --- a/MangoAPI.BusinessLogic/ApiCommands/Sessions/LoginCommandValidator.cs +++ b/MangoAPI.BusinessLogic/ApiCommands/Sessions/LoginCommandValidator.cs @@ -1,4 +1,5 @@ using FluentValidation; +using System.Linq; namespace MangoAPI.BusinessLogic.ApiCommands.Sessions; @@ -6,14 +7,18 @@ public class LoginCommandValidator : AbstractValidator { public LoginCommandValidator() { - RuleFor(x => x.Email) - .EmailAddress() - .WithMessage("Incorrect email address format.") + RuleFor(x => x.Username) + .Cascade(CascadeMode.Stop) .NotEmpty() - .Length(1, 50); + .Must(username => username.All(char.IsLetterOrDigit)) + .WithMessage("Username must only contain letters or numbers.") + .Length(8, 50) + .WithMessage("Username must be between 8 and 50 characters."); RuleFor(x => x.Password) + .Cascade(CascadeMode.Stop) .NotEmpty() - .Length(1, 50); + .Length(8, 50) + .WithMessage("Password must be at least 8 characters."); } } \ No newline at end of file diff --git a/MangoAPI.BusinessLogic/ApiCommands/Sessions/LoginRequest.cs b/MangoAPI.BusinessLogic/ApiCommands/Sessions/LoginRequest.cs index e36bf46b8..8a55ec577 100644 --- a/MangoAPI.BusinessLogic/ApiCommands/Sessions/LoginRequest.cs +++ b/MangoAPI.BusinessLogic/ApiCommands/Sessions/LoginRequest.cs @@ -6,14 +6,14 @@ namespace MangoAPI.BusinessLogic.ApiCommands.Sessions; public record LoginRequest { [JsonConstructor] - public LoginRequest(string email, string password) + public LoginRequest(string username, string password) { - Email = email; + Username = username; Password = password; } - [DefaultValue("test@gmail.com")] - public string Email { get; } + [DefaultValue("MyUniqueUsername")] + public string Username { get; } [DefaultValue("x[?6dME#xrp=nr7q")] public string Password { get; } diff --git a/MangoAPI.BusinessLogic/ApiCommands/Users/ChangePasswordCommandHandler.cs b/MangoAPI.BusinessLogic/ApiCommands/Users/ChangePasswordCommandHandler.cs index 2124a4d65..77959ebae 100644 --- a/MangoAPI.BusinessLogic/ApiCommands/Users/ChangePasswordCommandHandler.cs +++ b/MangoAPI.BusinessLogic/ApiCommands/Users/ChangePasswordCommandHandler.cs @@ -1,11 +1,11 @@ -using System.Threading; -using System.Threading.Tasks; -using MangoAPI.Application.Interfaces; +using MangoAPI.Application.Interfaces; using MangoAPI.BusinessLogic.Responses; using MangoAPI.Domain.Constants; using MangoAPI.Infrastructure.Database; using MediatR; using Microsoft.EntityFrameworkCore; +using System.Threading; +using System.Threading.Tasks; namespace MangoAPI.BusinessLogic.ApiCommands.Users; @@ -13,17 +13,17 @@ public class ChangePasswordCommandHandler : IRequestHandler> { private readonly MangoDbContext dbContext; - private readonly IUserManagerService userManager; private readonly ResponseFactory responseFactory; + private readonly IPasswordService passwordService; public ChangePasswordCommandHandler( MangoDbContext dbContext, - IUserManagerService userManager, - ResponseFactory responseFactory) + ResponseFactory responseFactory, + IPasswordService passwordService) { this.dbContext = dbContext; - this.userManager = userManager; this.responseFactory = responseFactory; + this.passwordService = passwordService; } public async Task> Handle( @@ -35,7 +35,7 @@ public async Task> Handle( userEntity => userEntity.Id == request.UserId, cancellationToken); - if (user is null) + if (user == null) { const string errorMessage = ResponseMessageCodes.UserNotFound; var details = ResponseMessageCodes.ErrorDictionary[errorMessage]; @@ -43,7 +43,7 @@ public async Task> Handle( return responseFactory.ConflictResponse(errorMessage, details); } - var currentPasswordVerified = await userManager.CheckPasswordAsync(user, request.CurrentPassword); + var currentPasswordVerified = passwordService.ValidateCredentials(user, request.CurrentPassword); if (!currentPasswordVerified) { @@ -53,10 +53,12 @@ public async Task> Handle( return responseFactory.ConflictResponse(errorMessage, details); } - await userManager.RemovePasswordAsync(user); + passwordService.ChangePassword(user, request.NewPassword); + + dbContext.Users.Update(user); - await userManager.AddPasswordAsync(user, request.NewPassword); + await dbContext.SaveChangesAsync(cancellationToken); return responseFactory.SuccessResponse(ResponseBase.SuccessResponse); } -} +} \ No newline at end of file diff --git a/MangoAPI.BusinessLogic/ApiCommands/Users/RegisterCommand.cs b/MangoAPI.BusinessLogic/ApiCommands/Users/RegisterCommand.cs index d97aeaaae..a2a7d2f36 100644 --- a/MangoAPI.BusinessLogic/ApiCommands/Users/RegisterCommand.cs +++ b/MangoAPI.BusinessLogic/ApiCommands/Users/RegisterCommand.cs @@ -4,7 +4,6 @@ namespace MangoAPI.BusinessLogic.ApiCommands.Users; public record RegisterCommand( - string Email, - string DisplayName, + string Username, string Password) : IRequest>; diff --git a/MangoAPI.BusinessLogic/ApiCommands/Users/RegisterCommandHandler.cs b/MangoAPI.BusinessLogic/ApiCommands/Users/RegisterCommandHandler.cs index 4dd046e9a..f6a88fccb 100644 --- a/MangoAPI.BusinessLogic/ApiCommands/Users/RegisterCommandHandler.cs +++ b/MangoAPI.BusinessLogic/ApiCommands/Users/RegisterCommandHandler.cs @@ -10,54 +10,35 @@ using MangoAPI.Infrastructure.Database; using MediatR; using Microsoft.EntityFrameworkCore; +using System.Security.Cryptography; +using System.Text; namespace MangoAPI.BusinessLogic.ApiCommands.Users; public class RegisterCommandHandler : IRequestHandler> { private readonly MangoDbContext dbContext; - private readonly IUserManagerService userManager; private readonly ResponseFactory responseFactory; private readonly IJwtGenerator jwtGenerator; private readonly IJwtGeneratorSettings jwtGeneratorSettings; private readonly IBlobServiceSettings blobServiceSettings; - // private readonly PasswordHashService passwordHashService; private readonly IMangoUserSettings mangoUserSettings; private readonly IAvatarService avatarService; - private readonly UserEntity mangoUser = new() - { - PhoneNumber = "56272381753", - DisplayName = "Mango Messenger", - DisplayNameColour = DisplayNameColour.Violet, - Bio = "Service notifications", - Id = SeedDataConstants.MangoId, - UserName = "MangoMessenger", - Email = "mango.messenger@wp.pl", - NormalizedEmail = "MANGO.MESSENGER@WP.PL", - EmailConfirmed = true, - PhoneNumberConfirmed = true, - Image = "mango_logo.png", - }; - public RegisterCommandHandler( - IUserManagerService userManager, MangoDbContext dbContext, IJwtGenerator jwtGenerator, IJwtGeneratorSettings jwtGeneratorSettings, ResponseFactory responseFactory, IBlobServiceSettings blobServiceSettings, - // PasswordHashService passwordHashService, IMangoUserSettings mangoUserSettings, IAvatarService avatarService) { - this.userManager = userManager; this.dbContext = dbContext; this.responseFactory = responseFactory; this.jwtGenerator = jwtGenerator; this.jwtGeneratorSettings = jwtGeneratorSettings; this.blobServiceSettings = blobServiceSettings; - // this.passwordHashService = passwordHashService; this.mangoUserSettings = mangoUserSettings; this.avatarService = avatarService; } @@ -65,7 +46,7 @@ public RegisterCommandHandler( public async Task> Handle(RegisterCommand request, CancellationToken cancellationToken) { var userExists = await dbContext.Users - .AnyAsync(entity => entity.Email == request.Email, cancellationToken); + .AnyAsync(entity => entity.Username == request.Username, cancellationToken); if (userExists) { @@ -79,17 +60,19 @@ public async Task> Handle(RegisterCommand request, Cancel var defaultAvatar = avatarService.GetRandomAvatar(); + var hmac = new HMACSHA512(); + var newUser = new UserEntity { - DisplayName = request.DisplayName, - UserName = Guid.NewGuid().ToString(), - Email = request.Email, + DisplayName = request.Username, + Username = request.Username, Image = defaultAvatar, - EmailConfirmed = true, DisplayNameColour = (DisplayNameColour)color, + PasswordHash = hmac.ComputeHash(Encoding.UTF8.GetBytes(request.Password)), + PasswordSalt = hmac.Key }; - await userManager.CreateAsync(newUser, request.Password); + dbContext.Users.Add(newUser); var userInfo = new UserInformationEntity { UserId = newUser.Id, CreatedAt = DateTime.UtcNow, }; @@ -107,26 +90,55 @@ public async Task> Handle(RegisterCommand request, Cancel dbContext.Sessions.Add(session); - var isMangoUserExists = + var mangoUserExists = await dbContext.Users.AnyAsync(x => x.Id == SeedDataConstants.MangoId, cancellationToken); - if (isMangoUserExists == false) + var mangoUser = GenerateMangoUser(mangoUserSettings.Password); + + if (mangoUserExists == false) { - // passwordHashService.HashPassword(mangoUser, mangoUserSettings.Password); - // dbContext.Users.Add(mangoUser); - await userManager.CreateAsync(mangoUser, mangoUserSettings.Password); + dbContext.Add(mangoUser); } - - // var mangoChatEntity = new ChatEntity - // { - // Id = Guid.NewGuid(), - // CommunityType = CommunityType.DirectChat, - // Title = "Mango Messenger", - // CreatedAt = DateTime.UtcNow, - // Description = "Service notifications", - // MembersCount = 2 - // }; + var mangoChatEntity = CreateStarterChat(mangoUser); + + var senderChat = UserChatEntity.Create(newUser.Id, mangoChatEntity.Id, UserRole.User); + var receiverChat = UserChatEntity.Create(userId: SeedDataConstants.MangoId, mangoChatEntity.Id, UserRole.User); + + var greetingMessages = GenerateGreetingMessages(mangoChatEntity); + var lastMessage = greetingMessages[1]; + + mangoChatEntity.UpdateLastMessage( + lastMessageAuthor: mangoUser.DisplayName, + lastMessageText: lastMessage.Content, + lastMessage.CreatedAt, + lastMessage.Id); + + dbContext.Chats.Add(mangoChatEntity); + dbContext.UserChats.AddRange(senderChat, receiverChat); + dbContext.Messages.AddRange(greetingMessages); + + await dbContext.SaveChangesAsync(cancellationToken); + + var expires = ((DateTimeOffset)session.ExpiresAt).ToUnixTimeSeconds(); + var userDisplayName = newUser.DisplayName; + var userProfilePictureUrl = $"{blobServiceSettings.MangoBlobAccess}/{newUser.Image}"; + + var response = TokensResponse.FromSuccess( + accessToken, + session.RefreshToken, + newUser.Id, + expires, + userDisplayName, + userProfilePictureUrl, + newUser.DisplayNameColour); + var result = responseFactory.SuccessResponse(response); + + return result; + } + + private static ChatEntity CreateStarterChat(UserEntity mangoUser) + { const string title = "Mango Messenger"; const string description = "Service notifications"; @@ -137,10 +149,11 @@ public async Task> Handle(RegisterCommand request, Cancel mangoUser.Image, DateTime.UtcNow, membersCount: 2); + return mangoChatEntity; + } - var senderChat = UserChatEntity.Create(newUser.Id, mangoChatEntity.Id, UserRole.User); - var receiverChat = UserChatEntity.Create(userId: SeedDataConstants.MangoId, mangoChatEntity.Id, UserRole.User); - + private static MessageEntity[] GenerateGreetingMessages(ChatEntity mangoChatEntity) + { var firstMessage = new MessageEntity { Id = Guid.NewGuid(), @@ -157,37 +170,27 @@ public async Task> Handle(RegisterCommand request, Cancel Content = GreetingsConstants.Guide, }; - // mangoChatEntity.LastMessageId = secondMessage.Id; - // mangoChatEntity.LastMessageAuthor = mangoUser.DisplayName; - // mangoChatEntity.LastMessageText = secondMessage.Content; - // mangoChatEntity.LastMessageTime = secondMessage.CreatedAt; + var greetingMessages = new[] { firstMessage, secondMessage }; - mangoChatEntity.UpdateLastMessage( - lastMessageAuthor: mangoUser.DisplayName, - lastMessageText: secondMessage.Content, - secondMessage.CreatedAt, - secondMessage.Id); - - dbContext.Chats.Add(mangoChatEntity); - dbContext.UserChats.AddRange(senderChat, receiverChat); - dbContext.Messages.AddRange(firstMessage, secondMessage); - - await dbContext.SaveChangesAsync(cancellationToken); + return greetingMessages; + } - var expires = ((DateTimeOffset)session.ExpiresAt).ToUnixTimeSeconds(); - var userDisplayName = newUser.DisplayName; - var userProfilePictureUrl = $"{blobServiceSettings.MangoBlobAccess}/{newUser.Image}"; + private static UserEntity GenerateMangoUser(string password) + { + var hmac = new HMACSHA512(); - var response = TokensResponse.FromSuccess( - accessToken, - session.RefreshToken, - newUser.Id, - expires, - userDisplayName, - userProfilePictureUrl, - newUser.DisplayNameColour); - var result = responseFactory.SuccessResponse(response); + var mangoUser = new UserEntity + { + DisplayName = "Mango Messenger", + DisplayNameColour = DisplayNameColour.Violet, + Bio = "Service notifications", + Id = SeedDataConstants.MangoId, + Username = "MangoMessenger", + Image = "mango_logo.png", + PasswordHash = hmac.ComputeHash(Encoding.UTF8.GetBytes(password)), + PasswordSalt = hmac.Key + }; - return result; + return mangoUser; } } \ No newline at end of file diff --git a/MangoAPI.BusinessLogic/ApiCommands/Users/RegisterCommandValidator.cs b/MangoAPI.BusinessLogic/ApiCommands/Users/RegisterCommandValidator.cs index 88f54f1c5..ac2cf5495 100644 --- a/MangoAPI.BusinessLogic/ApiCommands/Users/RegisterCommandValidator.cs +++ b/MangoAPI.BusinessLogic/ApiCommands/Users/RegisterCommandValidator.cs @@ -1,4 +1,5 @@ using FluentValidation; +using System.Linq; namespace MangoAPI.BusinessLogic.ApiCommands.Users; @@ -6,20 +7,18 @@ public class RegisterCommandValidator : AbstractValidator { public RegisterCommandValidator() { - RuleFor(x => x.Email) + RuleFor(x => x.Username) + .Cascade(CascadeMode.Stop) .NotEmpty() - .WithMessage("Email address required.") - .EmailAddress() - .WithMessage("Email address should be in proper format.") - .Length(1, 50); + .Must(username => username.All(char.IsLetterOrDigit)) + .WithMessage("Username must only contain letters or numbers.") + .Length(8, 50) + .WithMessage("Username must be between 8 and 50 characters."); RuleFor(x => x.Password) + .Cascade(CascadeMode.Stop) .NotEmpty() .Length(8, 50) .WithMessage("Password must be at least 8 characters."); - - RuleFor(x => x.DisplayName) - .NotEmpty() - .Length(1, 50); } -} +} \ No newline at end of file diff --git a/MangoAPI.BusinessLogic/ApiCommands/Users/RegisterRequest.cs b/MangoAPI.BusinessLogic/ApiCommands/Users/RegisterRequest.cs index 6d6026adb..670f941a2 100644 --- a/MangoAPI.BusinessLogic/ApiCommands/Users/RegisterRequest.cs +++ b/MangoAPI.BusinessLogic/ApiCommands/Users/RegisterRequest.cs @@ -7,20 +7,15 @@ public record RegisterRequest { [JsonConstructor] public RegisterRequest( - string email, - string displayName, + string username, string password) { - Email = email; - DisplayName = displayName; + Username = username; Password = password; } - [DefaultValue("test@gmail.com")] - public string Email { get; } - - [DefaultValue("Test User")] - public string DisplayName { get; } + [DefaultValue("MyUniqueUsername")] + public string Username { get; } [DefaultValue("x[?6dME#xrp=nr7q")] public string Password { get; } diff --git a/MangoAPI.BusinessLogic/ApiCommands/Users/UpdateUserAccountInfoCommandHandler.cs b/MangoAPI.BusinessLogic/ApiCommands/Users/UpdateUserAccountInfoCommandHandler.cs index e5abd30a0..de4cf3cb5 100644 --- a/MangoAPI.BusinessLogic/ApiCommands/Users/UpdateUserAccountInfoCommandHandler.cs +++ b/MangoAPI.BusinessLogic/ApiCommands/Users/UpdateUserAccountInfoCommandHandler.cs @@ -66,7 +66,7 @@ public async Task> Handle( user.UserInformation.Website = request.Website; - user.UserName = request.Username; + user.Username = request.Username; user.UserNameChanged = true; diff --git a/MangoAPI.BusinessLogic/ApiQueries/Contacts/GetContactsQueryHandler.cs b/MangoAPI.BusinessLogic/ApiQueries/Contacts/GetContactsQueryHandler.cs index de5bccd6f..078c30f13 100644 --- a/MangoAPI.BusinessLogic/ApiQueries/Contacts/GetContactsQueryHandler.cs +++ b/MangoAPI.BusinessLogic/ApiQueries/Contacts/GetContactsQueryHandler.cs @@ -40,7 +40,7 @@ orderby userContact.CreatedAt Address = userEntity.UserInformation.Address, Bio = userEntity.Bio, PictureUrl = $"{blobServiceSettings.MangoBlobAccess}/{userEntity.Image}", - Email = userEntity.Email, + Username = userEntity.Username, IsContact = true, }; diff --git a/MangoAPI.BusinessLogic/ApiQueries/Contacts/SearchContactQueryHandler.cs b/MangoAPI.BusinessLogic/ApiQueries/Contacts/SearchContactQueryHandler.cs index f20095bcc..a5acfec76 100644 --- a/MangoAPI.BusinessLogic/ApiQueries/Contacts/SearchContactQueryHandler.cs +++ b/MangoAPI.BusinessLogic/ApiQueries/Contacts/SearchContactQueryHandler.cs @@ -43,7 +43,7 @@ public async Task> Handle( Address = x.UserInformation.Address, Bio = x.Bio, PictureUrl = $"{blobServiceSettings.MangoBlobAccess}/{x.Image}", - Email = x.Email, + Username = x.Username, }); var searchResult = await query.Take(200).ToListAsync(cancellationToken); diff --git a/MangoAPI.BusinessLogic/ApiQueries/Users/GetUserQueryHandler.cs b/MangoAPI.BusinessLogic/ApiQueries/Users/GetUserQueryHandler.cs index a712c0ad8..b2829c0dc 100644 --- a/MangoAPI.BusinessLogic/ApiQueries/Users/GetUserQueryHandler.cs +++ b/MangoAPI.BusinessLogic/ApiQueries/Users/GetUserQueryHandler.cs @@ -43,13 +43,12 @@ public async Task> Handle( BirthdayDate = user.UserInformation.BirthDay.HasValue ? user.UserInformation.BirthDay.Value.ToString("yyyy-MM-dd", CultureInfo.CurrentCulture) : null, - Email = user.Email, Website = user.UserInformation.Website, Facebook = user.UserInformation.Facebook, Twitter = user.UserInformation.Twitter, Instagram = user.UserInformation.Instagram, LinkedIn = user.UserInformation.LinkedIn, - Username = user.UserName, + Username = user.Username, Bio = user.Bio, UserNameChanged = user.UserNameChanged, PictureUrl = $"{blobServiceSettings.MangoBlobAccess}/{user.Image}", diff --git a/MangoAPI.BusinessLogic/Configuration/MangoStartup.cs b/MangoAPI.BusinessLogic/Configuration/MangoStartup.cs index 114fa3f2b..26d7a1f8f 100644 --- a/MangoAPI.BusinessLogic/Configuration/MangoStartup.cs +++ b/MangoAPI.BusinessLogic/Configuration/MangoStartup.cs @@ -41,8 +41,6 @@ public static void Initialize( mangoJwtLifetimeMinutes, mangoRefreshTokenLifetimeDays); - services.AddSingInManagerServices(); - services.AddSignalR(); services.AddSingleton(); @@ -59,10 +57,6 @@ public static void Initialize( services.AddMediatR(cfg => cfg.RegisterServicesFromAssembly(typeof(RegisterCommandHandler).Assembly)); - services.AddScoped(); - - services.AddIdentityUsers(); - services.AddSignalR(); services.AddAppAuthorization(); diff --git a/MangoAPI.BusinessLogic/DependencyInjection/IdentityDependencyInjection.cs b/MangoAPI.BusinessLogic/DependencyInjection/IdentityDependencyInjection.cs deleted file mode 100644 index d46f516c5..000000000 --- a/MangoAPI.BusinessLogic/DependencyInjection/IdentityDependencyInjection.cs +++ /dev/null @@ -1,28 +0,0 @@ -using MangoAPI.Domain.Entities; -using MangoAPI.Infrastructure.Database; -using Microsoft.AspNetCore.Identity; -using Microsoft.Extensions.DependencyInjection; - -namespace MangoAPI.BusinessLogic.DependencyInjection; - -public static class IdentityDependencyInjection -{ - public static IServiceCollection AddIdentityUsers(this IServiceCollection services) - { - var builder = services.AddIdentityCore(options => - { - options.Password.RequireDigit = false; - options.Password.RequiredLength = 8; - options.Password.RequireNonAlphanumeric = false; - options.Password.RequireUppercase = false; - options.Password.RequireLowercase = false; - }); - - var identityBuilder = new IdentityBuilder(builder.UserType, builder.Services); - - identityBuilder.AddEntityFrameworkStores(); - identityBuilder.AddSignInManager>(); - - return services; - } -} \ No newline at end of file diff --git a/MangoAPI.BusinessLogic/DependencyInjection/SingInManagerDependencyInjection.cs b/MangoAPI.BusinessLogic/DependencyInjection/SingInManagerDependencyInjection.cs deleted file mode 100644 index dd602ccc6..000000000 --- a/MangoAPI.BusinessLogic/DependencyInjection/SingInManagerDependencyInjection.cs +++ /dev/null @@ -1,17 +0,0 @@ -using MangoAPI.Application.Interfaces; -using MangoAPI.Application.Services; -using Microsoft.Extensions.DependencyInjection; - -namespace MangoAPI.BusinessLogic.DependencyInjection; - -public static class SingInManagerDependencyInjection -{ - public static IServiceCollection AddSingInManagerServices(this IServiceCollection services) - { - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); - - return services; - } -} \ No newline at end of file diff --git a/MangoAPI.BusinessLogic/Models/Chat.cs b/MangoAPI.BusinessLogic/Models/Chat.cs index 58b749c87..eb569486d 100644 --- a/MangoAPI.BusinessLogic/Models/Chat.cs +++ b/MangoAPI.BusinessLogic/Models/Chat.cs @@ -1,6 +1,5 @@ using System; using System.ComponentModel; -using MangoAPI.Domain.Entities; using MangoAPI.Domain.Entities.ChatEntities; using MangoAPI.Domain.Enums; diff --git a/MangoAPI.BusinessLogic/Models/Contact.cs b/MangoAPI.BusinessLogic/Models/Contact.cs index b16f6dc88..04639d3d2 100644 --- a/MangoAPI.BusinessLogic/Models/Contact.cs +++ b/MangoAPI.BusinessLogic/Models/Contact.cs @@ -24,5 +24,5 @@ public record Contact public string PictureUrl { get; init; } [DefaultValue("my-email@gmail.com")] - public string Email { get; init; } + public string Username { get; init; } } \ No newline at end of file diff --git a/MangoAPI.Domain/Entities/UserEntity.cs b/MangoAPI.Domain/Entities/UserEntity.cs index 36f5af364..fa4dc31b9 100644 --- a/MangoAPI.Domain/Entities/UserEntity.cs +++ b/MangoAPI.Domain/Entities/UserEntity.cs @@ -1,13 +1,20 @@ using MangoAPI.Domain.Entities.ChatEntities; -using System; using System.Collections.Generic; using MangoAPI.Domain.Enums; -using Microsoft.AspNetCore.Identity; +using System; namespace MangoAPI.Domain.Entities; -public sealed class UserEntity : IdentityUser +public sealed class UserEntity { + public Guid Id { get; set; } + + public string Username { get; set; } + + public byte[] PasswordHash { get; set; } + + public byte[] PasswordSalt { get; set; } + public string DisplayName { get; set; } public string Image { get; set; } @@ -15,7 +22,7 @@ public sealed class UserEntity : IdentityUser public string Bio { get; set; } public bool UserNameChanged { get; set; } - + public DisplayNameColour DisplayNameColour { get; set; } public ICollection Sessions { get; set; } @@ -29,4 +36,4 @@ public sealed class UserEntity : IdentityUser public ICollection Contacts { get; set; } public ICollection Documents { get; set; } -} +} \ No newline at end of file diff --git a/MangoAPI.Domain/MangoAPI.Domain.csproj b/MangoAPI.Domain/MangoAPI.Domain.csproj index 7bddd0a6b..4c52f7c16 100644 --- a/MangoAPI.Domain/MangoAPI.Domain.csproj +++ b/MangoAPI.Domain/MangoAPI.Domain.csproj @@ -13,13 +13,11 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - - diff --git a/MangoAPI.Infrastructure/Database/Configurations/ChatEntityConfiguration.cs b/MangoAPI.Infrastructure/Database/Configurations/ChatEntityConfiguration.cs index d2d632218..30b9d07bb 100644 --- a/MangoAPI.Infrastructure/Database/Configurations/ChatEntityConfiguration.cs +++ b/MangoAPI.Infrastructure/Database/Configurations/ChatEntityConfiguration.cs @@ -1,8 +1,4 @@ -using System; -using MangoAPI.Domain.Constants; -using MangoAPI.Domain.Entities; -using MangoAPI.Domain.Entities.ChatEntities; -using MangoAPI.Domain.Enums; +using MangoAPI.Domain.Entities.ChatEntities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; @@ -23,142 +19,5 @@ public void Configure(EntityTypeBuilder builder) builder.HasMany(x => x.Messages) .WithOne(x => x.Chat) .HasForeignKey(x => x.ChatId); - - // builder.HasData( - // new ChatEntity - // { - // Id = SeedDataConstants.WsbId, - // Title = "WSB", - // CommunityType = CommunityType.PublicChannel, - // CreatedAt = DateTime.UtcNow, - // UpdatedAt = DateTime.UtcNow, - // Description = "WSB Public Group", - // MembersCount = 5, - // Image = "wsb_group_logo.png", - // LastMessageAuthor = "Szymon Murawski", - // LastMessageText = "Great! Good luck to all of you", - // LastMessageTime = DateTime.UtcNow, - // }, - // new ChatEntity - // { - // Id = SeedDataConstants.ExtremeCodeMainId, - // Title = "Extreme Code Main", - // CommunityType = CommunityType.PublicChannel, - // Description = "Extreme Code Main Public Group", - // CreatedAt = DateTime.UtcNow, - // UpdatedAt = DateTime.UtcNow, - // MembersCount = 4, - // Image = "extreme_code_main.jpg", - // LastMessageAuthor = "Amelit", - // LastMessageText = "TypeScript The Best", - // LastMessageTime = DateTime.UtcNow, - // }, - // new ChatEntity - // { - // Id = SeedDataConstants.ExtremeCodeFloodId, - // Title = "Extreme Code Flood", - // CommunityType = CommunityType.PublicChannel, - // Description = "Extreme Code Flood Public Group", - // CreatedAt = DateTime.UtcNow, - // UpdatedAt = DateTime.UtcNow, - // MembersCount = 4, - // Image = "extremecode_rest_logo.jpg", - // LastMessageAuthor = "Amelit", - // LastMessageText = "Слава Партии!!", - // LastMessageTime = DateTime.UtcNow, - // }, - // new ChatEntity - // { - // Id = SeedDataConstants.ExtremeCodeCppId, - // Title = "Extreme Code C++", - // CommunityType = CommunityType.PublicChannel, - // Description = "Extreme Code C++ Public Group", - // CreatedAt = DateTime.UtcNow, - // UpdatedAt = DateTime.UtcNow, - // MembersCount = 4, - // Image = "extremecode_cpp_logo.jpg", - // LastMessageAuthor = "Amelit", - // LastMessageText = "Hello world!", - // LastMessageTime = DateTime.UtcNow, - // }, - // new ChatEntity - // { - // Id = SeedDataConstants.ExtremeCodeDotnetId, - // Title = "Extreme Code .NET", - // CommunityType = CommunityType.PublicChannel, - // Description = "Extreme Code .NET Public Group", - // CreatedAt = DateTime.UtcNow, - // UpdatedAt = DateTime.UtcNow, - // MembersCount = 4, - // Image = "extremecode_dotnet.png", - // LastMessageAuthor = "Amelit", - // LastMessageText = "Hello world!", - // LastMessageTime = DateTime.UtcNow, - // }, - // new ChatEntity - // { - // Id = SeedDataConstants.DirectKhachaturRazumovsky, - // Title = "Khachatur Khachatryan / razumovsky r", - // Description = "Direct chat between Khachatur Khachatryan and razumovsky r", - // CreatedAt = DateTime.UtcNow, - // UpdatedAt = DateTime.UtcNow, - // CommunityType = CommunityType.DirectChat, - // MembersCount = 2, - // LastMessageAuthor = "razumovsky r", - // LastMessageText = "Hello world!", - // LastMessageTime = DateTime.UtcNow, - // }, - // new ChatEntity - // { - // Id = SeedDataConstants.DirectKolbasatorRazumovsky, - // Title = "Мусяка Колбасяка / razumovsky r", - // Description = "Direct chat between Мусяка Колбасяка and razumovsky r", - // CreatedAt = DateTime.UtcNow, - // UpdatedAt = DateTime.UtcNow, - // CommunityType = CommunityType.DirectChat, - // MembersCount = 2, - // LastMessageAuthor = "razumovsky r", - // LastMessageText = "Hello world!", - // LastMessageTime = DateTime.UtcNow, - // }, - // new ChatEntity - // { - // Id = SeedDataConstants.DirectAmelitRazumovsky, - // Title = "Amelit / razumovsky r", - // Description = "Direct chat between Amelit and razumovsky r", - // CreatedAt = DateTime.UtcNow, - // UpdatedAt = DateTime.UtcNow, - // CommunityType = CommunityType.DirectChat, - // MembersCount = 2, - // LastMessageAuthor = "razumovsky r", - // LastMessageText = "Hello world!", - // LastMessageTime = DateTime.UtcNow, - // }, - // new ChatEntity - // { - // Id = SeedDataConstants.DirectKhachaturKolbasator, - // Title = "Khachatur Khachatryan / Мусяка Колбасяка", - // Description = "Direct chat between Khachatur Khachatryan and Мусяка Колбасяка", - // CreatedAt = DateTime.UtcNow, - // UpdatedAt = DateTime.UtcNow, - // CommunityType = CommunityType.DirectChat, - // MembersCount = 2, - // LastMessageAuthor = "Khachatur Khachatryan", - // LastMessageText = "Hello world!", - // LastMessageTime = DateTime.UtcNow, - // }, - // new ChatEntity - // { - // Id = SeedDataConstants.DirectPetroSzymon, - // Title = "Petro Kolosov / Szymon Murawski", - // Description = "Direct chat between Petro Kolosov and Szymon Murawski", - // CreatedAt = DateTime.UtcNow, - // UpdatedAt = DateTime.UtcNow, - // CommunityType = CommunityType.DirectChat, - // MembersCount = 2, - // LastMessageAuthor = "Petro Kolosov", - // LastMessageText = "Hello world!", - // LastMessageTime = DateTime.UtcNow, - // }); } } \ No newline at end of file diff --git a/MangoAPI.Infrastructure/Database/Configurations/MessageEntityConfiguration.cs b/MangoAPI.Infrastructure/Database/Configurations/MessageEntityConfiguration.cs index cca91942f..8d402f7a4 100644 --- a/MangoAPI.Infrastructure/Database/Configurations/MessageEntityConfiguration.cs +++ b/MangoAPI.Infrastructure/Database/Configurations/MessageEntityConfiguration.cs @@ -1,6 +1,4 @@ -using System; -using MangoAPI.Domain.Constants; -using MangoAPI.Domain.Entities; +using MangoAPI.Domain.Entities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; @@ -24,255 +22,5 @@ public void Configure(EntityTypeBuilder builder) builder.HasOne(x => x.Chat) .WithMany(x => x.Messages) .HasForeignKey(x => x.ChatId); - - // builder.HasData( - // new MessageEntity - // { - // Id = Guid.NewGuid(), - // UserId = SeedDataConstants.SzymonId, - // ChatId = SeedDataConstants.WsbId, - // Content = "Hello guys, how your diploma project goes?", - // CreatedAt = DateTime.UtcNow, - // }, - // new MessageEntity - // { - // Id = Guid.NewGuid(), - // UserId = SeedDataConstants.IlliaId, - // ChatId = SeedDataConstants.WsbId, - // Content = "Well, I'm doing UI/UX part of the project", - // CreatedAt = DateTime.UtcNow, - // }, - // new MessageEntity - // { - // Id = Guid.NewGuid(), - // UserId = SeedDataConstants.ArslanbekId, - // ChatId = SeedDataConstants.WsbId, - // Content = "Hi teacher, I perform QA of the current version", - // CreatedAt = DateTime.UtcNow, - // }, - // new MessageEntity - // { - // Id = Guid.NewGuid(), - // UserId = SeedDataConstants.PetroId, - // ChatId = SeedDataConstants.WsbId, - // Content = "Greetings. I currently workout the back-end part", - // CreatedAt = DateTime.UtcNow, - // }, - // new MessageEntity - // { - // Id = Guid.NewGuid(), - // UserId = SeedDataConstants.SerhiiId, - // ChatId = SeedDataConstants.WsbId, - // Content = "I work with backend too...", - // CreatedAt = DateTime.UtcNow, - // }, - // new MessageEntity - // { - // Id = Guid.NewGuid(), - // UserId = SeedDataConstants.SzymonId, - // ChatId = SeedDataConstants.WsbId, - // Content = "Great! Good luck to all of you", - // CreatedAt = DateTime.UtcNow, - // }, - // new MessageEntity - // { - // Id = Guid.NewGuid(), - // UserId = SeedDataConstants.KhachaturId, - // ChatId = SeedDataConstants.ExtremeCodeMainId, - // Content = "Hello World", - // CreatedAt = DateTime.UtcNow, - // }, - // new MessageEntity - // { - // Id = Guid.NewGuid(), - // UserId = SeedDataConstants.RazumovskyId, - // ChatId = SeedDataConstants.ExtremeCodeMainId, - // Content = "F# The Best", - // CreatedAt = DateTime.UtcNow, - // }, - // new MessageEntity - // { - // Id = Guid.NewGuid(), - // UserId = SeedDataConstants.KolbasatorId, - // ChatId = SeedDataConstants.ExtremeCodeMainId, - // Content = "C# The Best", - // CreatedAt = DateTime.UtcNow, - // }, - // new MessageEntity - // { - // Id = Guid.NewGuid(), - // UserId = SeedDataConstants.AmelitId, - // ChatId = SeedDataConstants.ExtremeCodeMainId, - // Content = "TypeScript The Best", - // CreatedAt = DateTime.UtcNow, - // }, - // new MessageEntity - // { - // Id = Guid.NewGuid(), - // UserId = SeedDataConstants.KhachaturId, - // ChatId = SeedDataConstants.ExtremeCodeFloodId, - // Content = "Слава Партии!!", - // CreatedAt = DateTime.UtcNow, - // }, - // new MessageEntity - // { - // Id = Guid.NewGuid(), - // UserId = SeedDataConstants.RazumovskyId, - // ChatId = SeedDataConstants.ExtremeCodeFloodId, - // Content = "Слава Партии!!", - // CreatedAt = DateTime.UtcNow, - // }, - // new MessageEntity - // { - // Id = Guid.NewGuid(), - // UserId = SeedDataConstants.KolbasatorId, - // ChatId = SeedDataConstants.ExtremeCodeFloodId, - // Content = "Слава Партии!!", - // CreatedAt = DateTime.UtcNow, - // }, - // new MessageEntity - // { - // Id = Guid.NewGuid(), - // UserId = SeedDataConstants.AmelitId, - // ChatId = SeedDataConstants.ExtremeCodeFloodId, - // Content = "Слава Партии!!", - // CreatedAt = DateTime.UtcNow, - // }, - // new MessageEntity - // { - // Id = Guid.NewGuid(), - // UserId = SeedDataConstants.KhachaturId, - // ChatId = SeedDataConstants.ExtremeCodeCppId, - // Content = "Hello World", - // CreatedAt = DateTime.UtcNow, - // }, - // new MessageEntity - // { - // Id = Guid.NewGuid(), - // UserId = SeedDataConstants.RazumovskyId, - // ChatId = SeedDataConstants.ExtremeCodeCppId, - // Content = "Hello World", - // CreatedAt = DateTime.UtcNow, - // }, - // new MessageEntity - // { - // Id = Guid.NewGuid(), - // UserId = SeedDataConstants.KolbasatorId, - // ChatId = SeedDataConstants.ExtremeCodeCppId, - // Content = "Hello World", - // CreatedAt = DateTime.UtcNow, - // }, - // new MessageEntity - // { - // Id = Guid.NewGuid(), - // UserId = SeedDataConstants.AmelitId, - // ChatId = SeedDataConstants.ExtremeCodeCppId, - // Content = "Hello World", - // CreatedAt = DateTime.UtcNow, - // }, - // new MessageEntity - // { - // Id = Guid.NewGuid(), - // UserId = SeedDataConstants.KhachaturId, - // ChatId = SeedDataConstants.ExtremeCodeDotnetId, - // Content = "Hello World", - // CreatedAt = DateTime.UtcNow, - // }, - // new MessageEntity - // { - // Id = Guid.NewGuid(), - // UserId = SeedDataConstants.RazumovskyId, - // ChatId = SeedDataConstants.ExtremeCodeDotnetId, - // Content = "Hello World", - // CreatedAt = DateTime.UtcNow, - // }, - // new MessageEntity - // { - // Id = Guid.NewGuid(), - // UserId = SeedDataConstants.KolbasatorId, - // ChatId = SeedDataConstants.ExtremeCodeDotnetId, - // Content = "Hello World", - // CreatedAt = DateTime.UtcNow, - // }, - // new MessageEntity - // { - // Id = Guid.NewGuid(), - // UserId = SeedDataConstants.AmelitId, - // ChatId = SeedDataConstants.ExtremeCodeDotnetId, - // Content = "Hello World", - // CreatedAt = DateTime.UtcNow, - // }, - // new MessageEntity - // { - // Id = Guid.NewGuid(), - // UserId = SeedDataConstants.KhachaturId, - // ChatId = SeedDataConstants.DirectKhachaturRazumovsky, - // Content = "Hello World", - // CreatedAt = DateTime.UtcNow, - // }, - // new MessageEntity - // { - // Id = Guid.NewGuid(), - // UserId = SeedDataConstants.RazumovskyId, - // ChatId = SeedDataConstants.DirectKhachaturRazumovsky, - // Content = "Hello World", - // CreatedAt = DateTime.UtcNow, - // }, - // new MessageEntity - // { - // Id = Guid.NewGuid(), - // UserId = SeedDataConstants.KolbasatorId, - // ChatId = SeedDataConstants.DirectKolbasatorRazumovsky, - // Content = "Hello World", - // CreatedAt = DateTime.UtcNow, - // }, - // new MessageEntity - // { - // Id = Guid.NewGuid(), - // UserId = SeedDataConstants.RazumovskyId, - // ChatId = SeedDataConstants.DirectKolbasatorRazumovsky, - // Content = "Hello World", - // CreatedAt = DateTime.UtcNow, - // }, - // new MessageEntity - // { - // Id = Guid.NewGuid(), - // UserId = SeedDataConstants.AmelitId, - // ChatId = SeedDataConstants.DirectAmelitRazumovsky, - // Content = "Hello World", - // CreatedAt = DateTime.UtcNow, - // }, - // new MessageEntity - // { - // Id = Guid.NewGuid(), - // UserId = SeedDataConstants.RazumovskyId, - // ChatId = SeedDataConstants.DirectAmelitRazumovsky, - // Content = "Hello World", - // CreatedAt = DateTime.UtcNow, - // }, - // new MessageEntity - // { - // Id = Guid.NewGuid(), - // UserId = SeedDataConstants.KhachaturId, - // ChatId = SeedDataConstants.DirectKhachaturKolbasator, - // Content = "Hello World", - // CreatedAt = DateTime.UtcNow, - // }, - // new MessageEntity - // { - // Id = Guid.NewGuid(), - // UserId = SeedDataConstants.KolbasatorId, - // ChatId = SeedDataConstants.DirectKhachaturKolbasator, - // Content = "Hello World", - // CreatedAt = DateTime.UtcNow, - // }, - // new MessageEntity - // { - // Id = Guid.NewGuid(), - // UserId = SeedDataConstants.PetroId, - // ChatId = SeedDataConstants.DirectPetroSzymon, - // Content = "Hi teacher", - // CreatedAt = DateTime.UtcNow, - // }); } } \ No newline at end of file diff --git a/MangoAPI.Infrastructure/Database/Configurations/UserChatEntityConfiguration.cs b/MangoAPI.Infrastructure/Database/Configurations/UserChatEntityConfiguration.cs index efa259b89..56bf064c3 100644 --- a/MangoAPI.Infrastructure/Database/Configurations/UserChatEntityConfiguration.cs +++ b/MangoAPI.Infrastructure/Database/Configurations/UserChatEntityConfiguration.cs @@ -1,7 +1,4 @@ -using MangoAPI.Domain.Constants; -using MangoAPI.Domain.Entities; -using MangoAPI.Domain.Entities.ChatEntities; -using MangoAPI.Domain.Enums; +using MangoAPI.Domain.Entities.ChatEntities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; @@ -24,193 +21,5 @@ public void Configure(EntityTypeBuilder builder) builder.HasOne(x => x.User) .WithMany(x => x.UserChats) .HasForeignKey(x => x.UserId); - - // builder.HasData( - // new UserChatEntity - // { - // UserId = SeedDataConstants.PetroId, - // ChatId = SeedDataConstants.WsbId, - // RoleId = UserRole.Moderator, - // }, - // new UserChatEntity - // { - // UserId = SeedDataConstants.SzymonId, - // ChatId = SeedDataConstants.WsbId, - // RoleId = UserRole.Owner, - // }, - // new UserChatEntity - // { - // UserId = SeedDataConstants.IlliaId, - // ChatId = SeedDataConstants.WsbId, - // RoleId = UserRole.User, - // }, - // new UserChatEntity - // { - // UserId = SeedDataConstants.ArslanbekId, - // ChatId = SeedDataConstants.WsbId, - // RoleId = UserRole.User, - // }, - // new UserChatEntity - // { - // UserId = SeedDataConstants.SerhiiId, - // ChatId = SeedDataConstants.WsbId, - // RoleId = UserRole.User, - // }, - // new UserChatEntity - // { - // UserId = SeedDataConstants.KhachaturId, - // ChatId = SeedDataConstants.ExtremeCodeMainId, - // RoleId = UserRole.User, - // }, - // new UserChatEntity - // { - // UserId = SeedDataConstants.RazumovskyId, - // ChatId = SeedDataConstants.ExtremeCodeMainId, - // RoleId = UserRole.Admin, - // }, - // new UserChatEntity - // { - // UserId = SeedDataConstants.KolbasatorId, - // ChatId = SeedDataConstants.ExtremeCodeMainId, - // RoleId = UserRole.Moderator, - // }, - // new UserChatEntity - // { - // UserId = SeedDataConstants.AmelitId, - // ChatId = SeedDataConstants.ExtremeCodeMainId, - // RoleId = UserRole.Owner, - // }, - // new UserChatEntity - // { - // UserId = SeedDataConstants.RazumovskyId, - // ChatId = SeedDataConstants.ExtremeCodeFloodId, - // RoleId = UserRole.Owner, - // }, - // new UserChatEntity - // { - // UserId = SeedDataConstants.KolbasatorId, - // ChatId = SeedDataConstants.ExtremeCodeFloodId, - // RoleId = UserRole.Moderator, - // }, - // new UserChatEntity - // { - // UserId = SeedDataConstants.KhachaturId, - // ChatId = SeedDataConstants.ExtremeCodeFloodId, - // RoleId = UserRole.User, - // }, - // new UserChatEntity - // { - // UserId = SeedDataConstants.AmelitId, - // ChatId = SeedDataConstants.ExtremeCodeFloodId, - // RoleId = UserRole.User, - // }, - // new UserChatEntity - // { - // UserId = SeedDataConstants.AmelitId, - // ChatId = SeedDataConstants.ExtremeCodeCppId, - // RoleId = UserRole.Owner, - // }, - // new UserChatEntity - // { - // UserId = SeedDataConstants.RazumovskyId, - // ChatId = SeedDataConstants.ExtremeCodeCppId, - // RoleId = UserRole.Admin, - // }, - // new UserChatEntity - // { - // UserId = SeedDataConstants.KhachaturId, - // ChatId = SeedDataConstants.ExtremeCodeCppId, - // RoleId = UserRole.User, - // }, - // new UserChatEntity - // { - // UserId = SeedDataConstants.KolbasatorId, - // ChatId = SeedDataConstants.ExtremeCodeCppId, - // RoleId = UserRole.User, - // }, - // new UserChatEntity - // { - // UserId = SeedDataConstants.RazumovskyId, - // ChatId = SeedDataConstants.ExtremeCodeDotnetId, - // RoleId = UserRole.Owner, - // }, - // new UserChatEntity - // { - // UserId = SeedDataConstants.KolbasatorId, - // ChatId = SeedDataConstants.ExtremeCodeDotnetId, - // RoleId = UserRole.User, - // }, - // new UserChatEntity - // { - // UserId = SeedDataConstants.KhachaturId, - // ChatId = SeedDataConstants.ExtremeCodeDotnetId, - // RoleId = UserRole.User, - // }, - // new UserChatEntity - // { - // UserId = SeedDataConstants.AmelitId, - // ChatId = SeedDataConstants.ExtremeCodeDotnetId, - // RoleId = UserRole.User, - // }, - // new UserChatEntity - // { - // UserId = SeedDataConstants.KhachaturId, - // ChatId = SeedDataConstants.DirectKhachaturRazumovsky, - // RoleId = UserRole.User, - // }, - // new UserChatEntity - // { - // UserId = SeedDataConstants.RazumovskyId, - // ChatId = SeedDataConstants.DirectKhachaturRazumovsky, - // RoleId = UserRole.User, - // }, - // new UserChatEntity - // { - // UserId = SeedDataConstants.KolbasatorId, - // ChatId = SeedDataConstants.DirectKolbasatorRazumovsky, - // RoleId = UserRole.User, - // }, - // new UserChatEntity - // { - // UserId = SeedDataConstants.RazumovskyId, - // ChatId = SeedDataConstants.DirectKolbasatorRazumovsky, - // RoleId = UserRole.User, - // }, - // new UserChatEntity - // { - // UserId = SeedDataConstants.AmelitId, - // ChatId = SeedDataConstants.DirectAmelitRazumovsky, - // RoleId = UserRole.User, - // }, - // new UserChatEntity - // { - // UserId = SeedDataConstants.RazumovskyId, - // ChatId = SeedDataConstants.DirectAmelitRazumovsky, - // RoleId = UserRole.User, - // }, - // new UserChatEntity - // { - // UserId = SeedDataConstants.KhachaturId, - // ChatId = SeedDataConstants.DirectKhachaturKolbasator, - // RoleId = UserRole.User, - // }, - // new UserChatEntity - // { - // UserId = SeedDataConstants.KolbasatorId, - // ChatId = SeedDataConstants.DirectKhachaturKolbasator, - // RoleId = UserRole.User, - // }, - // new UserChatEntity - // { - // UserId = SeedDataConstants.PetroId, - // ChatId = SeedDataConstants.DirectPetroSzymon, - // RoleId = UserRole.User, - // }, - // new UserChatEntity - // { - // UserId = SeedDataConstants.SzymonId, - // ChatId = SeedDataConstants.DirectPetroSzymon, - // RoleId = UserRole.User, - // }); } } diff --git a/MangoAPI.Infrastructure/Database/Configurations/UserContactEntityConfiguration.cs b/MangoAPI.Infrastructure/Database/Configurations/UserContactEntityConfiguration.cs index 2247fa77c..a5f2f1a7b 100644 --- a/MangoAPI.Infrastructure/Database/Configurations/UserContactEntityConfiguration.cs +++ b/MangoAPI.Infrastructure/Database/Configurations/UserContactEntityConfiguration.cs @@ -1,6 +1,4 @@ -using System; -using MangoAPI.Domain.Constants; -using MangoAPI.Domain.Entities; +using MangoAPI.Domain.Entities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; @@ -13,220 +11,5 @@ public void Configure(EntityTypeBuilder builder) builder.ToTable(nameof(UserContactEntity), MangoDbContext.DefaultSchema); builder.HasKey(x => x.Id); - - // builder.HasData( - // // Petro Contacts - // new UserContactEntity - // { - // Id = Guid.NewGuid(), - // ContactId = SeedDataConstants.SzymonId, - // UserId = SeedDataConstants.PetroId, - // CreatedAt = DateTime.UtcNow, - // }, - // new UserContactEntity - // { - // Id = Guid.NewGuid(), - // ContactId = SeedDataConstants.IlliaId, - // UserId = SeedDataConstants.PetroId, - // CreatedAt = DateTime.UtcNow, - // }, - // new UserContactEntity - // { - // Id = Guid.NewGuid(), - // ContactId = SeedDataConstants.ArslanbekId, - // UserId = SeedDataConstants.PetroId, - // CreatedAt = DateTime.UtcNow, - // }, - // new UserContactEntity - // { - // Id = Guid.NewGuid(), - // ContactId = SeedDataConstants.SerhiiId, - // UserId = SeedDataConstants.PetroId, - // CreatedAt = DateTime.UtcNow, - // }, - // - // // Szymon Contacts - // new UserContactEntity - // { - // Id = Guid.NewGuid(), - // ContactId = SeedDataConstants.PetroId, - // UserId = SeedDataConstants.SzymonId, - // CreatedAt = DateTime.UtcNow, - // }, - // new UserContactEntity - // { - // Id = Guid.NewGuid(), - // ContactId = SeedDataConstants.IlliaId, - // UserId = SeedDataConstants.SzymonId, - // CreatedAt = DateTime.UtcNow, - // }, - // new UserContactEntity - // { - // Id = Guid.NewGuid(), - // ContactId = SeedDataConstants.ArslanbekId, - // UserId = SeedDataConstants.SzymonId, - // CreatedAt = DateTime.UtcNow, - // }, - // new UserContactEntity - // { - // Id = Guid.NewGuid(), - // ContactId = SeedDataConstants.SerhiiId, - // UserId = SeedDataConstants.SzymonId, - // CreatedAt = DateTime.UtcNow, - // }, - // - // // Illia Contacts - // new UserContactEntity - // { - // Id = Guid.NewGuid(), - // ContactId = SeedDataConstants.PetroId, - // UserId = SeedDataConstants.IlliaId, - // CreatedAt = DateTime.UtcNow, - // }, - // new UserContactEntity - // { - // Id = Guid.NewGuid(), - // ContactId = SeedDataConstants.SzymonId, - // UserId = SeedDataConstants.IlliaId, - // CreatedAt = DateTime.UtcNow, - // }, - // new UserContactEntity - // { - // Id = Guid.NewGuid(), - // ContactId = SeedDataConstants.ArslanbekId, - // UserId = SeedDataConstants.IlliaId, - // CreatedAt = DateTime.UtcNow, - // }, - // new UserContactEntity - // { - // Id = Guid.NewGuid(), - // ContactId = SeedDataConstants.SerhiiId, - // UserId = SeedDataConstants.IlliaId, - // CreatedAt = DateTime.UtcNow, - // }, - // - // // Serhii Contacts - // new UserContactEntity - // { - // Id = Guid.NewGuid(), - // ContactId = SeedDataConstants.PetroId, - // UserId = SeedDataConstants.SerhiiId, - // CreatedAt = DateTime.UtcNow, - // }, - // new UserContactEntity - // { - // Id = Guid.NewGuid(), - // ContactId = SeedDataConstants.SzymonId, - // UserId = SeedDataConstants.SerhiiId, - // CreatedAt = DateTime.UtcNow, - // }, - // new UserContactEntity - // { - // Id = Guid.NewGuid(), - // ContactId = SeedDataConstants.ArslanbekId, - // UserId = SeedDataConstants.SerhiiId, - // CreatedAt = DateTime.UtcNow, - // }, - // new UserContactEntity - // { - // Id = Guid.NewGuid(), - // ContactId = SeedDataConstants.IlliaId, - // UserId = SeedDataConstants.SerhiiId, - // CreatedAt = DateTime.UtcNow, - // }, - // - // // Arslanbek Contacts - // new UserContactEntity - // { - // Id = Guid.NewGuid(), - // ContactId = SeedDataConstants.PetroId, - // UserId = SeedDataConstants.ArslanbekId, - // CreatedAt = DateTime.UtcNow, - // }, - // new UserContactEntity - // { - // Id = Guid.NewGuid(), - // ContactId = SeedDataConstants.SzymonId, - // UserId = SeedDataConstants.ArslanbekId, - // CreatedAt = DateTime.UtcNow, - // }, - // new UserContactEntity - // { - // Id = Guid.NewGuid(), - // ContactId = SeedDataConstants.SerhiiId, - // UserId = SeedDataConstants.ArslanbekId, - // CreatedAt = DateTime.UtcNow, - // }, - // new UserContactEntity - // { - // Id = Guid.NewGuid(), - // ContactId = SeedDataConstants.IlliaId, - // UserId = SeedDataConstants.ArslanbekId, - // CreatedAt = DateTime.UtcNow, - // }, - // - // // Khachatur Contacts - // new UserContactEntity - // { - // Id = Guid.NewGuid(), - // ContactId = SeedDataConstants.RazumovskyId, - // UserId = SeedDataConstants.KhachaturId, - // CreatedAt = DateTime.UtcNow, - // }, - // - // // Razumovsky Contacts - // new UserContactEntity - // { - // Id = Guid.NewGuid(), - // ContactId = SeedDataConstants.KhachaturId, - // UserId = SeedDataConstants.RazumovskyId, - // CreatedAt = DateTime.UtcNow, - // }, - // new UserContactEntity - // { - // Id = Guid.NewGuid(), - // ContactId = SeedDataConstants.SzymonId, - // UserId = SeedDataConstants.RazumovskyId, - // CreatedAt = DateTime.UtcNow, - // }, - // new UserContactEntity - // { - // Id = Guid.NewGuid(), - // ContactId = SeedDataConstants.IlliaId, - // UserId = SeedDataConstants.RazumovskyId, - // CreatedAt = DateTime.UtcNow, - // }, - // new UserContactEntity - // { - // Id = Guid.NewGuid(), - // ContactId = SeedDataConstants.KolbasatorId, - // UserId = SeedDataConstants.RazumovskyId, - // CreatedAt = DateTime.UtcNow, - // }, - // new UserContactEntity - // { - // Id = Guid.NewGuid(), - // ContactId = SeedDataConstants.AmelitId, - // UserId = SeedDataConstants.RazumovskyId, - // CreatedAt = DateTime.UtcNow, - // }, - // - // // Kolbasator Contacts - // new UserContactEntity - // { - // Id = Guid.NewGuid(), - // ContactId = SeedDataConstants.KhachaturId, - // UserId = SeedDataConstants.KolbasatorId, - // CreatedAt = DateTime.UtcNow, - // }, - // - // // Amelit Contacts - // new UserContactEntity - // { - // Id = Guid.NewGuid(), - // ContactId = SeedDataConstants.RazumovskyId, - // UserId = SeedDataConstants.AmelitId, - // CreatedAt = DateTime.UtcNow, - // }); } } \ No newline at end of file diff --git a/MangoAPI.Infrastructure/Database/Configurations/UserEntityConfiguration.cs b/MangoAPI.Infrastructure/Database/Configurations/UserEntityConfiguration.cs index 94ad8acd0..4b8f665d5 100644 --- a/MangoAPI.Infrastructure/Database/Configurations/UserEntityConfiguration.cs +++ b/MangoAPI.Infrastructure/Database/Configurations/UserEntityConfiguration.cs @@ -1,7 +1,4 @@ -using MangoAPI.Application.Services; -using MangoAPI.Domain.Constants; -using MangoAPI.Domain.Entities; -using MangoAPI.Domain.Enums; +using MangoAPI.Domain.Entities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; @@ -13,6 +10,12 @@ public void Configure(EntityTypeBuilder builder) { builder.ToTable(nameof(UserEntity), MangoDbContext.DefaultSchema); + builder.HasKey(x => x.Id); + + builder.Property(x => x.Username).HasMaxLength(50).IsRequired(); + builder.Property(x => x.PasswordSalt).IsRequired(); + builder.Property(x => x.PasswordHash).IsRequired(); + builder.HasMany(x => x.Sessions) .WithOne(x => x.UserEntity) .HasForeignKey(x => x.UserId); @@ -28,156 +31,5 @@ public void Configure(EntityTypeBuilder builder) builder.HasMany(x => x.Documents) .WithOne(x => x.User) .HasForeignKey(x => x.UserId); - - // var user1 = new UserEntity - // { - // PhoneNumber = "374775554310", - // DisplayName = "Khachatur Khachatryan", - // DisplayNameColour = DisplayNameColour.BrightYellow, - // Bio = "13 y. o. | C# pozer, Hearts Of Iron IV noob", - // Id = SeedDataConstants.KhachaturId, - // UserName = "KHACHATUR228", - // Email = "xachulxx@gmail.com", - // NormalizedEmail = "XACHULXX@GMAIL.COM", - // EmailConfirmed = true, - // PhoneNumberConfirmed = true, - // Image = "khachatur_picture.jpg", - // }; - // - // var user2 = new UserEntity - // { - // PhoneNumber = "48743615532", - // DisplayName = "razumovsky r", - // DisplayNameColour = DisplayNameColour.Pink, - // Bio = "11011 y.o Dotnet Developer from $\"{cityName}\"", - // Id = SeedDataConstants.RazumovskyId, - // UserName = "razumovsky_r", - // Email = "kolosovp95@gmail.com", - // NormalizedEmail = "KOLOSOVP94@GMAIL.COM", - // EmailConfirmed = true, - // PhoneNumberConfirmed = true, - // Image = "razumovsky_picture.jpg", - // }; - // - // var user3 = new UserEntity - // { - // PhoneNumber = "77017506265", - // DisplayName = "Мусяка Колбасяка", - // DisplayNameColour = DisplayNameColour.Green, - // Bio = "Колбасятор.", - // Id = SeedDataConstants.KolbasatorId, - // UserName = "kolbasator", - // Email = "kolbasator@gmail.com", - // NormalizedEmail = "KOLBASATOR@GMAIL.COM", - // EmailConfirmed = true, - // PhoneNumberConfirmed = true, - // Image = "musyaka_picture.jpg", - // }; - // - // var user4 = new UserEntity - // { - // PhoneNumber = "12025550152", - // DisplayName = "Amelit", - // DisplayNameColour = DisplayNameColour.Yellow, - // Bio = "Дипломат", - // Id = SeedDataConstants.AmelitId, - // UserName = "TheMoonlightSonata", - // Email = "amelit@gmail.com", - // NormalizedEmail = "AMELIT@GMAIL.COM", - // EmailConfirmed = true, - // PhoneNumberConfirmed = true, - // Image = "amelit_picture.jpg", - // }; - // - // var user5 = new UserEntity - // { - // PhoneNumber = "48743615532", - // DisplayName = "Petro Kolosov", - // DisplayNameColour = DisplayNameColour.White, - // Bio = "Third year student of WSB at Poznan", - // Id = SeedDataConstants.PetroId, - // UserName = "petro.kolosov", - // Email = "petro.kolosov@wp.pl", - // NormalizedEmail = "PETRO.KOLOSOV@WP.PL", - // EmailConfirmed = true, - // PhoneNumberConfirmed = true, - // Image = "razumovsky_picture.jpg", - // }; - // - // var user6 = new UserEntity - // { - // PhoneNumber = "48743615532", - // DisplayName = "Szymon Murawski", - // DisplayNameColour = DisplayNameColour.Aqua, - // Bio = "Teacher of Computer Science at WSB Poznan", - // Id = SeedDataConstants.SzymonId, - // UserName = "szymon.murawski", - // Email = "szymon.murawski@wp.pl", - // NormalizedEmail = "SZYMON.MURAWSKI@WP.PL", - // EmailConfirmed = true, - // PhoneNumberConfirmed = true, - // Image = "szymon_picture.png", - // }; - // - // var user7 = new UserEntity - // { - // PhoneNumber = "48352643123", - // DisplayName = "Illia Zubachov", - // DisplayNameColour = DisplayNameColour.Orange, - // Bio = "Third year student of WSB at Poznan", - // Id = SeedDataConstants.IlliaId, - // UserName = "illia.zubachov", - // Email = "illia.zubachov@wp.pl", - // NormalizedEmail = "ILLIA.ZUBACHOW@WP.PL", - // EmailConfirmed = true, - // PhoneNumberConfirmed = true, - // Image = "illia_picture.png", - // }; - // - // var user8 = new UserEntity - // { - // PhoneNumber = "48278187781", - // DisplayName = "Arslanbek Temirbekov", - // DisplayNameColour = DisplayNameColour.Blue, - // Bio = "Third year student of WSB at Poznan", - // Id = SeedDataConstants.ArslanbekId, - // UserName = "arslanbek.temirbekov", - // Email = "arslanbek.temirbekov@wp.pl", - // NormalizedEmail = "ARSLANBEK.TEMIRBEKOV@WP.PL", - // EmailConfirmed = true, - // PhoneNumberConfirmed = true, - // Image = "arslan_picture.png", - // }; - // - // var user9 = new UserEntity - // { - // PhoneNumber = "48175481653", - // DisplayName = "Serhii Holishevskii", - // DisplayNameColour = DisplayNameColour.Violet, - // Bio = "Third year student of WSB at Poznan", - // Id = SeedDataConstants.SerhiiId, - // UserName = "serhii.holishevskii", - // Email = "serhii.holishevskii@wp.pl", - // NormalizedEmail = "SERHII.HOLISHEVSKII@WP.PL", - // EmailConfirmed = true, - // PhoneNumberConfirmed = true, - // Image = "serhii_picture.png", - // }; - // - // var passwordHasher = new PasswordHashService(); - // - // const string seedPassword = "Dn2-~bRPw+*vR9(cw^84"; - // - // passwordHasher.HashPassword(user1, seedPassword); - // passwordHasher.HashPassword(user2, seedPassword); - // passwordHasher.HashPassword(user3, seedPassword); - // passwordHasher.HashPassword(user4, seedPassword); - // passwordHasher.HashPassword(user5, seedPassword); - // passwordHasher.HashPassword(user6, seedPassword); - // passwordHasher.HashPassword(user7, seedPassword); - // passwordHasher.HashPassword(user8, seedPassword); - // passwordHasher.HashPassword(user9, seedPassword); - // - // builder.HasData(user1, user2, user3, user4, user5, user6, user7, user8, user9); } -} +} \ No newline at end of file diff --git a/MangoAPI.Infrastructure/Database/Configurations/UserInformationEntityConfiguration.cs b/MangoAPI.Infrastructure/Database/Configurations/UserInformationEntityConfiguration.cs index 48192e9ad..e24e1e931 100644 --- a/MangoAPI.Infrastructure/Database/Configurations/UserInformationEntityConfiguration.cs +++ b/MangoAPI.Infrastructure/Database/Configurations/UserInformationEntityConfiguration.cs @@ -1,5 +1,3 @@ -using System; -using MangoAPI.Domain.Constants; using MangoAPI.Domain.Entities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; @@ -13,125 +11,5 @@ public void Configure(EntityTypeBuilder builder) builder.ToTable(nameof(UserInformationEntity), MangoDbContext.DefaultSchema); builder.HasKey(x => x.Id); - - // builder.HasData( - // new UserInformationEntity - // { - // Id = Guid.NewGuid(), - // UserId = SeedDataConstants.PetroId, - // BirthDay = DateTime.UtcNow, - // UpdatedAt = DateTime.UtcNow, - // CreatedAt = DateTime.UtcNow, - // Website = "petro.kolosov.com", - // Instagram = "petro.kolosov", - // LinkedIn = "petro.kolosov", - // Facebook = "petro.kolosov", - // Twitter = "petro.kolosov", - // Address = "Poznan, Poland", - // }, - // new UserInformationEntity - // { - // Id = Guid.NewGuid(), - // UserId = SeedDataConstants.IlliaId, - // BirthDay = DateTime.UtcNow, - // UpdatedAt = DateTime.UtcNow, - // CreatedAt = DateTime.UtcNow, - // Website = "illia.zubachov.com", - // Instagram = "illia.zubachov", - // LinkedIn = "illia.zubachov", - // Facebook = "illia.zubachov", - // Twitter = "illia.zubachov", - // Address = "Poznan, Poland", - // }, new UserInformationEntity - // { - // Id = Guid.NewGuid(), - // UserId = SeedDataConstants.SerhiiId, - // BirthDay = DateTime.UtcNow, - // UpdatedAt = DateTime.UtcNow, - // CreatedAt = DateTime.UtcNow, - // Website = "serhii.holishevskii.com", - // Instagram = "serhii.holishevskii", - // LinkedIn = "serhii.holishevskii", - // Facebook = "serhii.holishevskii", - // Twitter = "serhii.holishevskii", - // Address = "Poznan, Poland", - // }, new UserInformationEntity - // { - // Id = Guid.NewGuid(), - // UserId = SeedDataConstants.ArslanbekId, - // BirthDay = DateTime.UtcNow, - // UpdatedAt = DateTime.UtcNow, - // CreatedAt = DateTime.UtcNow, - // Website = "arslan.temirbekov.com", - // Instagram = "arslan.temirbekov", - // LinkedIn = "arslan.temirbekov", - // Facebook = "arslan.temirbekov", - // Twitter = "arslan.temirbekov", - // Address = "Poznan, Poland", - // }, - // new UserInformationEntity - // { - // Id = Guid.NewGuid(), - // UserId = SeedDataConstants.SzymonId, - // BirthDay = DateTime.UtcNow, - // UpdatedAt = DateTime.UtcNow, - // CreatedAt = DateTime.UtcNow, - // Website = "szymon.murawski.com", - // Instagram = "szymon.murawski", - // LinkedIn = "szymon.murawski", - // Facebook = "szymon.murawski", - // Twitter = "szymon.murawski", - // Address = "Poznan, Poland", - // }, - // new UserInformationEntity - // { - // Id = Guid.NewGuid(), - // UserId = SeedDataConstants.KhachaturId, - // BirthDay = DateTime.UtcNow, - // UpdatedAt = DateTime.UtcNow, - // CreatedAt = DateTime.UtcNow, - // Website = "khachapur.com", - // Instagram = "khachapur.mudrenych", - // LinkedIn = "khachapur.mudrenych", - // Address = "Moscow, Russia", - // }, - // new UserInformationEntity - // { - // Id = Guid.NewGuid(), - // UserId = SeedDataConstants.RazumovskyId, - // BirthDay = DateTime.UtcNow, - // UpdatedAt = DateTime.UtcNow, - // CreatedAt = DateTime.UtcNow, - // Address = "Odessa, Ukraine", - // Website = "razumovsky.com", - // Twitter = "razumovsky_r", - // Facebook = "razumovsky_r", - // Instagram = "razumovsky_r", - // LinkedIn = "razumovsky_r", - // }, - // new UserInformationEntity - // { - // Id = Guid.NewGuid(), - // UserId = SeedDataConstants.KolbasatorId, - // BirthDay = DateTime.UtcNow, - // UpdatedAt = DateTime.UtcNow, - // CreatedAt = DateTime.UtcNow, - // Website = "kolbasator.com", - // Facebook = "kolbasator", - // ProfilePicture = "profile.png", - // Address = "Saint-Petersburg, Russia", - // }, - // new UserInformationEntity - // { - // Id = Guid.NewGuid(), - // UserId = SeedDataConstants.AmelitId, - // BirthDay = DateTime.UtcNow, - // UpdatedAt = DateTime.UtcNow, - // CreatedAt = DateTime.UtcNow, - // Facebook = "TheMoonlightSonata", - // Instagram = "TheMoonlightSonata", - // Twitter = "TheMoonlightSonata", - // Address = "Moscow, Russia", - // }); } } \ No newline at end of file diff --git a/MangoAPI.Infrastructure/Database/MangoDbContext.cs b/MangoAPI.Infrastructure/Database/MangoDbContext.cs index 95f3b29f7..4601ac758 100644 --- a/MangoAPI.Infrastructure/Database/MangoDbContext.cs +++ b/MangoAPI.Infrastructure/Database/MangoDbContext.cs @@ -1,14 +1,14 @@ -using System; -using System.Reflection; +using System.Reflection; using MangoAPI.Domain.Entities; using MangoAPI.Domain.Entities.ChatEntities; -using Microsoft.AspNetCore.Identity.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; namespace MangoAPI.Infrastructure.Database; -public class MangoDbContext : IdentityDbContext +public class MangoDbContext : DbContext { + public const string DefaultSchema = "mango"; + public MangoDbContext(DbContextOptions options) : base(options) { } @@ -30,12 +30,11 @@ public MangoDbContext(DbContextOptions options) : base(options) public DbSet DiffieHellmanParameterEntities { get; set; } public DbSet DiffieHellmanKeyExchangeEntities { get; set; } + public DbSet Users { get; set; } - public const string DefaultSchema = "mango"; - - protected override void OnModelCreating(ModelBuilder builder) + protected override void OnModelCreating(ModelBuilder modelBuilder) { - base.OnModelCreating(builder); - builder.ApplyConfigurationsFromAssembly(Assembly.GetExecutingAssembly()); + base.OnModelCreating(modelBuilder); + modelBuilder.ApplyConfigurationsFromAssembly(Assembly.GetExecutingAssembly()); } -} +} \ No newline at end of file diff --git a/MangoAPI.Infrastructure/MangoAPI.Infrastructure.csproj b/MangoAPI.Infrastructure/MangoAPI.Infrastructure.csproj index ba25899ce..ec961ea14 100644 --- a/MangoAPI.Infrastructure/MangoAPI.Infrastructure.csproj +++ b/MangoAPI.Infrastructure/MangoAPI.Infrastructure.csproj @@ -3,7 +3,6 @@ net6.0 10 - true true @@ -14,7 +13,6 @@ - all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/MangoAPI.Infrastructure/Migrations/20230312124540_InitialMigration.Designer.cs b/MangoAPI.Infrastructure/Migrations/20230312165859_IdentityRemoved.Designer.cs similarity index 62% rename from MangoAPI.Infrastructure/Migrations/20230312124540_InitialMigration.Designer.cs rename to MangoAPI.Infrastructure/Migrations/20230312165859_IdentityRemoved.Designer.cs index 7e8c77f92..e55b94f59 100644 --- a/MangoAPI.Infrastructure/Migrations/20230312124540_InitialMigration.Designer.cs +++ b/MangoAPI.Infrastructure/Migrations/20230312165859_IdentityRemoved.Designer.cs @@ -12,8 +12,8 @@ namespace MangoAPI.Infrastructure.Migrations { [DbContext(typeof(MangoDbContext))] - [Migration("20230312124540_InitialMigration")] - partial class InitialMigration + [Migration("20230312165859_IdentityRemoved")] + partial class IdentityRemoved { protected override void BuildTargetModel(ModelBuilder modelBuilder) { @@ -210,34 +210,6 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.ToTable("MessageEntity", "mango"); }); - modelBuilder.Entity("MangoAPI.Domain.Entities.RoleEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("nvarchar(max)"); - - b.Property("Name") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("NormalizedName") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName") - .IsUnique() - .HasDatabaseName("RoleNameIndex") - .HasFilter("[NormalizedName] IS NOT NULL"); - - b.ToTable("AspNetRoles", (string)null); - }); - modelBuilder.Entity("MangoAPI.Domain.Entities.SessionEntity", b => { b.Property("Id") @@ -291,78 +263,32 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); - b.Property("AccessFailedCount") - .HasColumnType("int"); - b.Property("Bio") .HasColumnType("nvarchar(max)"); - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("nvarchar(max)"); - b.Property("DisplayName") .HasColumnType("nvarchar(max)"); b.Property("DisplayNameColour") .HasColumnType("int"); - b.Property("Email") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("EmailConfirmed") - .HasColumnType("bit"); - b.Property("Image") .HasColumnType("nvarchar(max)"); - b.Property("LockoutEnabled") - .HasColumnType("bit"); - - b.Property("LockoutEnd") - .HasColumnType("datetimeoffset"); - - b.Property("NormalizedEmail") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("NormalizedUserName") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("PasswordHash") - .HasColumnType("nvarchar(max)"); + b.Property("PasswordHash") + .HasColumnType("varbinary(max)"); - b.Property("PhoneNumber") - .HasColumnType("nvarchar(max)"); + b.Property("PasswordSalt") + .HasColumnType("varbinary(max)"); - b.Property("PhoneNumberConfirmed") + b.Property("UserNameChanged") .HasColumnType("bit"); - b.Property("SecurityStamp") + b.Property("Username") .HasColumnType("nvarchar(max)"); - b.Property("TwoFactorEnabled") - .HasColumnType("bit"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("UserNameChanged") - .HasColumnType("bit"); - b.HasKey("Id"); - b.HasIndex("NormalizedEmail") - .HasDatabaseName("EmailIndex"); - - b.HasIndex("NormalizedUserName") - .IsUnique() - .HasDatabaseName("UserNameIndex") - .HasFilter("[NormalizedUserName] IS NOT NULL"); - b.ToTable("UserEntity", "mango"); }); @@ -410,109 +336,6 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.ToTable("UserInformationEntity", "mango"); }); - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1); - - b.Property("ClaimType") - .HasColumnType("nvarchar(max)"); - - b.Property("ClaimValue") - .HasColumnType("nvarchar(max)"); - - b.Property("RoleId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetRoleClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1); - - b.Property("ClaimType") - .HasColumnType("nvarchar(max)"); - - b.Property("ClaimValue") - .HasColumnType("nvarchar(max)"); - - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.Property("LoginProvider") - .HasColumnType("nvarchar(450)"); - - b.Property("ProviderKey") - .HasColumnType("nvarchar(450)"); - - b.Property("ProviderDisplayName") - .HasColumnType("nvarchar(max)"); - - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("LoginProvider", "ProviderKey"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserLogins", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.Property("RoleId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetUserRoles", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.Property("LoginProvider") - .HasColumnType("nvarchar(450)"); - - b.Property("Name") - .HasColumnType("nvarchar(450)"); - - b.Property("Value") - .HasColumnType("nvarchar(max)"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AspNetUserTokens", (string)null); - }); - modelBuilder.Entity("MangoAPI.Domain.Entities.ChatEntities.UserChatEntity", b => { b.HasOne("MangoAPI.Domain.Entities.ChatEntities.ChatEntity", "Chat") @@ -595,57 +418,6 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("User"); }); - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.HasOne("MangoAPI.Domain.Entities.RoleEntity", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.HasOne("MangoAPI.Domain.Entities.UserEntity", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.HasOne("MangoAPI.Domain.Entities.UserEntity", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.HasOne("MangoAPI.Domain.Entities.RoleEntity", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("MangoAPI.Domain.Entities.UserEntity", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.HasOne("MangoAPI.Domain.Entities.UserEntity", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - modelBuilder.Entity("MangoAPI.Domain.Entities.ChatEntities.ChatEntity", b => { b.Navigation("ChatUsers"); diff --git a/MangoAPI.Infrastructure/Migrations/20230312124540_InitialMigration.cs b/MangoAPI.Infrastructure/Migrations/20230312165859_IdentityRemoved.cs similarity index 62% rename from MangoAPI.Infrastructure/Migrations/20230312124540_InitialMigration.cs rename to MangoAPI.Infrastructure/Migrations/20230312165859_IdentityRemoved.cs index 09d648bf9..cedd4531d 100644 --- a/MangoAPI.Infrastructure/Migrations/20230312124540_InitialMigration.cs +++ b/MangoAPI.Infrastructure/Migrations/20230312165859_IdentityRemoved.cs @@ -5,27 +5,13 @@ namespace MangoAPI.Infrastructure.Migrations { - public partial class InitialMigration : Migration + public partial class IdentityRemoved : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.EnsureSchema( name: "mango"); - migrationBuilder.CreateTable( - name: "AspNetRoles", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - NormalizedName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AspNetRoles", x => x.Id); - }); - migrationBuilder.CreateTable( name: "ChatEntity", schema: "mango", @@ -90,141 +76,20 @@ protected override void Up(MigrationBuilder migrationBuilder) columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), + Username = table.Column(type: "nvarchar(max)", nullable: true), + PasswordHash = table.Column(type: "varbinary(max)", nullable: true), + PasswordSalt = table.Column(type: "varbinary(max)", nullable: true), DisplayName = table.Column(type: "nvarchar(max)", nullable: true), Image = table.Column(type: "nvarchar(max)", nullable: true), Bio = table.Column(type: "nvarchar(max)", nullable: true), UserNameChanged = table.Column(type: "bit", nullable: false), - DisplayNameColour = table.Column(type: "int", nullable: false), - UserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - NormalizedUserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - Email = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - NormalizedEmail = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - EmailConfirmed = table.Column(type: "bit", nullable: false), - PasswordHash = table.Column(type: "nvarchar(max)", nullable: true), - SecurityStamp = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(max)", nullable: true), - PhoneNumber = table.Column(type: "nvarchar(max)", nullable: true), - PhoneNumberConfirmed = table.Column(type: "bit", nullable: false), - TwoFactorEnabled = table.Column(type: "bit", nullable: false), - LockoutEnd = table.Column(type: "datetimeoffset", nullable: true), - LockoutEnabled = table.Column(type: "bit", nullable: false), - AccessFailedCount = table.Column(type: "int", nullable: false) + DisplayNameColour = table.Column(type: "int", nullable: false) }, constraints: table => { table.PrimaryKey("PK_UserEntity", x => x.Id); }); - migrationBuilder.CreateTable( - name: "AspNetRoleClaims", - columns: table => new - { - Id = table.Column(type: "int", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - RoleId = table.Column(type: "uniqueidentifier", nullable: false), - ClaimType = table.Column(type: "nvarchar(max)", nullable: true), - ClaimValue = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AspNetRoleClaims", x => x.Id); - table.ForeignKey( - name: "FK_AspNetRoleClaims_AspNetRoles_RoleId", - column: x => x.RoleId, - principalTable: "AspNetRoles", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AspNetUserClaims", - columns: table => new - { - Id = table.Column(type: "int", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - UserId = table.Column(type: "uniqueidentifier", nullable: false), - ClaimType = table.Column(type: "nvarchar(max)", nullable: true), - ClaimValue = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AspNetUserClaims", x => x.Id); - table.ForeignKey( - name: "FK_AspNetUserClaims_UserEntity_UserId", - column: x => x.UserId, - principalSchema: "mango", - principalTable: "UserEntity", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AspNetUserLogins", - columns: table => new - { - LoginProvider = table.Column(type: "nvarchar(450)", nullable: false), - ProviderKey = table.Column(type: "nvarchar(450)", nullable: false), - ProviderDisplayName = table.Column(type: "nvarchar(max)", nullable: true), - UserId = table.Column(type: "uniqueidentifier", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AspNetUserLogins", x => new { x.LoginProvider, x.ProviderKey }); - table.ForeignKey( - name: "FK_AspNetUserLogins_UserEntity_UserId", - column: x => x.UserId, - principalSchema: "mango", - principalTable: "UserEntity", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AspNetUserRoles", - columns: table => new - { - UserId = table.Column(type: "uniqueidentifier", nullable: false), - RoleId = table.Column(type: "uniqueidentifier", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AspNetUserRoles", x => new { x.UserId, x.RoleId }); - table.ForeignKey( - name: "FK_AspNetUserRoles_AspNetRoles_RoleId", - column: x => x.RoleId, - principalTable: "AspNetRoles", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_AspNetUserRoles_UserEntity_UserId", - column: x => x.UserId, - principalSchema: "mango", - principalTable: "UserEntity", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AspNetUserTokens", - columns: table => new - { - UserId = table.Column(type: "uniqueidentifier", nullable: false), - LoginProvider = table.Column(type: "nvarchar(450)", nullable: false), - Name = table.Column(type: "nvarchar(450)", nullable: false), - Value = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AspNetUserTokens", x => new { x.UserId, x.LoginProvider, x.Name }); - table.ForeignKey( - name: "FK_AspNetUserTokens_UserEntity_UserId", - column: x => x.UserId, - principalSchema: "mango", - principalTable: "UserEntity", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - migrationBuilder.CreateTable( name: "DocumentEntity", schema: "mango", @@ -384,33 +249,6 @@ protected override void Up(MigrationBuilder migrationBuilder) onDelete: ReferentialAction.Cascade); }); - migrationBuilder.CreateIndex( - name: "IX_AspNetRoleClaims_RoleId", - table: "AspNetRoleClaims", - column: "RoleId"); - - migrationBuilder.CreateIndex( - name: "RoleNameIndex", - table: "AspNetRoles", - column: "NormalizedName", - unique: true, - filter: "[NormalizedName] IS NOT NULL"); - - migrationBuilder.CreateIndex( - name: "IX_AspNetUserClaims_UserId", - table: "AspNetUserClaims", - column: "UserId"); - - migrationBuilder.CreateIndex( - name: "IX_AspNetUserLogins_UserId", - table: "AspNetUserLogins", - column: "UserId"); - - migrationBuilder.CreateIndex( - name: "IX_AspNetUserRoles_RoleId", - table: "AspNetUserRoles", - column: "RoleId"); - migrationBuilder.CreateIndex( name: "IX_DocumentEntity_UserId", schema: "mango", @@ -447,20 +285,6 @@ protected override void Up(MigrationBuilder migrationBuilder) table: "UserContactEntity", column: "UserId"); - migrationBuilder.CreateIndex( - name: "EmailIndex", - schema: "mango", - table: "UserEntity", - column: "NormalizedEmail"); - - migrationBuilder.CreateIndex( - name: "UserNameIndex", - schema: "mango", - table: "UserEntity", - column: "NormalizedUserName", - unique: true, - filter: "[NormalizedUserName] IS NOT NULL"); - migrationBuilder.CreateIndex( name: "IX_UserInformationEntity_UserId", schema: "mango", @@ -471,21 +295,6 @@ protected override void Up(MigrationBuilder migrationBuilder) protected override void Down(MigrationBuilder migrationBuilder) { - migrationBuilder.DropTable( - name: "AspNetRoleClaims"); - - migrationBuilder.DropTable( - name: "AspNetUserClaims"); - - migrationBuilder.DropTable( - name: "AspNetUserLogins"); - - migrationBuilder.DropTable( - name: "AspNetUserRoles"); - - migrationBuilder.DropTable( - name: "AspNetUserTokens"); - migrationBuilder.DropTable( name: "DiffieHellmanKeyExchangeEntity", schema: "mango"); @@ -518,9 +327,6 @@ protected override void Down(MigrationBuilder migrationBuilder) name: "UserInformationEntity", schema: "mango"); - migrationBuilder.DropTable( - name: "AspNetRoles"); - migrationBuilder.DropTable( name: "ChatEntity", schema: "mango"); diff --git a/MangoAPI.Infrastructure/Migrations/20230312172331_UserEntityConstraints.Designer.cs b/MangoAPI.Infrastructure/Migrations/20230312172331_UserEntityConstraints.Designer.cs new file mode 100644 index 000000000..1ff7fee2e --- /dev/null +++ b/MangoAPI.Infrastructure/Migrations/20230312172331_UserEntityConstraints.Designer.cs @@ -0,0 +1,449 @@ +// +using System; +using MangoAPI.Infrastructure.Database; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace MangoAPI.Infrastructure.Migrations +{ + [DbContext(typeof(MangoDbContext))] + [Migration("20230312172331_UserEntityConstraints")] + partial class UserEntityConstraints + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "6.0.14") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1); + + modelBuilder.Entity("MangoAPI.Domain.Entities.ChatEntities.ChatEntity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CommunityType") + .HasColumnType("int"); + + b.Property("CreatedAt") + .HasColumnType("datetime2"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("Image") + .HasColumnType("nvarchar(max)"); + + b.Property("LastMessageAuthor") + .HasColumnType("nvarchar(max)"); + + b.Property("LastMessageId") + .HasColumnType("uniqueidentifier"); + + b.Property("LastMessageText") + .HasColumnType("nvarchar(max)"); + + b.Property("LastMessageTime") + .HasColumnType("datetime2"); + + b.Property("MembersCount") + .HasColumnType("int"); + + b.Property("Title") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("ChatEntity", "mango"); + }); + + modelBuilder.Entity("MangoAPI.Domain.Entities.ChatEntities.UserChatEntity", b => + { + b.Property("ChatId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsArchived") + .HasColumnType("bit"); + + b.Property("RoleId") + .HasColumnType("int"); + + b.HasKey("ChatId", "UserId"); + + b.HasIndex("UserId"); + + b.ToTable("UserChatEntity", "mango"); + }); + + modelBuilder.Entity("MangoAPI.Domain.Entities.DiffieHellmanKeyExchangeEntity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreatedAt") + .HasColumnType("datetime2"); + + b.Property("IsConfirmed") + .HasColumnType("bit"); + + b.Property("KeyExchangeType") + .HasColumnType("int"); + + b.Property("ReceiverId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReceiverPublicKey") + .HasColumnType("varbinary(max)"); + + b.Property("SenderId") + .HasColumnType("uniqueidentifier"); + + b.Property("SenderPublicKey") + .IsRequired() + .HasColumnType("varbinary(max)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("DiffieHellmanKeyExchangeEntity", "mango"); + }); + + modelBuilder.Entity("MangoAPI.Domain.Entities.DiffieHellmanParameterEntity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreatedAt") + .HasColumnType("datetime2"); + + b.Property("CreatedBy") + .HasColumnType("uniqueidentifier"); + + b.Property("OpenSslDhParameter") + .IsRequired() + .HasColumnType("varbinary(max)"); + + b.HasKey("Id"); + + b.ToTable("DiffieHellmanParameterEntity", "mango"); + }); + + modelBuilder.Entity("MangoAPI.Domain.Entities.DocumentEntity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("FileName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UploadedAt") + .HasColumnType("datetime2"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("DocumentEntity", "mango"); + }); + + modelBuilder.Entity("MangoAPI.Domain.Entities.MessageEntity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AttachmentFileName") + .HasColumnType("nvarchar(max)"); + + b.Property("ChatId") + .HasColumnType("uniqueidentifier"); + + b.Property("Content") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CreatedAt") + .HasColumnType("datetime2"); + + b.Property("InReplayToAuthor") + .HasColumnType("nvarchar(max)"); + + b.Property("InReplayToText") + .HasColumnType("nvarchar(max)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime2"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ChatId"); + + b.HasIndex("UserId"); + + b.ToTable("MessageEntity", "mango"); + }); + + modelBuilder.Entity("MangoAPI.Domain.Entities.SessionEntity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreatedAt") + .HasColumnType("datetime2"); + + b.Property("ExpiresAt") + .HasColumnType("datetime2"); + + b.Property("RefreshToken") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("SessionEntity", "mango"); + }); + + modelBuilder.Entity("MangoAPI.Domain.Entities.UserContactEntity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ContactId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreatedAt") + .HasColumnType("datetime2"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("UserContactEntity", "mango"); + }); + + modelBuilder.Entity("MangoAPI.Domain.Entities.UserEntity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Bio") + .HasColumnType("nvarchar(max)"); + + b.Property("DisplayName") + .HasColumnType("nvarchar(max)"); + + b.Property("DisplayNameColour") + .HasColumnType("int"); + + b.Property("Image") + .HasColumnType("nvarchar(max)"); + + b.Property("PasswordHash") + .IsRequired() + .HasColumnType("varbinary(max)"); + + b.Property("PasswordSalt") + .IsRequired() + .HasColumnType("varbinary(max)"); + + b.Property("UserNameChanged") + .HasColumnType("bit"); + + b.Property("Username") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("UserEntity", "mango"); + }); + + modelBuilder.Entity("MangoAPI.Domain.Entities.UserInformationEntity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Address") + .HasColumnType("nvarchar(max)"); + + b.Property("BirthDay") + .HasColumnType("datetime2"); + + b.Property("CreatedAt") + .HasColumnType("datetime2"); + + b.Property("Facebook") + .HasColumnType("nvarchar(max)"); + + b.Property("Instagram") + .HasColumnType("nvarchar(max)"); + + b.Property("LinkedIn") + .HasColumnType("nvarchar(max)"); + + b.Property("Twitter") + .HasColumnType("nvarchar(max)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime2"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Website") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("UserId") + .IsUnique(); + + b.ToTable("UserInformationEntity", "mango"); + }); + + modelBuilder.Entity("MangoAPI.Domain.Entities.ChatEntities.UserChatEntity", b => + { + b.HasOne("MangoAPI.Domain.Entities.ChatEntities.ChatEntity", "Chat") + .WithMany("ChatUsers") + .HasForeignKey("ChatId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("MangoAPI.Domain.Entities.UserEntity", "User") + .WithMany("UserChats") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Chat"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("MangoAPI.Domain.Entities.DocumentEntity", b => + { + b.HasOne("MangoAPI.Domain.Entities.UserEntity", "User") + .WithMany("Documents") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); + }); + + modelBuilder.Entity("MangoAPI.Domain.Entities.MessageEntity", b => + { + b.HasOne("MangoAPI.Domain.Entities.ChatEntities.ChatEntity", "Chat") + .WithMany("Messages") + .HasForeignKey("ChatId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("MangoAPI.Domain.Entities.UserEntity", "User") + .WithMany("Messages") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Chat"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("MangoAPI.Domain.Entities.SessionEntity", b => + { + b.HasOne("MangoAPI.Domain.Entities.UserEntity", "UserEntity") + .WithMany("Sessions") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("UserEntity"); + }); + + modelBuilder.Entity("MangoAPI.Domain.Entities.UserContactEntity", b => + { + b.HasOne("MangoAPI.Domain.Entities.UserEntity", "User") + .WithMany("Contacts") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); + }); + + modelBuilder.Entity("MangoAPI.Domain.Entities.UserInformationEntity", b => + { + b.HasOne("MangoAPI.Domain.Entities.UserEntity", "User") + .WithOne("UserInformation") + .HasForeignKey("MangoAPI.Domain.Entities.UserInformationEntity", "UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); + }); + + modelBuilder.Entity("MangoAPI.Domain.Entities.ChatEntities.ChatEntity", b => + { + b.Navigation("ChatUsers"); + + b.Navigation("Messages"); + }); + + modelBuilder.Entity("MangoAPI.Domain.Entities.UserEntity", b => + { + b.Navigation("Contacts"); + + b.Navigation("Documents"); + + b.Navigation("Messages"); + + b.Navigation("Sessions"); + + b.Navigation("UserChats"); + + b.Navigation("UserInformation"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/MangoAPI.Infrastructure/Migrations/20230312172331_UserEntityConstraints.cs b/MangoAPI.Infrastructure/Migrations/20230312172331_UserEntityConstraints.cs new file mode 100644 index 000000000..2b3130bf4 --- /dev/null +++ b/MangoAPI.Infrastructure/Migrations/20230312172331_UserEntityConstraints.cs @@ -0,0 +1,78 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace MangoAPI.Infrastructure.Migrations +{ + public partial class UserEntityConstraints : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "Username", + schema: "mango", + table: "UserEntity", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "PasswordSalt", + schema: "mango", + table: "UserEntity", + type: "varbinary(max)", + nullable: false, + defaultValue: new byte[0], + oldClrType: typeof(byte[]), + oldType: "varbinary(max)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "PasswordHash", + schema: "mango", + table: "UserEntity", + type: "varbinary(max)", + nullable: false, + defaultValue: new byte[0], + oldClrType: typeof(byte[]), + oldType: "varbinary(max)", + oldNullable: true); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "Username", + schema: "mango", + table: "UserEntity", + type: "nvarchar(max)", + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "PasswordSalt", + schema: "mango", + table: "UserEntity", + type: "varbinary(max)", + nullable: true, + oldClrType: typeof(byte[]), + oldType: "varbinary(max)"); + + migrationBuilder.AlterColumn( + name: "PasswordHash", + schema: "mango", + table: "UserEntity", + type: "varbinary(max)", + nullable: true, + oldClrType: typeof(byte[]), + oldType: "varbinary(max)"); + } + } +} diff --git a/MangoAPI.Infrastructure/Migrations/MangoDbContextModelSnapshot.cs b/MangoAPI.Infrastructure/Migrations/MangoDbContextModelSnapshot.cs index 71249929d..f4006bd3c 100644 --- a/MangoAPI.Infrastructure/Migrations/MangoDbContextModelSnapshot.cs +++ b/MangoAPI.Infrastructure/Migrations/MangoDbContextModelSnapshot.cs @@ -208,34 +208,6 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.ToTable("MessageEntity", "mango"); }); - modelBuilder.Entity("MangoAPI.Domain.Entities.RoleEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("nvarchar(max)"); - - b.Property("Name") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("NormalizedName") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName") - .IsUnique() - .HasDatabaseName("RoleNameIndex") - .HasFilter("[NormalizedName] IS NOT NULL"); - - b.ToTable("AspNetRoles", (string)null); - }); - modelBuilder.Entity("MangoAPI.Domain.Entities.SessionEntity", b => { b.Property("Id") @@ -289,77 +261,35 @@ protected override void BuildModel(ModelBuilder modelBuilder) .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); - b.Property("AccessFailedCount") - .HasColumnType("int"); - b.Property("Bio") .HasColumnType("nvarchar(max)"); - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("nvarchar(max)"); - b.Property("DisplayName") .HasColumnType("nvarchar(max)"); b.Property("DisplayNameColour") .HasColumnType("int"); - b.Property("Email") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("EmailConfirmed") - .HasColumnType("bit"); - b.Property("Image") .HasColumnType("nvarchar(max)"); - b.Property("LockoutEnabled") - .HasColumnType("bit"); - - b.Property("LockoutEnd") - .HasColumnType("datetimeoffset"); - - b.Property("NormalizedEmail") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("NormalizedUserName") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("PasswordHash") - .HasColumnType("nvarchar(max)"); - - b.Property("PhoneNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("PhoneNumberConfirmed") - .HasColumnType("bit"); - - b.Property("SecurityStamp") - .HasColumnType("nvarchar(max)"); - - b.Property("TwoFactorEnabled") - .HasColumnType("bit"); + b.Property("PasswordHash") + .IsRequired() + .HasColumnType("varbinary(max)"); - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + b.Property("PasswordSalt") + .IsRequired() + .HasColumnType("varbinary(max)"); b.Property("UserNameChanged") .HasColumnType("bit"); - b.HasKey("Id"); - - b.HasIndex("NormalizedEmail") - .HasDatabaseName("EmailIndex"); + b.Property("Username") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); - b.HasIndex("NormalizedUserName") - .IsUnique() - .HasDatabaseName("UserNameIndex") - .HasFilter("[NormalizedUserName] IS NOT NULL"); + b.HasKey("Id"); b.ToTable("UserEntity", "mango"); }); @@ -408,109 +338,6 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.ToTable("UserInformationEntity", "mango"); }); - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1); - - b.Property("ClaimType") - .HasColumnType("nvarchar(max)"); - - b.Property("ClaimValue") - .HasColumnType("nvarchar(max)"); - - b.Property("RoleId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetRoleClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1); - - b.Property("ClaimType") - .HasColumnType("nvarchar(max)"); - - b.Property("ClaimValue") - .HasColumnType("nvarchar(max)"); - - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.Property("LoginProvider") - .HasColumnType("nvarchar(450)"); - - b.Property("ProviderKey") - .HasColumnType("nvarchar(450)"); - - b.Property("ProviderDisplayName") - .HasColumnType("nvarchar(max)"); - - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("LoginProvider", "ProviderKey"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserLogins", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.Property("RoleId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetUserRoles", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.Property("LoginProvider") - .HasColumnType("nvarchar(450)"); - - b.Property("Name") - .HasColumnType("nvarchar(450)"); - - b.Property("Value") - .HasColumnType("nvarchar(max)"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AspNetUserTokens", (string)null); - }); - modelBuilder.Entity("MangoAPI.Domain.Entities.ChatEntities.UserChatEntity", b => { b.HasOne("MangoAPI.Domain.Entities.ChatEntities.ChatEntity", "Chat") @@ -593,57 +420,6 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Navigation("User"); }); - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.HasOne("MangoAPI.Domain.Entities.RoleEntity", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.HasOne("MangoAPI.Domain.Entities.UserEntity", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.HasOne("MangoAPI.Domain.Entities.UserEntity", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.HasOne("MangoAPI.Domain.Entities.RoleEntity", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("MangoAPI.Domain.Entities.UserEntity", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.HasOne("MangoAPI.Domain.Entities.UserEntity", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - modelBuilder.Entity("MangoAPI.Domain.Entities.ChatEntities.ChatEntity", b => { b.Navigation("ChatUsers"); diff --git a/MangoAPI.IntegrationTests/Helpers/CommandHelper.cs b/MangoAPI.IntegrationTests/Helpers/CommandHelper.cs index fe0865c3b..7bc217a82 100644 --- a/MangoAPI.IntegrationTests/Helpers/CommandHelper.cs +++ b/MangoAPI.IntegrationTests/Helpers/CommandHelper.cs @@ -15,8 +15,7 @@ public static class CommandHelper public static RegisterCommand RegisterKhachaturCommand() { var command = new RegisterCommand( - Email: "xachulxx@gmail.com", - DisplayName: "Khachatur Khachatryan", + Username: "xachulxx@gmail.com", Password: "Bm3-`dPRv-/w#3)cw^97"); return command; @@ -25,8 +24,7 @@ public static RegisterCommand RegisterKhachaturCommand() public static RegisterCommand RegisterPetroCommand() { var command = new RegisterCommand( - Email: "kolosovp95@gmail.com", - DisplayName: "Petro Kolosov", + Username: "kolosovp95@gmail.com", Password: "Bm3-`dPRv-/w#3)cw^97"); return command; @@ -69,7 +67,7 @@ public static SendMessageCommand SendMessageToChannelCommand(Guid userId, Guid c public static LoginCommand CreateLoginCommand(string email, string password) { var command = new LoginCommand( - Email: email, + Username: email, Password: password); return command; diff --git a/MangoAPI.Presentation/Startup.cs b/MangoAPI.Presentation/Startup.cs index 0ce4dcd3e..5fd5d910d 100644 --- a/MangoAPI.Presentation/Startup.cs +++ b/MangoAPI.Presentation/Startup.cs @@ -54,7 +54,7 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env) app.UseStaticFiles(); app.UseSwagger(); - + app.UseSwaggerUI(c => c.SwaggerEndpoint($"/swagger/v{version}/swagger.json", swaggerTitle)); app.UseAuthorization(); @@ -115,7 +115,7 @@ public void ConfigureServices(IServiceCollection services) services.AddDatabaseContextServices(databaseUrl); services.AddSwagger(title: swaggerTitle, version: version); - + services.AddAzureBlobServices( blobUrl, blobContainerName, @@ -128,25 +128,21 @@ public void ConfigureServices(IServiceCollection services) jwtLifetimeMinutes, refreshTokenLifetimeDays); - services.AddSingInManagerServices(); - services.AddSingleton(); - + + services.AddSingleton(); + services.AddSingleton(_ => new MangoUserSettings(mangoUserPassword)); - + services.AddScoped(); - + services.AddValidatorsFromAssembly(typeof(LoginCommandValidator).Assembly); - + services.AddTransient(typeof(IPipelineBehavior<,>), typeof(ValidationBehaviour<,>)); - + services.AddTransient(typeof(ResponseFactory<>)); - + services.AddMediatR(cfg => cfg.RegisterServicesFromAssembly(typeof(RegisterCommandHandler).Assembly)); - - services.AddScoped(); - - services.AddIdentityUsers(); services.AddSignalR(); From ac37d7b423d035f636a1ecef22fc6bebd5df3bb9 Mon Sep 17 00:00:00 2001 From: kolosovpetro Date: Sun, 12 Mar 2023 19:23:47 +0100 Subject: [PATCH 10/71] integration tests fix --- .../Configuration/MangoStartup.cs | 2 ++ .../AddContactShouldThrowCannotAddSelf.cs | 9 ++++--- .../AddContactShouldThrowContactExists.cs | 4 +--- .../LoginTestShouldThrowInvalidCredentials.cs | 7 +++--- .../LoginTestSuccess.cs | 7 +++--- .../LogoutTestShouldThrowUserNotFound.cs | 24 +++++++++---------- .../LogoutTestSuccess.cs | 17 +++++++------ .../RefreshSessionTestSuccess.cs | 13 ++++------ .../SearchContactByDisplayNameTestSuccess.cs | 2 +- .../Helpers/CommandHelper.cs | 8 +++---- 10 files changed, 43 insertions(+), 50 deletions(-) diff --git a/MangoAPI.BusinessLogic/Configuration/MangoStartup.cs b/MangoAPI.BusinessLogic/Configuration/MangoStartup.cs index 26d7a1f8f..7a1da1b27 100644 --- a/MangoAPI.BusinessLogic/Configuration/MangoStartup.cs +++ b/MangoAPI.BusinessLogic/Configuration/MangoStartup.cs @@ -49,6 +49,8 @@ public static void Initialize( services.AddScoped(); + services.AddSingleton(); + services.AddValidatorsFromAssembly(typeof(LoginCommandValidator).Assembly); services.AddTransient(typeof(IPipelineBehavior<,>), typeof(ValidationBehaviour<,>)); diff --git a/MangoAPI.IntegrationTests/ApiCommandsTests/AddContactCommandHandlerTests/AddContactShouldThrowCannotAddSelf.cs b/MangoAPI.IntegrationTests/ApiCommandsTests/AddContactCommandHandlerTests/AddContactShouldThrowCannotAddSelf.cs index 38cf36433..f6aa59b4b 100644 --- a/MangoAPI.IntegrationTests/ApiCommandsTests/AddContactCommandHandlerTests/AddContactShouldThrowCannotAddSelf.cs +++ b/MangoAPI.IntegrationTests/ApiCommandsTests/AddContactCommandHandlerTests/AddContactShouldThrowCannotAddSelf.cs @@ -18,12 +18,11 @@ public async Task AddContactCommandHandlerTestShouldThrowCannotAddSelfAsync() { const string expectedMessage = ResponseMessageCodes.CannotAddSelfToContacts; var expectedDetails = ResponseMessageCodes.ErrorDictionary[expectedMessage]; + var registerPetroCommand = CommandHelper.RegisterPetroCommand(); var user = - await MangoModule.RequestAsync(CommandHelper.RegisterPetroCommand(), CancellationToken.None); - var command = new AddContactCommand( - UserId: user.Response.Tokens.UserId, - ContactId: user.Response.Tokens.UserId); - + await MangoModule.RequestAsync(registerPetroCommand, CancellationToken.None); + + var command = new AddContactCommand(user.Response.Tokens.UserId, user.Response.Tokens.UserId); var result = await MangoModule.RequestAsync(command, CancellationToken.None); assert.Fail(result, expectedMessage, expectedDetails); diff --git a/MangoAPI.IntegrationTests/ApiCommandsTests/AddContactCommandHandlerTests/AddContactShouldThrowContactExists.cs b/MangoAPI.IntegrationTests/ApiCommandsTests/AddContactCommandHandlerTests/AddContactShouldThrowContactExists.cs index 01d035ce3..afdb3651a 100644 --- a/MangoAPI.IntegrationTests/ApiCommandsTests/AddContactCommandHandlerTests/AddContactShouldThrowContactExists.cs +++ b/MangoAPI.IntegrationTests/ApiCommandsTests/AddContactCommandHandlerTests/AddContactShouldThrowContactExists.cs @@ -20,9 +20,7 @@ public async Task AddContactCommandHandlerTestShouldThrowContactExistsAsync() var expectedDetails = ResponseMessageCodes.ErrorDictionary[expectedMessage]; var sender = await MangoModule.RequestAsync(CommandHelper.RegisterKhachaturCommand(), CancellationToken.None); var receiver = await MangoModule.RequestAsync(CommandHelper.RegisterPetroCommand(), CancellationToken.None); - var command = new AddContactCommand( - UserId: sender.Response.Tokens.UserId, - ContactId: receiver.Response.Tokens.UserId); + var command = new AddContactCommand(sender.Response.Tokens.UserId, receiver.Response.Tokens.UserId); await MangoModule.RequestAsync(command, CancellationToken.None); var result = await MangoModule.RequestAsync(command, CancellationToken.None); diff --git a/MangoAPI.IntegrationTests/ApiCommandsTests/LoginCommandHandlerTests/LoginTestShouldThrowInvalidCredentials.cs b/MangoAPI.IntegrationTests/ApiCommandsTests/LoginCommandHandlerTests/LoginTestShouldThrowInvalidCredentials.cs index c7ba631bc..564bd1bab 100644 --- a/MangoAPI.IntegrationTests/ApiCommandsTests/LoginCommandHandlerTests/LoginTestShouldThrowInvalidCredentials.cs +++ b/MangoAPI.IntegrationTests/ApiCommandsTests/LoginCommandHandlerTests/LoginTestShouldThrowInvalidCredentials.cs @@ -17,11 +17,10 @@ public async Task LoginTestShouldThrowInvalidCredentialsAsync() { const string expectedMessage = ResponseMessageCodes.InvalidCredentials; var expectedDetails = ResponseMessageCodes.ErrorDictionary[expectedMessage]; + var command = CommandHelper.CreateLoginCommand("PetroKolosov337", "Bm3-`dPRv-/w#3)cw^97"); - var result = await MangoModule.RequestAsync( - request: CommandHelper.CreateLoginCommand("kolosovp95@gmail.com", "Bm3-`dPRv-/w#3)cw^97"), - cancellationToken: CancellationToken.None); + var result = await MangoModule.RequestAsync(command, CancellationToken.None); assert.Fail(result, expectedMessage, expectedDetails); } -} +} \ No newline at end of file diff --git a/MangoAPI.IntegrationTests/ApiCommandsTests/LoginCommandHandlerTests/LoginTestSuccess.cs b/MangoAPI.IntegrationTests/ApiCommandsTests/LoginCommandHandlerTests/LoginTestSuccess.cs index 7a11c90e5..e78fb3d1f 100644 --- a/MangoAPI.IntegrationTests/ApiCommandsTests/LoginCommandHandlerTests/LoginTestSuccess.cs +++ b/MangoAPI.IntegrationTests/ApiCommandsTests/LoginCommandHandlerTests/LoginTestSuccess.cs @@ -15,11 +15,10 @@ public class LoginTestSuccess : IntegrationTestBase public async Task LoginTestSuccessAsync() { await MangoModule.RequestAsync(CommandHelper.RegisterPetroCommand(), CancellationToken.None); + var command = CommandHelper.CreateLoginCommand("PetroKolosov", "Bm3-`dPRv-/w#3)cw^97"); - var result = await MangoModule.RequestAsync( - request: CommandHelper.CreateLoginCommand("kolosovp95@gmail.com", "Bm3-`dPRv-/w#3)cw^97"), - cancellationToken: CancellationToken.None); + var result = await MangoModule.RequestAsync(command, CancellationToken.None); assert.Pass(result); } -} +} \ No newline at end of file diff --git a/MangoAPI.IntegrationTests/ApiCommandsTests/LogoutCommandHandlerTests/LogoutTestShouldThrowUserNotFound.cs b/MangoAPI.IntegrationTests/ApiCommandsTests/LogoutCommandHandlerTests/LogoutTestShouldThrowUserNotFound.cs index dcbac5deb..b7afb422f 100644 --- a/MangoAPI.IntegrationTests/ApiCommandsTests/LogoutCommandHandlerTests/LogoutTestShouldThrowUserNotFound.cs +++ b/MangoAPI.IntegrationTests/ApiCommandsTests/LogoutCommandHandlerTests/LogoutTestShouldThrowUserNotFound.cs @@ -18,20 +18,20 @@ public async Task LogoutTestShouldThrowUserNotFoundAsync() { const string expectedMessage = ResponseMessageCodes.UserNotFound; var expectedDetails = ResponseMessageCodes.ErrorDictionary[expectedMessage]; - await MangoModule.RequestAsync( - request: CommandHelper.RegisterPetroCommand(), - cancellationToken: CancellationToken.None); - var user1 = await MangoModule.RequestAsync( - request: CommandHelper.RegisterKhachaturCommand(), - cancellationToken: CancellationToken.None); - var userId1 = user1.Response.Tokens.UserId; - var session = await MangoModule.RequestAsync( - request: CommandHelper.CreateLoginCommand("kolosovp95@gmail.com", "Bm3-`dPRv-/w#3)cw^97"), - cancellationToken: CancellationToken.None); - var command = new LogoutCommand(RefreshToken: session.Response.Tokens.RefreshToken, UserId: userId1); + var petroCommand = CommandHelper.RegisterPetroCommand(); + var khachaturCommand = CommandHelper.RegisterKhachaturCommand(); + + var petro = await MangoModule.RequestAsync(petroCommand, CancellationToken.None); + + var khachatur = await MangoModule.RequestAsync(khachaturCommand, CancellationToken.None); + + var khachaturId = khachatur.Response.Tokens.UserId; + var petroRefresh = petro.Response.Tokens.RefreshToken; + + var command = new LogoutCommand(khachaturId, petroRefresh); var result = await MangoModule.RequestAsync(command, CancellationToken.None); assert.Fail(result, expectedMessage, expectedDetails); } -} +} \ No newline at end of file diff --git a/MangoAPI.IntegrationTests/ApiCommandsTests/LogoutCommandHandlerTests/LogoutTestSuccess.cs b/MangoAPI.IntegrationTests/ApiCommandsTests/LogoutCommandHandlerTests/LogoutTestSuccess.cs index 3a0227cef..28822842b 100644 --- a/MangoAPI.IntegrationTests/ApiCommandsTests/LogoutCommandHandlerTests/LogoutTestSuccess.cs +++ b/MangoAPI.IntegrationTests/ApiCommandsTests/LogoutCommandHandlerTests/LogoutTestSuccess.cs @@ -15,16 +15,15 @@ public class LogoutTestSuccess : IntegrationTestBase [Fact] public async Task LogoutTestSuccessAsync() { - var user = await MangoModule.RequestAsync( - request: CommandHelper.RegisterPetroCommand(), - cancellationToken: CancellationToken.None); - var userId = user.Response.Tokens.UserId; - var session = await MangoModule.RequestAsync( - request: CommandHelper.CreateLoginCommand("kolosovp95@gmail.com", "Bm3-`dPRv-/w#3)cw^97"), - cancellationToken: CancellationToken.None); - var command = new LogoutCommand(RefreshToken: session.Response.Tokens.RefreshToken, UserId: userId); + var petroCommand = CommandHelper.RegisterPetroCommand(); + var petro = await MangoModule.RequestAsync(petroCommand, CancellationToken.None); + + var petroId = petro.Response.Tokens.UserId; + var petroRefresh = petro.Response.Tokens.RefreshToken; + + var petroLogout = new LogoutCommand(petroId, petroRefresh); - var result = await MangoModule.RequestAsync(command, CancellationToken.None); + var result = await MangoModule.RequestAsync(petroLogout, CancellationToken.None); assert.Pass(result); } diff --git a/MangoAPI.IntegrationTests/ApiCommandsTests/RefreshSessionCommandHandlerTests/RefreshSessionTestSuccess.cs b/MangoAPI.IntegrationTests/ApiCommandsTests/RefreshSessionCommandHandlerTests/RefreshSessionTestSuccess.cs index 5692d2e40..ebebbaaba 100644 --- a/MangoAPI.IntegrationTests/ApiCommandsTests/RefreshSessionCommandHandlerTests/RefreshSessionTestSuccess.cs +++ b/MangoAPI.IntegrationTests/ApiCommandsTests/RefreshSessionCommandHandlerTests/RefreshSessionTestSuccess.cs @@ -15,14 +15,11 @@ public class RefreshSessionTestSuccess : IntegrationTestBase [Fact] public async Task RefreshSessionTestSuccessAsync() { - await MangoModule.RequestAsync( - request: CommandHelper.RegisterPetroCommand(), - cancellationToken: CancellationToken.None); - var login = await MangoModule.RequestAsync( - request: CommandHelper.CreateLoginCommand("kolosovp95@gmail.com", "Bm3-`dPRv-/w#3)cw^97"), - cancellationToken: CancellationToken.None); - var command = new RefreshSessionCommand(RefreshToken: login.Response.Tokens.RefreshToken); - + var petroCommand = CommandHelper.RegisterPetroCommand(); + var petro = await MangoModule.RequestAsync(petroCommand, CancellationToken.None); + var petroRefresh = petro.Response.Tokens.RefreshToken; + + var command = new RefreshSessionCommand(petroRefresh); var result = await MangoModule.RequestAsync(command, CancellationToken.None); assert.Pass(result); diff --git a/MangoAPI.IntegrationTests/ApiQueries/SearchContactByDisplayNameQueryHandlerTests/SearchContactByDisplayNameTestSuccess.cs b/MangoAPI.IntegrationTests/ApiQueries/SearchContactByDisplayNameQueryHandlerTests/SearchContactByDisplayNameTestSuccess.cs index e806adf77..0b0ee9242 100644 --- a/MangoAPI.IntegrationTests/ApiQueries/SearchContactByDisplayNameQueryHandlerTests/SearchContactByDisplayNameTestSuccess.cs +++ b/MangoAPI.IntegrationTests/ApiQueries/SearchContactByDisplayNameQueryHandlerTests/SearchContactByDisplayNameTestSuccess.cs @@ -24,6 +24,6 @@ public async Task SearchContactByDisplayNameTestSuccessAsync() assert.Pass(result); result.Response.Contacts.Count.Should().Be(1); - result.Response.Contacts[0].DisplayName.Should().Be("Petro Kolosov"); + result.Response.Contacts[0].DisplayName.Should().Be("PetroKolosov"); } } diff --git a/MangoAPI.IntegrationTests/Helpers/CommandHelper.cs b/MangoAPI.IntegrationTests/Helpers/CommandHelper.cs index 7bc217a82..0a036be07 100644 --- a/MangoAPI.IntegrationTests/Helpers/CommandHelper.cs +++ b/MangoAPI.IntegrationTests/Helpers/CommandHelper.cs @@ -15,7 +15,7 @@ public static class CommandHelper public static RegisterCommand RegisterKhachaturCommand() { var command = new RegisterCommand( - Username: "xachulxx@gmail.com", + Username: "Khachatur", Password: "Bm3-`dPRv-/w#3)cw^97"); return command; @@ -24,7 +24,7 @@ public static RegisterCommand RegisterKhachaturCommand() public static RegisterCommand RegisterPetroCommand() { var command = new RegisterCommand( - Username: "kolosovp95@gmail.com", + Username: "PetroKolosov", Password: "Bm3-`dPRv-/w#3)cw^97"); return command; @@ -64,10 +64,10 @@ public static SendMessageCommand SendMessageToChannelCommand(Guid userId, Guid c return command; } - public static LoginCommand CreateLoginCommand(string email, string password) + public static LoginCommand CreateLoginCommand(string username, string password) { var command = new LoginCommand( - Username: email, + Username: username, Password: password); return command; From 0926b7fbc038ff2d7863d4f351b681a20c2499bb Mon Sep 17 00:00:00 2001 From: kolosovpetro Date: Sun, 12 Mar 2023 21:33:23 +0100 Subject: [PATCH 11/71] refactors in integration tests --- .../EditMessageShouldThrowChatNotFound.cs | 22 +++++----- .../EditMessageShouldThrowMessageNotFound.cs | 21 +++++----- .../EditMessageSuccess.cs | 32 +++++++-------- .../LeaveGroupTestShouldThrowChatNotFound.cs | 10 +++-- .../LeaveGroupTestSuccess.cs | 12 +++--- .../SendMessageShouldThrowChatNotFound.cs | 15 +++---- .../SendMessageShouldThrowUserNotFound.cs | 18 ++++----- .../SendMessageSuccessTest.cs | 40 +++++++++---------- .../UpdateProfilePictureTestSuccess.cs | 2 +- ...sInformationTestShouldThrowUserNotFound.cs | 2 +- ...ouldThrowKeyExchangeDoesNotBelongToUser.cs | 29 +++++++------- 11 files changed, 96 insertions(+), 107 deletions(-) diff --git a/MangoAPI.IntegrationTests/ApiCommandsTests/EditMessageCommandHandlerTests/EditMessageShouldThrowChatNotFound.cs b/MangoAPI.IntegrationTests/ApiCommandsTests/EditMessageCommandHandlerTests/EditMessageShouldThrowChatNotFound.cs index df59d8cd7..f3f0dc2d9 100644 --- a/MangoAPI.IntegrationTests/ApiCommandsTests/EditMessageCommandHandlerTests/EditMessageShouldThrowChatNotFound.cs +++ b/MangoAPI.IntegrationTests/ApiCommandsTests/EditMessageCommandHandlerTests/EditMessageShouldThrowChatNotFound.cs @@ -19,20 +19,18 @@ public async Task EditMessageCommandHandlerTestShouldThrowChatNotFoundAsync() { const string expectedMessage = ResponseMessageCodes.ChatNotFound; var expectedDetails = ResponseMessageCodes.ErrorDictionary[expectedMessage]; - var user = - await MangoModule.RequestAsync(CommandHelper.RegisterPetroCommand(), CancellationToken.None); - var chat = - await MangoModule.RequestAsync( - request: CommandHelper.CreateExtremeCodeMainChatCommand(user.Response.Tokens.UserId), - cancellationToken: CancellationToken.None); - var message = - await MangoModule.RequestAsync( - request: CommandHelper.SendMessageToChannelCommand(user.Response.Tokens.UserId, chat.Response.ChatId), - cancellationToken: CancellationToken.None); + var petroCommand = CommandHelper.RegisterPetroCommand(); + + var petro = await MangoModule.RequestAsync(petroCommand, CancellationToken.None); + var petroId = petro.Response.Tokens.UserId; + var chatCommand = CommandHelper.CreateExtremeCodeMainChatCommand(petroId); + var chat = await MangoModule.RequestAsync(chatCommand, CancellationToken.None); + var sendMessageCommand = CommandHelper.SendMessageToChannelCommand(petroId, chat.Response.ChatId); + var message = await MangoModule.RequestAsync(sendMessageCommand, CancellationToken.None); var command = new EditMessageCommand( ChatId: Guid.Empty, - UserId: user.Response.Tokens.UserId, - MessageId: message.Response.MessageId, + petroId, + message.Response.MessageId, ModifiedText: "Message edited"); var result = await MangoModule.RequestAsync(command, CancellationToken.None); diff --git a/MangoAPI.IntegrationTests/ApiCommandsTests/EditMessageCommandHandlerTests/EditMessageShouldThrowMessageNotFound.cs b/MangoAPI.IntegrationTests/ApiCommandsTests/EditMessageCommandHandlerTests/EditMessageShouldThrowMessageNotFound.cs index bc6997f15..8864b288b 100644 --- a/MangoAPI.IntegrationTests/ApiCommandsTests/EditMessageCommandHandlerTests/EditMessageShouldThrowMessageNotFound.cs +++ b/MangoAPI.IntegrationTests/ApiCommandsTests/EditMessageCommandHandlerTests/EditMessageShouldThrowMessageNotFound.cs @@ -19,20 +19,19 @@ public async Task EditMessageTestShouldThrowMessageNotFoundAsync() { const string expectedMessage = ResponseMessageCodes.MessageNotFound; var expectedDetails = ResponseMessageCodes.ErrorDictionary[expectedMessage]; - var user = - await MangoModule.RequestAsync(CommandHelper.RegisterPetroCommand(), CancellationToken.None); - var chat = - await MangoModule.RequestAsync( - request: CommandHelper.CreateExtremeCodeMainChatCommand(user.Response.Tokens.UserId), - cancellationToken: CancellationToken.None); + + var petroCommand = CommandHelper.RegisterPetroCommand(); + var petro = await MangoModule.RequestAsync(petroCommand, CancellationToken.None); + var chatCommand = CommandHelper.CreateExtremeCodeMainChatCommand(petro.Response.Tokens.UserId); + var chat = await MangoModule.RequestAsync(chatCommand, CancellationToken.None); var command = new EditMessageCommand( - UserId: user.Response.Tokens.UserId, - ChatId: chat.Response.ChatId, - MessageId: Guid.NewGuid(), - ModifiedText: "Modified text"); + chat.Response.ChatId, + petro.Response.Tokens.UserId, + Guid.NewGuid(), + "Modified text"); var result = await MangoModule.RequestAsync(command, CancellationToken.None); assert.Fail(result, expectedMessage, expectedDetails); } -} +} \ No newline at end of file diff --git a/MangoAPI.IntegrationTests/ApiCommandsTests/EditMessageCommandHandlerTests/EditMessageSuccess.cs b/MangoAPI.IntegrationTests/ApiCommandsTests/EditMessageCommandHandlerTests/EditMessageSuccess.cs index b26dea229..259325cb6 100644 --- a/MangoAPI.IntegrationTests/ApiCommandsTests/EditMessageCommandHandlerTests/EditMessageSuccess.cs +++ b/MangoAPI.IntegrationTests/ApiCommandsTests/EditMessageCommandHandlerTests/EditMessageSuccess.cs @@ -17,27 +17,23 @@ public class EditMessageSuccess : IntegrationTestBase [Fact] public async Task EditMessageHandlerTestSuccessAsync() { - var user = - await MangoModule.RequestAsync(CommandHelper.RegisterPetroCommand(), CancellationToken.None); - var chat = - await MangoModule.RequestAsync( - request: CommandHelper.CreateExtremeCodeMainChatCommand(user.Response.Tokens.UserId), - cancellationToken: CancellationToken.None); - var message = - await MangoModule.RequestAsync( - request: CommandHelper.SendMessageToChannelCommand(user.Response.Tokens.UserId, chat.Response.ChatId), - cancellationToken: CancellationToken.None); - var command = new EditMessageCommand( - ChatId: chat.Response.ChatId, - UserId: user.Response.Tokens.UserId, - MessageId: message.Response.MessageId, - ModifiedText: "Message edited"); + var petroCommand = CommandHelper.RegisterPetroCommand(); + var petroResult = await MangoModule.RequestAsync(petroCommand, CancellationToken.None); + var chatCommand = CommandHelper.CreateExtremeCodeMainChatCommand(petroResult.Response.Tokens.UserId); + var chatResult = await MangoModule.RequestAsync(chatCommand, CancellationToken.None); + var messageCommand = CommandHelper.SendMessageToChannelCommand(petroResult.Response.Tokens.UserId, chatResult.Response.ChatId); + var messageResult = await MangoModule.RequestAsync(messageCommand, CancellationToken.None); + var editCommand = new EditMessageCommand( + chatResult.Response.ChatId, + petroResult.Response.Tokens.UserId, + messageResult.Response.MessageId, + "Message edited"); - var result = await MangoModule.RequestAsync(command, CancellationToken.None); + var result = await MangoModule.RequestAsync(editCommand, CancellationToken.None); var editedMessage = - await DbContextFixture.Messages.FirstAsync(x => x.Id == message.Response.MessageId); + await DbContextFixture.Messages.FirstAsync(x => x.Id == messageResult.Response.MessageId); assert.Pass(result); - editedMessage.Content.Should().Be(command.ModifiedText); + editedMessage.Content.Should().Be(editCommand.ModifiedText); } } diff --git a/MangoAPI.IntegrationTests/ApiCommandsTests/LeaveGroupCommandHandlerTests/LeaveGroupTestShouldThrowChatNotFound.cs b/MangoAPI.IntegrationTests/ApiCommandsTests/LeaveGroupCommandHandlerTests/LeaveGroupTestShouldThrowChatNotFound.cs index 18323daaa..7be761b0e 100644 --- a/MangoAPI.IntegrationTests/ApiCommandsTests/LeaveGroupCommandHandlerTests/LeaveGroupTestShouldThrowChatNotFound.cs +++ b/MangoAPI.IntegrationTests/ApiCommandsTests/LeaveGroupCommandHandlerTests/LeaveGroupTestShouldThrowChatNotFound.cs @@ -18,12 +18,14 @@ public async Task LeaveGroupTestShouldThrowUserNotFoundAsync() { const string expectedMessage = ResponseMessageCodes.ChatNotFound; var expectedDetails = ResponseMessageCodes.ErrorDictionary[expectedMessage]; - var user = - await MangoModule.RequestAsync(CommandHelper.RegisterPetroCommand(), CancellationToken.None); - var command = new LeaveGroupCommand(UserId: user.Response.Tokens.UserId, ChatId: Guid.NewGuid()); + + var petroCommand = CommandHelper.RegisterPetroCommand(); + var petroResult = await MangoModule.RequestAsync(petroCommand, CancellationToken.None); + var chatId = Guid.NewGuid(); + var command = new LeaveGroupCommand(petroResult.Response.Tokens.UserId, chatId); var result = await MangoModule.RequestAsync(command, CancellationToken.None); assert.Fail(result, expectedMessage, expectedDetails); } -} +} \ No newline at end of file diff --git a/MangoAPI.IntegrationTests/ApiCommandsTests/LeaveGroupCommandHandlerTests/LeaveGroupTestSuccess.cs b/MangoAPI.IntegrationTests/ApiCommandsTests/LeaveGroupCommandHandlerTests/LeaveGroupTestSuccess.cs index 2f54de07e..5692fb316 100644 --- a/MangoAPI.IntegrationTests/ApiCommandsTests/LeaveGroupCommandHandlerTests/LeaveGroupTestSuccess.cs +++ b/MangoAPI.IntegrationTests/ApiCommandsTests/LeaveGroupCommandHandlerTests/LeaveGroupTestSuccess.cs @@ -14,13 +14,11 @@ public class LeaveGroupTestSuccess : IntegrationTestBase [Fact] public async Task LeaveGroupTestSuccessAsync() { - var user = - await MangoModule.RequestAsync(CommandHelper.RegisterPetroCommand(), CancellationToken.None); - var chat = - await MangoModule.RequestAsync( - request: CommandHelper.CreateExtremeCodeMainChatCommand(user.Response.Tokens.UserId), - cancellationToken: CancellationToken.None); - var command = new LeaveGroupCommand(UserId: user.Response.Tokens.UserId, ChatId: chat.Response.ChatId); + var petroCommand = CommandHelper.RegisterPetroCommand(); + var petroResult = await MangoModule.RequestAsync(petroCommand, CancellationToken.None); + var chatCommand = CommandHelper.CreateExtremeCodeMainChatCommand(petroResult.Response.Tokens.UserId); + var chatResult = await MangoModule.RequestAsync(chatCommand, CancellationToken.None); + var command = new LeaveGroupCommand(petroResult.Response.Tokens.UserId, chatResult.Response.ChatId); var result = await MangoModule.RequestAsync(command, CancellationToken.None); diff --git a/MangoAPI.IntegrationTests/ApiCommandsTests/SendMessageCommandHandlerTests/SendMessageShouldThrowChatNotFound.cs b/MangoAPI.IntegrationTests/ApiCommandsTests/SendMessageCommandHandlerTests/SendMessageShouldThrowChatNotFound.cs index d86048898..bc8b45cc2 100644 --- a/MangoAPI.IntegrationTests/ApiCommandsTests/SendMessageCommandHandlerTests/SendMessageShouldThrowChatNotFound.cs +++ b/MangoAPI.IntegrationTests/ApiCommandsTests/SendMessageCommandHandlerTests/SendMessageShouldThrowChatNotFound.cs @@ -18,14 +18,15 @@ public async Task SendMessageShouldThrowChatNotFoundAsync() { const string expectedMessage = ResponseMessageCodes.ChatNotFound; var expectedDetails = ResponseMessageCodes.ErrorDictionary[expectedMessage]; - var user = await MangoModule.RequestAsync( - request: CommandHelper.RegisterPetroCommand(), - cancellationToken: CancellationToken.None); - var result = await MangoModule.RequestAsync( - request: CommandHelper.SendMessageToChannelCommand(user.Response.Tokens.UserId, Guid.NewGuid()), - cancellationToken: CancellationToken.None); + var petroCommand = CommandHelper.RegisterPetroCommand(); + + var user = await MangoModule.RequestAsync(petroCommand, CancellationToken.None); + var chatId = Guid.NewGuid(); + var sendCommand = CommandHelper.SendMessageToChannelCommand(user.Response.Tokens.UserId, chatId); + + var result = await MangoModule.RequestAsync(sendCommand, CancellationToken.None); assert.Fail(result, expectedMessage, expectedDetails); } -} +} \ No newline at end of file diff --git a/MangoAPI.IntegrationTests/ApiCommandsTests/SendMessageCommandHandlerTests/SendMessageShouldThrowUserNotFound.cs b/MangoAPI.IntegrationTests/ApiCommandsTests/SendMessageCommandHandlerTests/SendMessageShouldThrowUserNotFound.cs index 2e257d202..e22bade63 100644 --- a/MangoAPI.IntegrationTests/ApiCommandsTests/SendMessageCommandHandlerTests/SendMessageShouldThrowUserNotFound.cs +++ b/MangoAPI.IntegrationTests/ApiCommandsTests/SendMessageCommandHandlerTests/SendMessageShouldThrowUserNotFound.cs @@ -18,17 +18,15 @@ public async Task SendMessageShouldThrowUserNotFoundAsync() { const string expectedMessage = ResponseMessageCodes.UserNotFound; var expectedDetails = ResponseMessageCodes.ErrorDictionary[expectedMessage]; - var user = await MangoModule.RequestAsync( - request: CommandHelper.RegisterPetroCommand(), - cancellationToken: CancellationToken.None); - var chat = await MangoModule.RequestAsync( - request: CommandHelper.CreateExtremeCodeMainChatCommand(user.Response.Tokens.UserId), - cancellationToken: CancellationToken.None); - var result = await MangoModule.RequestAsync( - request: CommandHelper.SendMessageToChannelCommand(Guid.NewGuid(), chat.Response.ChatId), - cancellationToken: CancellationToken.None); + var petroCommand = CommandHelper.RegisterPetroCommand(); + var petroResult = await MangoModule.RequestAsync(petroCommand, CancellationToken.None); + var chatCommand = CommandHelper.CreateExtremeCodeMainChatCommand(petroResult.Response.Tokens.UserId); + var chatResult = await MangoModule.RequestAsync(chatCommand, CancellationToken.None); + + var sendCommand = CommandHelper.SendMessageToChannelCommand(userId: Guid.NewGuid(), chatResult.Response.ChatId); + var result = await MangoModule.RequestAsync(sendCommand, CancellationToken.None); assert.Fail(result, expectedMessage, expectedDetails); } -} +} \ No newline at end of file diff --git a/MangoAPI.IntegrationTests/ApiCommandsTests/SendMessageCommandHandlerTests/SendMessageSuccessTest.cs b/MangoAPI.IntegrationTests/ApiCommandsTests/SendMessageCommandHandlerTests/SendMessageSuccessTest.cs index d7653af13..96dc302ed 100644 --- a/MangoAPI.IntegrationTests/ApiCommandsTests/SendMessageCommandHandlerTests/SendMessageSuccessTest.cs +++ b/MangoAPI.IntegrationTests/ApiCommandsTests/SendMessageCommandHandlerTests/SendMessageSuccessTest.cs @@ -16,22 +16,20 @@ public class SendMessageSuccessTest : IntegrationTestBase [Fact] public async Task SendMessageNoAttachmentTestSuccessAsync() { - var user = await MangoModule.RequestAsync( - request: CommandHelper.RegisterPetroCommand(), - cancellationToken: CancellationToken.None); - var chat = await MangoModule.RequestAsync( - request: CommandHelper.CreateExtremeCodeMainChatCommand(user.Response.Tokens.UserId), - cancellationToken: CancellationToken.None); + var petroCommand = CommandHelper.RegisterPetroCommand(); + var petroResult = await MangoModule.RequestAsync(petroCommand, CancellationToken.None); + var chatCommand = CommandHelper.CreateExtremeCodeMainChatCommand(petroResult.Response.Tokens.UserId); + var chatResult = await MangoModule.RequestAsync(chatCommand, CancellationToken.None); + var petroId = petroResult.Response.Tokens.UserId; + var sendCommand = CommandHelper.SendMessageToChannelCommand(petroId, chatResult.Response.ChatId); - var result = await MangoModule.RequestAsync( - request: CommandHelper.SendMessageToChannelCommand(user.Response.Tokens.UserId, chat.Response.ChatId), - cancellationToken: CancellationToken.None); - - assert.Pass(result); + var result = await MangoModule.RequestAsync(sendCommand, CancellationToken.None); var messageEntity = await DbContextFixture.Messages .Include(x => x.User) .Include(x => x.Chat) .FirstAsync(x => x.Id == result.Response.MessageId); + + assert.Pass(result); var chatEntity = messageEntity.Chat; var userEntity = messageEntity.User; chatEntity.LastMessageAuthor.Should().Be(userEntity.DisplayName); @@ -43,23 +41,21 @@ public async Task SendMessageNoAttachmentTestSuccessAsync() [Fact] public async Task SendMessageWithAttachmentTestSuccessAsync() { - var user = await MangoModule.RequestAsync( - request: CommandHelper.RegisterPetroCommand(), - cancellationToken: CancellationToken.None); - var chat = await MangoModule.RequestAsync( - request: CommandHelper.CreateExtremeCodeMainChatCommand(user.Response.Tokens.UserId), - cancellationToken: CancellationToken.None); + var petroCommand = CommandHelper.RegisterPetroCommand(); + var petroResult = await MangoModule.RequestAsync(petroCommand, CancellationToken.None); + var chatCommand = CommandHelper.CreateExtremeCodeMainChatCommand(petroResult.Response.Tokens.UserId); + var chatResult = await MangoModule.RequestAsync(chatCommand, CancellationToken.None); + var petroId = petroResult.Response.Tokens.UserId; var file = MangoFilesHelper.GetTestImage(); + var sendCommand = CommandHelper.SendMessageToChannelCommand(petroId, chatResult.Response.ChatId, file); - var result = await MangoModule.RequestAsync( - request: CommandHelper.SendMessageToChannelCommand(user.Response.Tokens.UserId, chat.Response.ChatId, file), - cancellationToken: CancellationToken.None); - - assert.Pass(result); + var result = await MangoModule.RequestAsync(sendCommand, CancellationToken.None); var messageEntity = await DbContextFixture.Messages .Include(x => x.User) .Include(x => x.Chat) .FirstAsync(x => x.Id == result.Response.MessageId); + + assert.Pass(result); var chatEntity = messageEntity.Chat; var userEntity = messageEntity.User; chatEntity.LastMessageAuthor.Should().Be(userEntity.DisplayName); diff --git a/MangoAPI.IntegrationTests/ApiCommandsTests/UpdateProfilePictureCommandHandlerTests/UpdateProfilePictureTestSuccess.cs b/MangoAPI.IntegrationTests/ApiCommandsTests/UpdateProfilePictureCommandHandlerTests/UpdateProfilePictureTestSuccess.cs index 7ee219cea..5e88a3ebd 100644 --- a/MangoAPI.IntegrationTests/ApiCommandsTests/UpdateProfilePictureCommandHandlerTests/UpdateProfilePictureTestSuccess.cs +++ b/MangoAPI.IntegrationTests/ApiCommandsTests/UpdateProfilePictureCommandHandlerTests/UpdateProfilePictureTestSuccess.cs @@ -17,7 +17,7 @@ public async Task UpdateProfilePictureTestSuccessAsync() var userResult = await MangoModule.RequestAsync(CommandHelper.RegisterPetroCommand(), CancellationToken.None); var userId = userResult.Response.Tokens.UserId; var file = MangoFilesHelper.GetTestImage(); - var command = new UpdateProfilePictureCommand(UserId: userId, ContentType: "image/jpeg", PictureFile: file); + var command = new UpdateProfilePictureCommand(userId, ContentType: "image/jpeg", file); var result = await MangoModule.RequestAsync(command, CancellationToken.None); diff --git a/MangoAPI.IntegrationTests/ApiCommandsTests/UpdateUserSocialsInformationCommandHandlerTests/UpdateUserSocialsInformationTestShouldThrowUserNotFound.cs b/MangoAPI.IntegrationTests/ApiCommandsTests/UpdateUserSocialsInformationCommandHandlerTests/UpdateUserSocialsInformationTestShouldThrowUserNotFound.cs index a94a55530..74370fddf 100644 --- a/MangoAPI.IntegrationTests/ApiCommandsTests/UpdateUserSocialsInformationCommandHandlerTests/UpdateUserSocialsInformationTestShouldThrowUserNotFound.cs +++ b/MangoAPI.IntegrationTests/ApiCommandsTests/UpdateUserSocialsInformationCommandHandlerTests/UpdateUserSocialsInformationTestShouldThrowUserNotFound.cs @@ -29,4 +29,4 @@ public async Task UpdateUserSocialsInformationTestSuccessAsync() assert.Fail(result, expectedMessage, expectedDetails); } -} +} \ No newline at end of file diff --git a/MangoAPI.IntegrationTests/ApiQueries/DownloadPartnerPublicKeyQueryHandlerTests/DownloadPartnerPublicKeyTestShouldThrowKeyExchangeDoesNotBelongToUser.cs b/MangoAPI.IntegrationTests/ApiQueries/DownloadPartnerPublicKeyQueryHandlerTests/DownloadPartnerPublicKeyTestShouldThrowKeyExchangeDoesNotBelongToUser.cs index a7a26350f..ab666be97 100644 --- a/MangoAPI.IntegrationTests/ApiQueries/DownloadPartnerPublicKeyQueryHandlerTests/DownloadPartnerPublicKeyTestShouldThrowKeyExchangeDoesNotBelongToUser.cs +++ b/MangoAPI.IntegrationTests/ApiQueries/DownloadPartnerPublicKeyQueryHandlerTests/DownloadPartnerPublicKeyTestShouldThrowKeyExchangeDoesNotBelongToUser.cs @@ -16,23 +16,24 @@ public class DownloadPartnerPublicKeyTestShouldThrowKeyExchangeDoesNotBelongToUs public async Task DownloadPartnerPublicKeyTestShouldThrowKeyExchangeDoesNotBelongToUserAsync() { const string expectedMessage = ResponseMessageCodes.KeyExchangeIsNotConfirmed; + var expectedDetails = ResponseMessageCodes.ErrorDictionary[expectedMessage]; - var sender = - await MangoModule.RequestAsync(CommandHelper.RegisterKhachaturCommand(), CancellationToken.None); - var requestedUser = - await MangoModule.RequestAsync(CommandHelper.RegisterPetroCommand(), CancellationToken.None); + var khachaturCommand = CommandHelper.RegisterKhachaturCommand(); + var senderResult = await MangoModule.RequestAsync(khachaturCommand, CancellationToken.None); + + var petroCommand = CommandHelper.RegisterPetroCommand(); + var receiverResult = await MangoModule.RequestAsync(petroCommand, CancellationToken.None); var publicKey = MangoFilesHelper.GetTestImage(); - var keyExchange = await MangoModule.RequestAsync( - request: CommandHelper.CreateOpenSslCreateKeyExchangeCommand( - receiverId: sender.Response.Tokens.UserId, - senderId: requestedUser.Response.Tokens.UserId, - senderPublicKey: publicKey), - cancellationToken: CancellationToken.None); - var query = new DownloadPartnerPublicKeyQuery(requestedUser.Response.Tokens.UserId, keyExchange.Response.RequestId); - var response = - await MangoModule.RequestAsync(query, CancellationToken.None); + var senderId = senderResult.Response.Tokens.UserId; + var receiverId = receiverResult.Response.Tokens.UserId; + + var sslCommand = CommandHelper.CreateOpenSslCreateKeyExchangeCommand(receiverId, senderId, publicKey); + var keyExchangeResult = await MangoModule.RequestAsync(sslCommand, CancellationToken.None); + + var query = new DownloadPartnerPublicKeyQuery(receiverId, keyExchangeResult.Response.RequestId); + var downloadResult = await MangoModule.RequestAsync(query, CancellationToken.None); - assert.Fail(response, expectedMessage, expectedDetails); + assert.Fail(downloadResult, expectedMessage, expectedDetails); } } From ad9acee6f69ba7920e20f3267eb917428fc53c2e Mon Sep 17 00:00:00 2001 From: kolosovpetro Date: Sun, 12 Mar 2023 21:47:54 +0100 Subject: [PATCH 12/71] minor fixes --- .../ApiCommands/Sessions/LoginCommandValidator.cs | 4 ++-- .../ApiCommands/Users/RegisterCommandValidator.cs | 4 ++-- MangoAPI.BusinessLogic/Models/Contact.cs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/MangoAPI.BusinessLogic/ApiCommands/Sessions/LoginCommandValidator.cs b/MangoAPI.BusinessLogic/ApiCommands/Sessions/LoginCommandValidator.cs index e2b0fd6f4..11efa7d1d 100644 --- a/MangoAPI.BusinessLogic/ApiCommands/Sessions/LoginCommandValidator.cs +++ b/MangoAPI.BusinessLogic/ApiCommands/Sessions/LoginCommandValidator.cs @@ -12,8 +12,8 @@ public LoginCommandValidator() .NotEmpty() .Must(username => username.All(char.IsLetterOrDigit)) .WithMessage("Username must only contain letters or numbers.") - .Length(8, 50) - .WithMessage("Username must be between 8 and 50 characters."); + .Length(1, 50) + .WithMessage("Username must be between 1 and 50 characters."); RuleFor(x => x.Password) .Cascade(CascadeMode.Stop) diff --git a/MangoAPI.BusinessLogic/ApiCommands/Users/RegisterCommandValidator.cs b/MangoAPI.BusinessLogic/ApiCommands/Users/RegisterCommandValidator.cs index ac2cf5495..f255ccd6d 100644 --- a/MangoAPI.BusinessLogic/ApiCommands/Users/RegisterCommandValidator.cs +++ b/MangoAPI.BusinessLogic/ApiCommands/Users/RegisterCommandValidator.cs @@ -12,8 +12,8 @@ public RegisterCommandValidator() .NotEmpty() .Must(username => username.All(char.IsLetterOrDigit)) .WithMessage("Username must only contain letters or numbers.") - .Length(8, 50) - .WithMessage("Username must be between 8 and 50 characters."); + .Length(1, 50) + .WithMessage("Username must be between 1 and 50 characters."); RuleFor(x => x.Password) .Cascade(CascadeMode.Stop) diff --git a/MangoAPI.BusinessLogic/Models/Contact.cs b/MangoAPI.BusinessLogic/Models/Contact.cs index 04639d3d2..13bbf7a4a 100644 --- a/MangoAPI.BusinessLogic/Models/Contact.cs +++ b/MangoAPI.BusinessLogic/Models/Contact.cs @@ -23,6 +23,6 @@ public record Contact [DefaultValue("Uploads/razumovsky_picture.jpg")] public string PictureUrl { get; init; } - [DefaultValue("my-email@gmail.com")] + [DefaultValue("MyUniqueUsername")] public string Username { get; init; } } \ No newline at end of file From b24d34325af389b4ccf3c85ddf6af6768b8dc7aa Mon Sep 17 00:00:00 2001 From: kolosovpetro Date: Sun, 12 Mar 2023 23:25:19 +0100 Subject: [PATCH 13/71] work in progress --- .../Communities/CreateChatCommandHandler.cs | 18 +- .../UpdateChannelPictureCommandHandler.cs | 23 +- .../Messages/DeleteMessageCommandHandler.cs | 4 +- .../Messages/EditMessageCommandHandler.cs | 2 +- .../Messages/SendMessageCommandHandler.cs | 10 +- .../Sessions/LoginCommandHandler.cs | 6 +- .../Sessions/LoginCommandValidator.cs | 4 +- .../Sessions/LogoutCommandHandler.cs | 2 +- .../Sessions/RefreshSessionCommandHandler.cs | 10 +- .../Users/ChangePasswordCommandValidator.cs | 9 +- .../Users/RegisterCommandHandler.cs | 18 +- .../Users/RegisterCommandValidator.cs | 4 +- .../UpdateProfilePictureCommandHandler.cs | 27 +- .../UpdateUserAccountInfoCommandHandler.cs | 2 - .../UpdateUserAccountInfoCommandValidator.cs | 8 +- .../GetCurrentUserChatsQueryHandler.cs | 8 +- .../SearchCommunityQueryHandler.cs | 4 +- .../Contacts/GetContactsQueryHandler.cs | 2 +- .../Contacts/SearchContactQueryHandler.cs | 2 +- .../Messages/GetMessagesQueryHandler.cs | 10 +- .../Messages/SearchChatMessageQueryHandler.cs | 12 +- .../ApiQueries/Users/GetUserQueryHandler.cs | 3 +- MangoAPI.BusinessLogic/Models/Message.cs | 10 +- MangoAPI.BusinessLogic/Models/User.cs | 3 - .../app/components/chats/chats.component.html | 12 +- .../contacts/contacts.component.html | 344 +++++++------- .../components/contacts/contacts.component.ts | 13 +- .../settings/settings.component.html | 24 +- .../components/settings/settings.component.ts | 11 +- .../src/app/types/models/Message.ts | 12 +- MangoAPI.Client/src/app/types/models/User.ts | 1 - .../Entities/ChatEntities/ChatEntity.cs | 8 +- .../ChatEntities/ChatEntityValidator.cs | 2 +- MangoAPI.Domain/Entities/DocumentEntity.cs | 16 - MangoAPI.Domain/Entities/MessageEntity.cs | 6 +- MangoAPI.Domain/Entities/SessionEntity.cs | 2 - MangoAPI.Domain/Entities/UserEntity.cs | 6 +- MangoAPI.Domain/Enums/UserRole.cs | 12 +- .../Configurations/ChatEntityConfiguration.cs | 4 +- .../DocumentEntityConfiguration.cs | 19 - .../MessageEntityConfiguration.cs | 8 +- .../SessionEntityConfiguration.cs | 1 + .../UserContactEntityConfiguration.cs | 3 + .../Configurations/UserEntityConfiguration.cs | 9 +- .../UserInformationEntityConfiguration.cs | 10 + .../Database/MangoDbContext.cs | 5 +- ...20230312165859_IdentityRemoved.Designer.cs | 445 ------------------ .../20230312172331_UserEntityConstraints.cs | 78 --- ....cs => 20230312221808_Initial.Designer.cs} | 99 ++-- ...tyRemoved.cs => 20230312221808_Initial.cs} | 77 +-- .../Migrations/MangoDbContextModelSnapshot.cs | 95 ++-- .../CreateChatTestSuccess.cs | 16 +- .../EditMessageSuccess.cs | 2 +- .../SendMessageSuccessTest.cs | 4 +- ...lPictureShouldThrowLimitExceed10PerHour.cs | 58 --- ...uldThrowUploadedDocumentsLimitReached10.cs | 40 -- .../UserChatEntityTestSuccess.cs | 2 - 57 files changed, 419 insertions(+), 1226 deletions(-) delete mode 100644 MangoAPI.Domain/Entities/DocumentEntity.cs delete mode 100644 MangoAPI.Infrastructure/Database/Configurations/DocumentEntityConfiguration.cs delete mode 100644 MangoAPI.Infrastructure/Migrations/20230312165859_IdentityRemoved.Designer.cs delete mode 100644 MangoAPI.Infrastructure/Migrations/20230312172331_UserEntityConstraints.cs rename MangoAPI.Infrastructure/Migrations/{20230312172331_UserEntityConstraints.Designer.cs => 20230312221808_Initial.Designer.cs} (84%) rename MangoAPI.Infrastructure/Migrations/{20230312165859_IdentityRemoved.cs => 20230312221808_Initial.cs} (84%) delete mode 100644 MangoAPI.IntegrationTests/ApiCommandsTests/UpdateChannelPictureCommandHandlerTests/UpdateChannelPictureShouldThrowLimitExceed10PerHour.cs delete mode 100644 MangoAPI.IntegrationTests/ApiCommandsTests/UpdateProfilePictureCommandHandlerTests/UpdateProfilePictureTestShouldThrowUploadedDocumentsLimitReached10.cs diff --git a/MangoAPI.BusinessLogic/ApiCommands/Communities/CreateChatCommandHandler.cs b/MangoAPI.BusinessLogic/ApiCommands/Communities/CreateChatCommandHandler.cs index 96a5d1e19..aa7318a68 100644 --- a/MangoAPI.BusinessLogic/ApiCommands/Communities/CreateChatCommandHandler.cs +++ b/MangoAPI.BusinessLogic/ApiCommands/Communities/CreateChatCommandHandler.cs @@ -74,16 +74,6 @@ public async Task> Handle( return responseFactory.SuccessResponse(CreateCommunityResponse.FromSuccess(existingChat)); } - // var chatEntity = new ChatEntity - // { - // Id = Guid.NewGuid(), - // CommunityType = CommunityType.DirectChat, - // Title = $"{currentUserDisplayName} / {partner.DisplayName}", - // CreatedAt = DateTime.UtcNow, - // Description = $"Direct chat between {currentUserDisplayName} and {partner.DisplayName}", - // MembersCount = 2, - // }; - var title = $"{currentUserDisplayName} / {partner.DisplayName}"; var description = $"Direct chat between {currentUserDisplayName} and {partner.DisplayName}"; @@ -91,19 +81,13 @@ public async Task> Handle( title, CommunityType.DirectChat, description, - image: null, + image: String.Empty, DateTime.UtcNow, membersCount: 2); var senderUserChat = UserChatEntity.Create(request.UserId, chat.Id, UserRole.User); var receiverUserChat = UserChatEntity.Create(request.PartnerId, chat.Id, UserRole.User); - // var userChats = new[] - // { - // new UserChatEntity { ChatId = chat.Id, RoleId = UserRole.User, UserId = request.UserId }, - // new UserChatEntity { ChatId = chat.Id, RoleId = UserRole.User, UserId = request.PartnerId }, - // }; - dbContext.Chats.Add(chat); dbContext.UserChats.AddRange(senderUserChat, receiverUserChat); diff --git a/MangoAPI.BusinessLogic/ApiCommands/Communities/UpdateChannelPictureCommandHandler.cs b/MangoAPI.BusinessLogic/ApiCommands/Communities/UpdateChannelPictureCommandHandler.cs index f81eaafa8..8f85ba1c6 100644 --- a/MangoAPI.BusinessLogic/ApiCommands/Communities/UpdateChannelPictureCommandHandler.cs +++ b/MangoAPI.BusinessLogic/ApiCommands/Communities/UpdateChannelPictureCommandHandler.cs @@ -1,11 +1,9 @@ -using System; -using System.Threading; +using System.Threading; using System.Threading.Tasks; using MangoAPI.Application.Interfaces; using MangoAPI.Application.Services; using MangoAPI.BusinessLogic.Responses; using MangoAPI.Domain.Constants; -using MangoAPI.Domain.Entities; using MangoAPI.Domain.Enums; using MangoAPI.Infrastructure.Database; using MediatR; @@ -35,18 +33,6 @@ public async Task> Handle( UpdateChanelPictureCommand request, CancellationToken cancellationToken) { - var totalUploadedDocsCount = await dbContext.Documents.CountAsync( - x => - x.UserId == request.UserId && - x.UploadedAt > DateTime.UtcNow.AddHours(-1), cancellationToken); - - if (totalUploadedDocsCount >= 10) - { - const string message = ResponseMessageCodes.UploadedDocumentsLimitReached10; - var details = ResponseMessageCodes.ErrorDictionary[message]; - return responseFactory.ConflictResponse(message, details); - } - var userChat = await dbContext.UserChats .Include(x => x.Chat) .FirstOrDefaultAsync( @@ -70,13 +56,6 @@ public async Task> Handle( await blobService.UploadFileBlobAsync(stream, request.ContentType, uniqueFileName); - var newUserPicture = new DocumentEntity - { - FileName = uniqueFileName, UserId = request.UserId, UploadedAt = DateTime.UtcNow, - }; - - dbContext.Documents.Add(newUserPicture); - userChat.Chat.ChangeChatImage(uniqueFileName); dbContext.Update(userChat.Chat); diff --git a/MangoAPI.BusinessLogic/ApiCommands/Messages/DeleteMessageCommandHandler.cs b/MangoAPI.BusinessLogic/ApiCommands/Messages/DeleteMessageCommandHandler.cs index 2591a5baa..4a6b58c80 100644 --- a/MangoAPI.BusinessLogic/ApiCommands/Messages/DeleteMessageCommandHandler.cs +++ b/MangoAPI.BusinessLogic/ApiCommands/Messages/DeleteMessageCommandHandler.cs @@ -85,7 +85,7 @@ public async Task> Handle( messageDeleteNotification.NewLastMessageAuthor = newLastMessage?.User?.DisplayName; messageDeleteNotification.NewLastMessageId = newLastMessage?.Id; - messageDeleteNotification.NewLastMessageText = newLastMessage?.Content; + messageDeleteNotification.NewLastMessageText = newLastMessage?.Text; messageDeleteNotification.NewLastMessageTime = newLastMessage?.CreatedAt; // chat.LastMessageAuthor = newLastMessage?.User?.DisplayName; @@ -95,7 +95,7 @@ public async Task> Handle( chat.UpdateLastMessage( lastMessageAuthor: newLastMessage?.User?.DisplayName, - lastMessageText: newLastMessage?.Content, + lastMessageText: newLastMessage?.Text, newLastMessage?.CreatedAt, newLastMessage?.Id); } diff --git a/MangoAPI.BusinessLogic/ApiCommands/Messages/EditMessageCommandHandler.cs b/MangoAPI.BusinessLogic/ApiCommands/Messages/EditMessageCommandHandler.cs index 896825f7e..74b768bcb 100644 --- a/MangoAPI.BusinessLogic/ApiCommands/Messages/EditMessageCommandHandler.cs +++ b/MangoAPI.BusinessLogic/ApiCommands/Messages/EditMessageCommandHandler.cs @@ -77,7 +77,7 @@ public async Task> Handle( var messageIsLast = chat.LastMessageId.HasValue && chat.LastMessageId == request.MessageId; var updatedAt = DateTime.UtcNow; - message.Content = request.ModifiedText; + message.Text = request.ModifiedText; message.UpdatedAt = updatedAt; if (messageIsLast) diff --git a/MangoAPI.BusinessLogic/ApiCommands/Messages/SendMessageCommandHandler.cs b/MangoAPI.BusinessLogic/ApiCommands/Messages/SendMessageCommandHandler.cs index ff0ca1db1..7aa20d256 100644 --- a/MangoAPI.BusinessLogic/ApiCommands/Messages/SendMessageCommandHandler.cs +++ b/MangoAPI.BusinessLogic/ApiCommands/Messages/SendMessageCommandHandler.cs @@ -47,7 +47,7 @@ public async Task> Handle( var user = await dbContext.Users.AsNoTracking() .Select(x => new { - x.DisplayName, x.DisplayNameColour, x.Image, x.Id, + x.DisplayName, x.DisplayNameColour, Image = x.ImageFileName, x.Id, }).FirstOrDefaultAsync( x => x.Id == request.UserId, cancellationToken); @@ -79,16 +79,16 @@ public async Task> Handle( Id = request.MessageId ?? Guid.NewGuid(), ChatId = request.ChatId, UserId = request.UserId, - Content = request.MessageText, + Text = request.MessageText, CreatedAt = request.CreatedAt ?? DateTime.UtcNow, AttachmentFileName = attachmentUniqueFileName, - InReplayToAuthor = request.InReplayToAuthor, - InReplayToText = request.InReplayToText, + InReplyToUser = request.InReplayToAuthor, + InReplyToText = request.InReplayToText, }; userChat.Chat.UpdateLastMessage( lastMessageAuthor: user.DisplayName, - lastMessageText: messageEntity.Content, + lastMessageText: messageEntity.Text, messageEntity.CreatedAt, messageEntity.Id); diff --git a/MangoAPI.BusinessLogic/ApiCommands/Sessions/LoginCommandHandler.cs b/MangoAPI.BusinessLogic/ApiCommands/Sessions/LoginCommandHandler.cs index c98b57aa0..577e444db 100644 --- a/MangoAPI.BusinessLogic/ApiCommands/Sessions/LoginCommandHandler.cs +++ b/MangoAPI.BusinessLogic/ApiCommands/Sessions/LoginCommandHandler.cs @@ -66,8 +66,8 @@ public async Task> Handle( var session = new SessionEntity { + Id = Guid.NewGuid(), UserId = user.Id, - RefreshToken = Guid.NewGuid(), ExpiresAt = DateTime.UtcNow.AddDays(jwtGeneratorSettings.MangoRefreshTokenLifetimeDays), CreatedAt = DateTime.UtcNow }; @@ -89,11 +89,11 @@ public async Task> Handle( var expires = ((DateTimeOffset)session.ExpiresAt).ToUnixTimeSeconds(); var userDisplayName = user.DisplayName; - var userProfilePictureUrl = $"{blobServiceSettings.MangoBlobAccess}/{user.Image}"; + var userProfilePictureUrl = $"{blobServiceSettings.MangoBlobAccess}/{user.ImageFileName}"; var tokens = TokensResponse.FromSuccess( accessToken, - session.RefreshToken, + session.Id, user.Id, expires, userDisplayName, diff --git a/MangoAPI.BusinessLogic/ApiCommands/Sessions/LoginCommandValidator.cs b/MangoAPI.BusinessLogic/ApiCommands/Sessions/LoginCommandValidator.cs index 11efa7d1d..57351020f 100644 --- a/MangoAPI.BusinessLogic/ApiCommands/Sessions/LoginCommandValidator.cs +++ b/MangoAPI.BusinessLogic/ApiCommands/Sessions/LoginCommandValidator.cs @@ -18,7 +18,7 @@ public LoginCommandValidator() RuleFor(x => x.Password) .Cascade(CascadeMode.Stop) .NotEmpty() - .Length(8, 50) - .WithMessage("Password must be at least 8 characters."); + .Length(5, 50) + .WithMessage("Password must be at least 5 characters."); } } \ No newline at end of file diff --git a/MangoAPI.BusinessLogic/ApiCommands/Sessions/LogoutCommandHandler.cs b/MangoAPI.BusinessLogic/ApiCommands/Sessions/LogoutCommandHandler.cs index f55d5caf1..ba45bdd5b 100644 --- a/MangoAPI.BusinessLogic/ApiCommands/Sessions/LogoutCommandHandler.cs +++ b/MangoAPI.BusinessLogic/ApiCommands/Sessions/LogoutCommandHandler.cs @@ -27,7 +27,7 @@ public async Task> Handle( { var session = await dbContext.Sessions .FirstOrDefaultAsync( - sessionEntity => sessionEntity.RefreshToken == request.RefreshToken, + sessionEntity => sessionEntity.Id == request.RefreshToken, cancellationToken); if (session is null) diff --git a/MangoAPI.BusinessLogic/ApiCommands/Sessions/RefreshSessionCommandHandler.cs b/MangoAPI.BusinessLogic/ApiCommands/Sessions/RefreshSessionCommandHandler.cs index b0768f5bb..05d344d4b 100644 --- a/MangoAPI.BusinessLogic/ApiCommands/Sessions/RefreshSessionCommandHandler.cs +++ b/MangoAPI.BusinessLogic/ApiCommands/Sessions/RefreshSessionCommandHandler.cs @@ -41,7 +41,7 @@ public async Task> Handle( var session = await dbContext.Sessions .Include(x => x.UserEntity) .FirstOrDefaultAsync( - entity => entity.RefreshToken == request.RefreshToken, + entity => entity.Id == request.RefreshToken, cancellationToken); if (session is null || session.IsExpired) @@ -69,7 +69,7 @@ public async Task> Handle( var newSession = new SessionEntity { - RefreshToken = Guid.NewGuid(), + Id = Guid.NewGuid(), UserId = session.UserId, ExpiresAt = DateTime.UtcNow.AddDays(jwtGeneratorSettings.MangoRefreshTokenLifetimeDays), CreatedAt = DateTime.UtcNow, @@ -82,11 +82,11 @@ public async Task> Handle( var expires = ((DateTimeOffset)session.ExpiresAt).ToUnixTimeSeconds(); var userDisplayName = session.UserEntity.DisplayName; - var userProfilePictureUrl = $"{blobServiceSettings.MangoBlobAccess}/{session.UserEntity.Image}"; + var userProfilePictureUrl = $"{blobServiceSettings.MangoBlobAccess}/{session.UserEntity.ImageFileName}"; var result = TokensResponse.FromSuccess( accessToken, - newSession.RefreshToken, + newSession.Id, session.UserId, expires, userDisplayName, @@ -95,4 +95,4 @@ public async Task> Handle( return responseFactory.SuccessResponse(result); } -} +} \ No newline at end of file diff --git a/MangoAPI.BusinessLogic/ApiCommands/Users/ChangePasswordCommandValidator.cs b/MangoAPI.BusinessLogic/ApiCommands/Users/ChangePasswordCommandValidator.cs index 9769dd6d4..7445567f5 100644 --- a/MangoAPI.BusinessLogic/ApiCommands/Users/ChangePasswordCommandValidator.cs +++ b/MangoAPI.BusinessLogic/ApiCommands/Users/ChangePasswordCommandValidator.cs @@ -13,12 +13,13 @@ public ChangePasswordCommandValidator() RuleFor(x => x.CurrentPassword) .NotEqual(x => x.NewPassword) .WithMessage("New and old passwords cannot be same") - .Length(8, 50); + .Length(5, 50) + .WithMessage("Password must be at least 5 characters."); RuleFor(x => x.NewPassword) .Equal(x => x.RepeatNewPassword) .WithMessage("New password and repeat password should be same.") - .Length(8, 50) - .WithMessage("Password must be at least 8 characters."); + .Length(5, 50) + .WithMessage("Password must be at least 5 characters."); } -} +} \ No newline at end of file diff --git a/MangoAPI.BusinessLogic/ApiCommands/Users/RegisterCommandHandler.cs b/MangoAPI.BusinessLogic/ApiCommands/Users/RegisterCommandHandler.cs index f6a88fccb..9bcb393f5 100644 --- a/MangoAPI.BusinessLogic/ApiCommands/Users/RegisterCommandHandler.cs +++ b/MangoAPI.BusinessLogic/ApiCommands/Users/RegisterCommandHandler.cs @@ -66,7 +66,7 @@ public async Task> Handle(RegisterCommand request, Cancel { DisplayName = request.Username, Username = request.Username, - Image = defaultAvatar, + ImageFileName = defaultAvatar, DisplayNameColour = (DisplayNameColour)color, PasswordHash = hmac.ComputeHash(Encoding.UTF8.GetBytes(request.Password)), PasswordSalt = hmac.Key @@ -80,8 +80,8 @@ public async Task> Handle(RegisterCommand request, Cancel var session = new SessionEntity { + Id = Guid.NewGuid(), UserId = newUser.Id, - RefreshToken = Guid.NewGuid(), ExpiresAt = DateTime.UtcNow.AddDays(jwtGeneratorSettings.MangoRefreshTokenLifetimeDays), CreatedAt = DateTime.UtcNow, }; @@ -110,7 +110,7 @@ public async Task> Handle(RegisterCommand request, Cancel mangoChatEntity.UpdateLastMessage( lastMessageAuthor: mangoUser.DisplayName, - lastMessageText: lastMessage.Content, + lastMessageText: lastMessage.Text, lastMessage.CreatedAt, lastMessage.Id); @@ -122,11 +122,11 @@ public async Task> Handle(RegisterCommand request, Cancel var expires = ((DateTimeOffset)session.ExpiresAt).ToUnixTimeSeconds(); var userDisplayName = newUser.DisplayName; - var userProfilePictureUrl = $"{blobServiceSettings.MangoBlobAccess}/{newUser.Image}"; + var userProfilePictureUrl = $"{blobServiceSettings.MangoBlobAccess}/{newUser.ImageFileName}"; var response = TokensResponse.FromSuccess( accessToken, - session.RefreshToken, + session.Id, newUser.Id, expires, userDisplayName, @@ -146,7 +146,7 @@ private static ChatEntity CreateStarterChat(UserEntity mangoUser) title, CommunityType.DirectChat, description, - mangoUser.Image, + mangoUser.ImageFileName, DateTime.UtcNow, membersCount: 2); return mangoChatEntity; @@ -159,7 +159,7 @@ private static MessageEntity[] GenerateGreetingMessages(ChatEntity mangoChatEnti Id = Guid.NewGuid(), UserId = SeedDataConstants.MangoId, ChatId = mangoChatEntity.Id, - Content = GreetingsConstants.Hello, + Text = GreetingsConstants.Hello, }; var secondMessage = new MessageEntity @@ -167,7 +167,7 @@ private static MessageEntity[] GenerateGreetingMessages(ChatEntity mangoChatEnti Id = Guid.NewGuid(), UserId = SeedDataConstants.MangoId, ChatId = mangoChatEntity.Id, - Content = GreetingsConstants.Guide, + Text = GreetingsConstants.Guide, }; var greetingMessages = new[] { firstMessage, secondMessage }; @@ -186,7 +186,7 @@ private static UserEntity GenerateMangoUser(string password) Bio = "Service notifications", Id = SeedDataConstants.MangoId, Username = "MangoMessenger", - Image = "mango_logo.png", + ImageFileName = "mango_logo.png", PasswordHash = hmac.ComputeHash(Encoding.UTF8.GetBytes(password)), PasswordSalt = hmac.Key }; diff --git a/MangoAPI.BusinessLogic/ApiCommands/Users/RegisterCommandValidator.cs b/MangoAPI.BusinessLogic/ApiCommands/Users/RegisterCommandValidator.cs index f255ccd6d..cfc240e68 100644 --- a/MangoAPI.BusinessLogic/ApiCommands/Users/RegisterCommandValidator.cs +++ b/MangoAPI.BusinessLogic/ApiCommands/Users/RegisterCommandValidator.cs @@ -18,7 +18,7 @@ public RegisterCommandValidator() RuleFor(x => x.Password) .Cascade(CascadeMode.Stop) .NotEmpty() - .Length(8, 50) - .WithMessage("Password must be at least 8 characters."); + .Length(5, 50) + .WithMessage("Password must be at least 5 characters."); } } \ No newline at end of file diff --git a/MangoAPI.BusinessLogic/ApiCommands/Users/UpdateProfilePictureCommandHandler.cs b/MangoAPI.BusinessLogic/ApiCommands/Users/UpdateProfilePictureCommandHandler.cs index 32f4c4215..78341f8f5 100644 --- a/MangoAPI.BusinessLogic/ApiCommands/Users/UpdateProfilePictureCommandHandler.cs +++ b/MangoAPI.BusinessLogic/ApiCommands/Users/UpdateProfilePictureCommandHandler.cs @@ -1,11 +1,9 @@ -using System; -using System.Threading; +using System.Threading; using System.Threading.Tasks; using MangoAPI.Application.Interfaces; using MangoAPI.Application.Services; using MangoAPI.BusinessLogic.Responses; using MangoAPI.Domain.Constants; -using MangoAPI.Domain.Entities; using MangoAPI.Infrastructure.Database; using MediatR; using Microsoft.EntityFrameworkCore; @@ -33,18 +31,6 @@ public async Task> Handle( UpdateProfilePictureCommand request, CancellationToken cancellationToken) { - var totalUploadedDocsCount = await dbContext.Documents.CountAsync( - x => - x.UserId == request.UserId && - x.UploadedAt > DateTime.UtcNow.AddHours(-1), cancellationToken); - - if (totalUploadedDocsCount > 10) - { - const string message = ResponseMessageCodes.UploadedDocumentsLimitReached10; - var details = ResponseMessageCodes.ErrorDictionary[message]; - return responseFactory.ConflictResponse(message, details); - } - var user = await dbContext.Users .FirstOrDefaultAsync( userEntity => userEntity.Id == request.UserId, @@ -63,16 +49,7 @@ public async Task> Handle( await blobService.UploadFileBlobAsync(file.OpenReadStream(), request.ContentType, uniqueFileName); - var newUserPicture = new DocumentEntity - { - FileName = uniqueFileName, - UserId = request.UserId, - UploadedAt = DateTime.UtcNow, - }; - - dbContext.Documents.Add(newUserPicture); - - user.Image = uniqueFileName; + user.ImageFileName = uniqueFileName; dbContext.Users.Update(user); diff --git a/MangoAPI.BusinessLogic/ApiCommands/Users/UpdateUserAccountInfoCommandHandler.cs b/MangoAPI.BusinessLogic/ApiCommands/Users/UpdateUserAccountInfoCommandHandler.cs index de4cf3cb5..7e8418eed 100644 --- a/MangoAPI.BusinessLogic/ApiCommands/Users/UpdateUserAccountInfoCommandHandler.cs +++ b/MangoAPI.BusinessLogic/ApiCommands/Users/UpdateUserAccountInfoCommandHandler.cs @@ -68,8 +68,6 @@ public async Task> Handle( user.Username = request.Username; - user.UserNameChanged = true; - user.Bio = request.Bio; user.UserInformation.Address = request.Address; diff --git a/MangoAPI.BusinessLogic/ApiCommands/Users/UpdateUserAccountInfoCommandValidator.cs b/MangoAPI.BusinessLogic/ApiCommands/Users/UpdateUserAccountInfoCommandValidator.cs index f79d91e13..8bdb57e2a 100644 --- a/MangoAPI.BusinessLogic/ApiCommands/Users/UpdateUserAccountInfoCommandValidator.cs +++ b/MangoAPI.BusinessLogic/ApiCommands/Users/UpdateUserAccountInfoCommandValidator.cs @@ -7,6 +7,8 @@ public class UpdateUserAccountInfoCommandValidator : AbstractValidator x.UserId).NotEmpty(); + RuleFor(x => x.Address) .Cascade(CascadeMode.Stop) .Length(0, 120); @@ -17,15 +19,13 @@ public UpdateUserAccountInfoCommandValidator() RuleFor(x => x.DisplayName) .Cascade(CascadeMode.Stop) - .Length(1, 40); - - RuleFor(x => x.UserId).NotEmpty(); + .Length(1, 50); RuleFor(x => x.Username) .Cascade(CascadeMode.Stop) .Must(username => username.All(char.IsLetterOrDigit)) .NotEmpty() - .Length(1, 40); + .Length(1, 50); RuleFor(x => x.Website) .Cascade(CascadeMode.Stop) diff --git a/MangoAPI.BusinessLogic/ApiQueries/Communities/GetCurrentUserChatsQueryHandler.cs b/MangoAPI.BusinessLogic/ApiQueries/Communities/GetCurrentUserChatsQueryHandler.cs index 9a9101a99..d8564f394 100644 --- a/MangoAPI.BusinessLogic/ApiQueries/Communities/GetCurrentUserChatsQueryHandler.cs +++ b/MangoAPI.BusinessLogic/ApiQueries/Communities/GetCurrentUserChatsQueryHandler.cs @@ -43,8 +43,8 @@ public async Task> Handle( ChatId = x.ChatId, Title = x.Chat.Title, CommunityType = x.Chat.CommunityType, - ChatLogoImageUrl = x.Chat.Image != null - ? $"{blobServiceSettings.MangoBlobAccess}/{x.Chat.Image}" + ChatLogoImageUrl = x.Chat.ImageFileName != null + ? $"{blobServiceSettings.MangoBlobAccess}/{x.Chat.ImageFileName}" : null, Description = x.Chat.Description, MembersCount = x.Chat.MembersCount, @@ -85,8 +85,8 @@ public async Task> Handle( .FirstOrDefault(x => x.ChatId == currentChat.ChatId)?.User; currentChat.Title = colleague?.DisplayName; - currentChat.ChatLogoImageUrl = colleague?.Image != null - ? $"{blobServiceSettings.MangoBlobAccess}/{colleague.Image}" + currentChat.ChatLogoImageUrl = colleague?.ImageFileName != null + ? $"{blobServiceSettings.MangoBlobAccess}/{colleague.ImageFileName}" : null; } diff --git a/MangoAPI.BusinessLogic/ApiQueries/Communities/SearchCommunityQueryHandler.cs b/MangoAPI.BusinessLogic/ApiQueries/Communities/SearchCommunityQueryHandler.cs index eb1e13ff3..377755635 100644 --- a/MangoAPI.BusinessLogic/ApiQueries/Communities/SearchCommunityQueryHandler.cs +++ b/MangoAPI.BusinessLogic/ApiQueries/Communities/SearchCommunityQueryHandler.cs @@ -41,8 +41,8 @@ public async Task> Handle( ChatId = x.Id, Title = x.Title, CommunityType = x.CommunityType, - ChatLogoImageUrl = x.Image != null - ? $"{blobServiceSettings.MangoBlobAccess}/{x.Image}" + ChatLogoImageUrl = x.ImageFileName != null + ? $"{blobServiceSettings.MangoBlobAccess}/{x.ImageFileName}" : null, Description = x.Description, MembersCount = x.MembersCount, diff --git a/MangoAPI.BusinessLogic/ApiQueries/Contacts/GetContactsQueryHandler.cs b/MangoAPI.BusinessLogic/ApiQueries/Contacts/GetContactsQueryHandler.cs index 078c30f13..2c9718b92 100644 --- a/MangoAPI.BusinessLogic/ApiQueries/Contacts/GetContactsQueryHandler.cs +++ b/MangoAPI.BusinessLogic/ApiQueries/Contacts/GetContactsQueryHandler.cs @@ -39,7 +39,7 @@ orderby userContact.CreatedAt DisplayName = userEntity.DisplayName, Address = userEntity.UserInformation.Address, Bio = userEntity.Bio, - PictureUrl = $"{blobServiceSettings.MangoBlobAccess}/{userEntity.Image}", + PictureUrl = $"{blobServiceSettings.MangoBlobAccess}/{userEntity.ImageFileName}", Username = userEntity.Username, IsContact = true, }; diff --git a/MangoAPI.BusinessLogic/ApiQueries/Contacts/SearchContactQueryHandler.cs b/MangoAPI.BusinessLogic/ApiQueries/Contacts/SearchContactQueryHandler.cs index a5acfec76..717784332 100644 --- a/MangoAPI.BusinessLogic/ApiQueries/Contacts/SearchContactQueryHandler.cs +++ b/MangoAPI.BusinessLogic/ApiQueries/Contacts/SearchContactQueryHandler.cs @@ -42,7 +42,7 @@ public async Task> Handle( DisplayName = x.DisplayName, Address = x.UserInformation.Address, Bio = x.Bio, - PictureUrl = $"{blobServiceSettings.MangoBlobAccess}/{x.Image}", + PictureUrl = $"{blobServiceSettings.MangoBlobAccess}/{x.ImageFileName}", Username = x.Username, }); diff --git a/MangoAPI.BusinessLogic/ApiQueries/Messages/GetMessagesQueryHandler.cs b/MangoAPI.BusinessLogic/ApiQueries/Messages/GetMessagesQueryHandler.cs index ff248399c..1b0984bc9 100644 --- a/MangoAPI.BusinessLogic/ApiQueries/Messages/GetMessagesQueryHandler.cs +++ b/MangoAPI.BusinessLogic/ApiQueries/Messages/GetMessagesQueryHandler.cs @@ -38,17 +38,17 @@ public async Task> Handle(GetMessagesQuery request, MessageId = messageEntity.Id, ChatId = messageEntity.ChatId, UserId = messageEntity.UserId, - MessageText = messageEntity.Content, + MessageText = messageEntity.Text, UpdatedAt = messageEntity.UpdatedAt, CreatedAt = messageEntity.CreatedAt, UserDisplayName = messageEntity.User.DisplayName, UserDisplayNameColour = messageEntity.User.DisplayNameColour, Self = messageEntity.User.Id == request.UserId, - InReplayToAuthor = messageEntity.InReplayToAuthor, - InReplayToText = messageEntity.InReplayToText, + InReplyToUser = messageEntity.InReplyToUser, + InReplyToText = messageEntity.InReplyToText, - MessageAuthorPictureUrl = messageEntity.User.Image != null - ? $"{blobServiceSettings.MangoBlobAccess}/{messageEntity.User.Image}" + MessageAuthorPictureUrl = messageEntity.User.ImageFileName != null + ? $"{blobServiceSettings.MangoBlobAccess}/{messageEntity.User.ImageFileName}" : null, MessageAttachmentUrl = messageEntity.AttachmentFileName != null diff --git a/MangoAPI.BusinessLogic/ApiQueries/Messages/SearchChatMessageQueryHandler.cs b/MangoAPI.BusinessLogic/ApiQueries/Messages/SearchChatMessageQueryHandler.cs index 2a775557e..171eba2fb 100644 --- a/MangoAPI.BusinessLogic/ApiQueries/Messages/SearchChatMessageQueryHandler.cs +++ b/MangoAPI.BusinessLogic/ApiQueries/Messages/SearchChatMessageQueryHandler.cs @@ -47,7 +47,7 @@ public async Task> Handle( var query = dbContext.Messages.AsNoTracking() .Where(x => x.ChatId == request.ChatId) - .Where(x => EF.Functions.Like(x.Content, $"%{request.MessageText}%")) + .Where(x => EF.Functions.Like(x.Text, $"%{request.MessageText}%")) .OrderBy(x => x.CreatedAt) .Select(x => new Message { @@ -56,15 +56,15 @@ public async Task> Handle( UserId = x.UserId, UserDisplayName = x.User.DisplayName, UserDisplayNameColour = x.User.DisplayNameColour, - MessageText = x.Content, + MessageText = x.Text, CreatedAt = x.CreatedAt, UpdatedAt = x.UpdatedAt, Self = x.User.Id == request.UserId, - InReplayToAuthor = x.InReplayToAuthor, - InReplayToText = x.InReplayToText, + InReplyToUser = x.InReplyToUser, + InReplyToText = x.InReplyToText, - MessageAuthorPictureUrl = x.User.Image != null - ? $"{blobServiceSettings.MangoBlobAccess}/{x.User.Image}" + MessageAuthorPictureUrl = x.User.ImageFileName != null + ? $"{blobServiceSettings.MangoBlobAccess}/{x.User.ImageFileName}" : null, MessageAttachmentUrl = x.AttachmentFileName != null diff --git a/MangoAPI.BusinessLogic/ApiQueries/Users/GetUserQueryHandler.cs b/MangoAPI.BusinessLogic/ApiQueries/Users/GetUserQueryHandler.cs index b2829c0dc..42afd7e62 100644 --- a/MangoAPI.BusinessLogic/ApiQueries/Users/GetUserQueryHandler.cs +++ b/MangoAPI.BusinessLogic/ApiQueries/Users/GetUserQueryHandler.cs @@ -50,8 +50,7 @@ public async Task> Handle( LinkedIn = user.UserInformation.LinkedIn, Username = user.Username, Bio = user.Bio, - UserNameChanged = user.UserNameChanged, - PictureUrl = $"{blobServiceSettings.MangoBlobAccess}/{user.Image}", + PictureUrl = $"{blobServiceSettings.MangoBlobAccess}/{user.ImageFileName}", }).FirstOrDefaultAsync(x => x.UserId == request.UserId, cancellationToken); if (user is null) diff --git a/MangoAPI.BusinessLogic/Models/Message.cs b/MangoAPI.BusinessLogic/Models/Message.cs index ee3c41c76..c94758231 100644 --- a/MangoAPI.BusinessLogic/Models/Message.cs +++ b/MangoAPI.BusinessLogic/Models/Message.cs @@ -37,9 +37,9 @@ public record Message [DefaultValue("https://localhost:5001/Uploads/message_attachment.pdf")] public string MessageAttachmentUrl { get; init; } - [DefaultValue("John Doe")] public string InReplayToAuthor { get; init; } + [DefaultValue("John Doe")] public string InReplyToUser { get; init; } - [DefaultValue("Hello world!")] public string InReplayToText { get; init; } + [DefaultValue("Hello world!")] public string InReplyToText { get; init; } } public static class MessageMapper @@ -59,12 +59,12 @@ public static Message ToMessage( ChatId = message.ChatId, UserDisplayName = displayName, UserDisplayNameColour = displayNameColour, - MessageText = message.Content, + MessageText = message.Text, CreatedAt = message.CreatedAt, UpdatedAt = message.UpdatedAt, Self = message.UserId == userId, - InReplayToAuthor = message.InReplayToAuthor, - InReplayToText = message.InReplayToText, + InReplyToUser = message.InReplyToUser, + InReplyToText = message.InReplyToText, MessageAuthorPictureUrl = authorPictureUrl, MessageAttachmentUrl = attachmentUrl }; diff --git a/MangoAPI.BusinessLogic/Models/User.cs b/MangoAPI.BusinessLogic/Models/User.cs index ca3674275..a929c560e 100644 --- a/MangoAPI.BusinessLogic/Models/User.cs +++ b/MangoAPI.BusinessLogic/Models/User.cs @@ -30,9 +30,6 @@ public record User [DefaultValue("User of the Mango messenger")] public string Bio { get; init; } - [DefaultValue(false)] - public bool UserNameChanged { get; init; } - [DefaultValue("Kyiv, Ukraine")] public string Address { get; init; } diff --git a/MangoAPI.Client/src/app/components/chats/chats.component.html b/MangoAPI.Client/src/app/components/chats/chats.component.html index 9cb6ff58d..4e967624a 100644 --- a/MangoAPI.Client/src/app/components/chats/chats.component.html +++ b/MangoAPI.Client/src/app/components/chats/chats.component.html @@ -224,9 +224,9 @@
Chats
/>
-
-

{{ message.inReplayToAuthor }}

-

{{ message.inReplayToText }}

+
+

{{ message.inReplyToUser }}

+

{{ message.inReplyToText }}

Chats > {{ message.userDisplayName }}
-
+

- {{ message.inReplayToAuthor }} + {{ message.inReplyToUser }}

-

{{ message.inReplayToText }}

+

{{ message.inReplyToText }}

- -
-
- User Avatar -
-

{{ activeUser.displayName }}

-

{{ activeUser.bio }}

-
-
- - + + + + +
+
+
+ User Avatar +
+

{{ activeUser.displayName }}

+

{{ activeUser.bio }}

+
+
+ + - -
+
+
- + - -
+ + diff --git a/MangoAPI.Client/src/app/components/contacts/contacts.component.ts b/MangoAPI.Client/src/app/components/contacts/contacts.component.ts index 6e8966a0c..2dd7c276c 100644 --- a/MangoAPI.Client/src/app/components/contacts/contacts.component.ts +++ b/MangoAPI.Client/src/app/components/contacts/contacts.component.ts @@ -1,4 +1,4 @@ -import { RoutingConstants } from './../../types/constants/RoutingConstants'; +import { RoutingConstants } from '../../types/constants/RoutingConstants'; import { Component, OnDestroy, OnInit } from '@angular/core'; import { ContactsService } from '../../services/api/contacts.service'; import { ErrorNotificationService } from '../../services/messenger/error-notification.service'; @@ -26,7 +26,7 @@ export class ContactsComponent implements OnInit, OnDestroy { private _communitiesService: CommunitiesService, private _router: Router, private _routingService: RoutingService, - public _modalWindowStateService: ModalWindowStateService, + public _modalWindowStateService: ModalWindowStateService ) {} public contacts: Contact[] = []; @@ -39,7 +39,6 @@ export class ContactsComponent implements OnInit, OnDestroy { website: '', username: '', bio: '', - userNameChanged: false, address: '', facebook: '', twitter: '', @@ -91,13 +90,13 @@ export class ContactsComponent implements OnInit, OnDestroy { } onOpenAvatarClick(): void { - this._modalWindowStateService.setIsModalWindowShowing(true) - this._modalWindowStateService.setPicture(this.activeUser.pictureUrl) + this._modalWindowStateService.setIsModalWindowShowing(true); + this._modalWindowStateService.setPicture(this.activeUser.pictureUrl); } closeModalWindowrClick(): void { - this._modalWindowStateService.setIsModalWindowShowing(false) - this._modalWindowStateService.setPictureNull() + this._modalWindowStateService.setIsModalWindowShowing(false); + this._modalWindowStateService.setPictureNull(); } getUsersContacts(): void { diff --git a/MangoAPI.Client/src/app/components/settings/settings.component.html b/MangoAPI.Client/src/app/components/settings/settings.component.html index 0ee352901..7596c51c5 100644 --- a/MangoAPI.Client/src/app/components/settings/settings.component.html +++ b/MangoAPI.Client/src/app/components/settings/settings.component.html @@ -40,35 +40,35 @@
Profile

Birthdate

{{ currentUser.birthdayDate | date }}

- Calendar Icon + Calendar Icon
  • - Mail Icon + Mail Icon
  • -
  • +
  • Username

    {{ currentUser.username }}

    - Mail Icon + Mail Icon
  • Website

    {{ currentUser.website }}

    - World Icon + World Icon
  • Address

    {{ currentUser.address }}

    - Home Icon + Home Icon
  • - Facebook Icon + Facebook Icon
  • - Twitter Icon + Twitter Icon
  • - Instagram Icon + Instagram Icon
  • - LinkedIn Icon + LinkedIn Icon
  • Api Version

    {{ apiVersion }}

    - Api Icon + Api Icon
  • @@ -311,7 +311,7 @@
    Avatar
    Update profile picture
    - +
    Calendar Icon -
  • - - Mail Icon -
  • + + + + + + +
  • Username

    diff --git a/MangoAPI.Client/src/app/components/contacts/contacts.component.ts b/MangoAPI.Client/src/app/components/contacts/contacts.component.ts index 2dd7c276c..32dcefb93 100644 --- a/MangoAPI.Client/src/app/components/contacts/contacts.component.ts +++ b/MangoAPI.Client/src/app/components/contacts/contacts.component.ts @@ -35,7 +35,6 @@ export class ContactsComponent implements OnInit, OnDestroy { displayName: '', displayNameColour: 0, birthdayDate: '', - email: '', website: '', username: '', bio: '', @@ -199,7 +198,7 @@ export class ContactsComponent implements OnInit, OnDestroy { chatId: response.chatId }; this._routingService.setQueryData(queryObject); - this._router.navigateByUrl('app?methodName=chats').then((r) => r); + this._router.navigateByUrl('chats').then((r) => r); }, error: (error) => { this._errorNotificationService.notifyOnError(error); diff --git a/MangoAPI.Client/src/app/components/create-group/create-group.component.html b/MangoAPI.Client/src/app/components/create-group/create-group.component.html index af1c67279..bb4e6c46c 100644 --- a/MangoAPI.Client/src/app/components/create-group/create-group.component.html +++ b/MangoAPI.Client/src/app/components/create-group/create-group.component.html @@ -19,9 +19,10 @@

    Create group

    placeholder="Enter group description" type="text" [(ngModel)]="chatDescription" + (keydown.enter)="onCreateGroupClick()" /> -
    Calendar Icon
  • -
  • - - Mail Icon -
  • + + + + + + +
  • Username

    @@ -59,7 +59,7 @@
    Profile
  • Website

    -

    {{ currentUser.website }}

    +

    {{ currentUser.website }}

    World Icon
  • @@ -75,28 +75,28 @@
    Profile
  • Facebook Icon
  • Twitter Icon
  • Instagram Icon
  • LinkedIn Icon
  • diff --git a/MangoAPI.Client/src/app/components/settings/settings.component.ts b/MangoAPI.Client/src/app/components/settings/settings.component.ts index 71bda6cba..38d93c105 100644 --- a/MangoAPI.Client/src/app/components/settings/settings.component.ts +++ b/MangoAPI.Client/src/app/components/settings/settings.component.ts @@ -38,7 +38,6 @@ export class SettingsComponent implements OnInit, OnDestroy { displayName: '', displayNameColour: 0, birthdayDate: '', - email: '', website: '', username: '', bio: '', @@ -56,7 +55,6 @@ export class SettingsComponent implements OnInit, OnDestroy { displayName: '', displayNameColour: 0, birthdayDate: '', - email: '', website: '', username: '', bio: '', @@ -204,6 +202,12 @@ export class SettingsComponent implements OnInit, OnDestroy { const result = await firstValueFrom(updateProfileImage$); alert(result.message); this.currentUser.pictureUrl = result.newUserPictureUrl; + const tokens = this._tokensService.getTokens(); + + if (tokens?.userProfilePictureUrl) { + tokens.userProfilePictureUrl = result.newUserPictureUrl; + this._tokensService.setTokens(tokens); + } } catch (e: any) { alert(e.error.errorMessage); } @@ -249,10 +253,10 @@ export class SettingsComponent implements OnInit, OnDestroy { onSaveChangesSocialsClick(): void { const command: UpdateUserSocialsCommand = { - instagram: this.currentUser.instagram, - facebook: this.currentUser.facebook, - twitter: this.currentUser.twitter, - linkedIn: this.currentUser.linkedIn + facebook: this.currentUserForUpdating.facebook, + twitter: this.currentUserForUpdating.twitter, + instagram: this.currentUserForUpdating.instagram, + linkedIn: this.currentUserForUpdating.linkedIn }; this._usersService diff --git a/MangoAPI.Client/src/app/types/models/User.ts b/MangoAPI.Client/src/app/types/models/User.ts index 908bf5151..c0296e8ae 100644 --- a/MangoAPI.Client/src/app/types/models/User.ts +++ b/MangoAPI.Client/src/app/types/models/User.ts @@ -5,7 +5,6 @@ export interface User { displayName: string; displayNameColour: DisplayNameColours; birthdayDate: string; - email: string; website: string; username: string; bio: string; diff --git a/MangoAPI.Client/src/app/types/requests/LoginCommand.ts b/MangoAPI.Client/src/app/types/requests/LoginCommand.ts index c855480c1..5c9c593a7 100644 --- a/MangoAPI.Client/src/app/types/requests/LoginCommand.ts +++ b/MangoAPI.Client/src/app/types/requests/LoginCommand.ts @@ -1,9 +1,9 @@ export class LoginCommand { - email: string; + username: string; password: string; constructor(email: string, password: string) { - this.email = email; + this.username = email; this.password = password; } } diff --git a/MangoAPI.Client/src/app/types/requests/RegisterCommand.ts b/MangoAPI.Client/src/app/types/requests/RegisterCommand.ts index 4a3a0f686..316eae35a 100644 --- a/MangoAPI.Client/src/app/types/requests/RegisterCommand.ts +++ b/MangoAPI.Client/src/app/types/requests/RegisterCommand.ts @@ -1,11 +1,9 @@ export class RegisterCommand { - email: string; - displayName: string; + username: string; password: string; - constructor(email: string, displayName: string, password: string) { - this.email = email; - this.displayName = displayName; + constructor(username: string, password: string) { + this.username = username; this.password = password; } } diff --git a/MangoAPI.Domain/Constants/ResponseMessageCodes.cs b/MangoAPI.Domain/Constants/ResponseMessageCodes.cs index 07dc699b9..bb2fad7eb 100644 --- a/MangoAPI.Domain/Constants/ResponseMessageCodes.cs +++ b/MangoAPI.Domain/Constants/ResponseMessageCodes.cs @@ -23,7 +23,6 @@ public static class ResponseMessageCodes public const string MaximumOwnerChatsExceeded100 = "MAXIMUM_OWNER_CHATS_EXCEEDED_100"; public const string InvalidRequestModel = "INVALID_REQUEST_FORMAT"; public const string KeyExchangeRequestNotFound = "KEY_EXCHANGE_REQUEST_NOT_FOUND"; - public const string UploadedDocumentsLimitReached10 = "UPLOADED_DOCUMENTS_LIMIT_REACHED"; public const string MessageNotFound = "MESSAGE_NOT_FOUND"; public const string DhParameterNotFound = "DH_PARAMETER_NOT_FOUND"; public const string TokensNotFound = "TOKENS_NOT_FOUND"; @@ -34,7 +33,7 @@ public static class ResponseMessageCodes { { InvalidOrExpiredRefreshToken, "Your refresh token is invalid or expired." }, { UserAlreadyExists, "User already exists in the system." }, - { InvalidCredentials, "Invalid credentials. Please, enter valid email and password." }, + { InvalidCredentials, "Invalid credentials. Please, enter valid username and password." }, { UserNotFound, "User not found in the system." }, { PermissionDenied, "You are not authorized to perform this action." }, { ChatNotFound, "Cannot found this chat it the system." }, @@ -49,10 +48,6 @@ public static class ResponseMessageCodes KeyExchangeRequestNotFound, "Key exchange request not found. Either request is not submitted yet or declined." }, - { - UploadedDocumentsLimitReached10, - "You have reached maximum amount of documents upload 10. Try again in 1 hour." - }, { MessageNotFound, "Message doesn't found in the system" }, { DhParameterNotFound, "Diffie-Hellman parameter is not initialized. Please initialize first." }, { TokensNotFound, "Tokens not found. Please login to the system first." }, From 5bbae46274070045fb56e6bc7fe5e8ac0158e282 Mon Sep 17 00:00:00 2001 From: kolosovpetro Date: Mon, 13 Mar 2023 00:52:38 +0100 Subject: [PATCH 15/71] minor cleanups --- .../ApiCommands/Messages/DeleteMessageCommandHandler.cs | 5 ----- MangoAPI.Domain/Constants/GreetingsConstants.cs | 4 +++- MangoAPI.Domain/Constants/HttpAuthHeaderNames.cs | 6 ------ MangoAPI.Domain/Constants/HttpAuthSchemes.cs | 6 ------ 4 files changed, 3 insertions(+), 18 deletions(-) delete mode 100644 MangoAPI.Domain/Constants/HttpAuthHeaderNames.cs delete mode 100644 MangoAPI.Domain/Constants/HttpAuthSchemes.cs diff --git a/MangoAPI.BusinessLogic/ApiCommands/Messages/DeleteMessageCommandHandler.cs b/MangoAPI.BusinessLogic/ApiCommands/Messages/DeleteMessageCommandHandler.cs index 4a6b58c80..5ba043c6a 100644 --- a/MangoAPI.BusinessLogic/ApiCommands/Messages/DeleteMessageCommandHandler.cs +++ b/MangoAPI.BusinessLogic/ApiCommands/Messages/DeleteMessageCommandHandler.cs @@ -88,11 +88,6 @@ public async Task> Handle( messageDeleteNotification.NewLastMessageText = newLastMessage?.Text; messageDeleteNotification.NewLastMessageTime = newLastMessage?.CreatedAt; - // chat.LastMessageAuthor = newLastMessage?.User?.DisplayName; - // chat.LastMessageId = newLastMessage?.Id; - // chat.LastMessageText = newLastMessage?.Content; - // chat.LastMessageTime = newLastMessage?.CreatedAt; - chat.UpdateLastMessage( lastMessageAuthor: newLastMessage?.User?.DisplayName, lastMessageText: newLastMessage?.Text, diff --git a/MangoAPI.Domain/Constants/GreetingsConstants.cs b/MangoAPI.Domain/Constants/GreetingsConstants.cs index 57cb0f678..a0a6964b2 100644 --- a/MangoAPI.Domain/Constants/GreetingsConstants.cs +++ b/MangoAPI.Domain/Constants/GreetingsConstants.cs @@ -2,7 +2,9 @@ public static class GreetingsConstants { - public const string Hello = "Greetings, new user! I'm glad you decided to join our messenger. Here you will be able to communicate with your friends and family and receive interesting information. I hope you will have a lot of fun using our messenger. You are welcome!"; + public const string Hello = "Greetings, new user! I'm glad you decided to join our messenger. " + + "Here you will be able to communicate with your friends and family and receive interesting information. " + + "I hope you will have a lot of fun using our messenger. You are welcome!"; public const string Guide = "How to use the messenger: https://www.youtube.com/watch?v=3lh3we1DrEY"; } \ No newline at end of file diff --git a/MangoAPI.Domain/Constants/HttpAuthHeaderNames.cs b/MangoAPI.Domain/Constants/HttpAuthHeaderNames.cs deleted file mode 100644 index cbf956258..000000000 --- a/MangoAPI.Domain/Constants/HttpAuthHeaderNames.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace MangoAPI.Domain.Constants; - -public static class HttpAuthHeaderNames -{ - public const string Api = "api"; -} \ No newline at end of file diff --git a/MangoAPI.Domain/Constants/HttpAuthSchemes.cs b/MangoAPI.Domain/Constants/HttpAuthSchemes.cs deleted file mode 100644 index c5bf51b8e..000000000 --- a/MangoAPI.Domain/Constants/HttpAuthSchemes.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace MangoAPI.Domain.Constants; - -public static class HttpAuthSchemes -{ - public const string Basic = "Basic"; -} From dda1704567c3ab257aeea255eac1b30b61f0a1cc Mon Sep 17 00:00:00 2001 From: kolosovpetro Date: Mon, 13 Mar 2023 01:01:14 +0100 Subject: [PATCH 16/71] minor clean ups --- MangoAPI.Application/Services/CorrelationContext.cs | 2 +- MangoAPI.Domain/Entities/RoleEntity.cs | 8 -------- MangoAPI.Domain/MangoAPI.Domain.csproj | 1 - MangoAPI.Infrastructure/MangoAPI.Infrastructure.csproj | 1 - 4 files changed, 1 insertion(+), 11 deletions(-) delete mode 100644 MangoAPI.Domain/Entities/RoleEntity.cs diff --git a/MangoAPI.Application/Services/CorrelationContext.cs b/MangoAPI.Application/Services/CorrelationContext.cs index 989cc4505..fde5212bd 100644 --- a/MangoAPI.Application/Services/CorrelationContext.cs +++ b/MangoAPI.Application/Services/CorrelationContext.cs @@ -19,7 +19,7 @@ public Guid GetUserId() { var context = httpContextAccessor.HttpContext; - var correlationContextUserId = context.User.FindFirstValue(JwtRegisteredClaimNames.Jti); + var correlationContextUserId = context?.User.FindFirstValue(JwtRegisteredClaimNames.Jti); var parsed = Guid.TryParse(correlationContextUserId, out var parsedUserId); diff --git a/MangoAPI.Domain/Entities/RoleEntity.cs b/MangoAPI.Domain/Entities/RoleEntity.cs deleted file mode 100644 index 7fb52c8fe..000000000 --- a/MangoAPI.Domain/Entities/RoleEntity.cs +++ /dev/null @@ -1,8 +0,0 @@ -using System; -using Microsoft.AspNetCore.Identity; - -namespace MangoAPI.Domain.Entities; - -public class RoleEntity : IdentityRole -{ -} \ No newline at end of file diff --git a/MangoAPI.Domain/MangoAPI.Domain.csproj b/MangoAPI.Domain/MangoAPI.Domain.csproj index 4c52f7c16..4068e8142 100644 --- a/MangoAPI.Domain/MangoAPI.Domain.csproj +++ b/MangoAPI.Domain/MangoAPI.Domain.csproj @@ -24,7 +24,6 @@ -
    diff --git a/MangoAPI.Infrastructure/MangoAPI.Infrastructure.csproj b/MangoAPI.Infrastructure/MangoAPI.Infrastructure.csproj index ec961ea14..ccc374567 100644 --- a/MangoAPI.Infrastructure/MangoAPI.Infrastructure.csproj +++ b/MangoAPI.Infrastructure/MangoAPI.Infrastructure.csproj @@ -22,7 +22,6 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive
    - From c641cd683f69ff8796691c43fe3425f22cffffc3 Mon Sep 17 00:00:00 2001 From: kolosovpetro Date: Mon, 13 Mar 2023 10:30:15 +0100 Subject: [PATCH 17/71] work in progress --- .../Sessions/RefreshSessionCommandHandler.cs | 18 +-------------- MangoAPI.BusinessLogic/Models/Contact.cs | 2 +- MangoAPI.BusinessLogic/Models/Message.cs | 4 ++-- MangoAPI.BusinessLogic/Models/User.cs | 2 +- .../create-group/create-group.component.html | 1 + .../app/components/login/login.component.html | 6 ++--- .../components/navbar/navbar.component.html | 6 +++-- .../register/register.component.html | 7 +++--- .../settings/settings.component.html | 21 ++++++++--------- .../src/app/types/requests/LoginCommand.ts | 4 ++-- .../Constants/SeedDataConstants.cs | 23 ------------------- 11 files changed, 28 insertions(+), 66 deletions(-) diff --git a/MangoAPI.BusinessLogic/ApiCommands/Sessions/RefreshSessionCommandHandler.cs b/MangoAPI.BusinessLogic/ApiCommands/Sessions/RefreshSessionCommandHandler.cs index 05d344d4b..9a4898911 100644 --- a/MangoAPI.BusinessLogic/ApiCommands/Sessions/RefreshSessionCommandHandler.cs +++ b/MangoAPI.BusinessLogic/ApiCommands/Sessions/RefreshSessionCommandHandler.cs @@ -1,5 +1,4 @@ using System; -using System.Linq; using System.Threading; using System.Threading.Tasks; using MangoAPI.Application.Interfaces; @@ -44,7 +43,7 @@ public async Task> Handle( entity => entity.Id == request.RefreshToken, cancellationToken); - if (session is null || session.IsExpired) + if (session == null || session.IsExpired) { const string errorMessage = ResponseMessageCodes.InvalidOrExpiredRefreshToken; var details = ResponseMessageCodes.ErrorDictionary[errorMessage]; @@ -52,21 +51,6 @@ public async Task> Handle( return responseFactory.ConflictResponse(errorMessage, details); } - var userSessions = dbContext.Sessions - .Where(x => x.UserId == session.UserId); - - var userSessionCount = await userSessions.CountAsync(cancellationToken); - - switch (userSessionCount) - { - case >= 5: - dbContext.Sessions.RemoveRange(userSessions); - break; - default: - dbContext.Sessions.Remove(session); - break; - } - var newSession = new SessionEntity { Id = Guid.NewGuid(), diff --git a/MangoAPI.BusinessLogic/Models/Contact.cs b/MangoAPI.BusinessLogic/Models/Contact.cs index 13bbf7a4a..23fdad253 100644 --- a/MangoAPI.BusinessLogic/Models/Contact.cs +++ b/MangoAPI.BusinessLogic/Models/Contact.cs @@ -20,7 +20,7 @@ public record Contact [DefaultValue(true)] public bool IsContact { get; set; } - [DefaultValue("Uploads/razumovsky_picture.jpg")] + [DefaultValue("http://127.0.0.1:10000/devstoreaccount1/mangocontainer/animetyanpic8.jpg")] public string PictureUrl { get; init; } [DefaultValue("MyUniqueUsername")] diff --git a/MangoAPI.BusinessLogic/Models/Message.cs b/MangoAPI.BusinessLogic/Models/Message.cs index c94758231..b150ee931 100644 --- a/MangoAPI.BusinessLogic/Models/Message.cs +++ b/MangoAPI.BusinessLogic/Models/Message.cs @@ -31,10 +31,10 @@ public record Message [DefaultValue(false)] public bool Self { get; init; } - [DefaultValue("https://localhost:5001/Uploads/amelit_picture.jpg")] + [DefaultValue("http://127.0.0.1:10000/devstoreaccount1/mangocontainer/animetyanpic8.jpg")] public string MessageAuthorPictureUrl { get; init; } - [DefaultValue("https://localhost:5001/Uploads/message_attachment.pdf")] + [DefaultValue("http://127.0.0.1:10000/devstoreaccount1/mangocontainer/message_attachment.pdf")] public string MessageAttachmentUrl { get; init; } [DefaultValue("John Doe")] public string InReplyToUser { get; init; } diff --git a/MangoAPI.BusinessLogic/Models/User.cs b/MangoAPI.BusinessLogic/Models/User.cs index a929c560e..2301c7614 100644 --- a/MangoAPI.BusinessLogic/Models/User.cs +++ b/MangoAPI.BusinessLogic/Models/User.cs @@ -45,6 +45,6 @@ public record User [DefaultValue("ivan.ivanov")] public string LinkedIn { get; init; } - [DefaultValue("Uploads/ivan-ivanov.jpg")] + [DefaultValue("http://127.0.0.1:10000/devstoreaccount1/mangocontainer/ivan-ivanov.jpg")] public string PictureUrl { get; init; } } \ No newline at end of file diff --git a/MangoAPI.Client/src/app/components/create-group/create-group.component.html b/MangoAPI.Client/src/app/components/create-group/create-group.component.html index bb4e6c46c..4c5b54b10 100644 --- a/MangoAPI.Client/src/app/components/create-group/create-group.component.html +++ b/MangoAPI.Client/src/app/components/create-group/create-group.component.html @@ -9,6 +9,7 @@

    Create group

    placeholder="Enter group title" type="text" [(ngModel)]="chatTitle" + (keydown.enter)="onCreateGroupClick()" /> diff --git a/MangoAPI.Client/src/app/components/login/login.component.html b/MangoAPI.Client/src/app/components/login/login.component.html index 8b7a215af..6cfbfbf67 100644 --- a/MangoAPI.Client/src/app/components/login/login.component.html +++ b/MangoAPI.Client/src/app/components/login/login.component.html @@ -3,11 +3,11 @@

    Login

    We are Different, We Make You Different.

    - +