-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor/cct-28-Refactor code migration (#15)
Co-authored-by: PNB309 <nguyen.phucbinh445@gmail.com>
- Loading branch information
1 parent
742b318
commit f4c21aa
Showing
111 changed files
with
2,072 additions
and
754 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# top-most EditorConfig file | ||
root = true | ||
|
||
# C# files | ||
[*.cs] | ||
indent_style = space | ||
indent_size = 4 | ||
insert_final_newline = true | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
|
||
# Organize usings | ||
dotnet_sort_system_directives_first = true | ||
dotnet_separate_import_directive_groups = true | ||
|
||
# C# specific formatting rules | ||
# Use 'var' instead of explicit type when the type is apparent | ||
csharp_style_var_for_built_in_types = true:suggestion | ||
csharp_style_var_when_type_is_apparent = true:suggestion | ||
csharp_style_var_elsewhere = false:suggestion | ||
|
||
# Use expression-bodied members when possible | ||
csharp_style_expression_bodied_methods = true:suggestion | ||
csharp_style_expression_bodied_constructors = true:suggestion | ||
csharp_style_expression_bodied_operators = true:suggestion | ||
csharp_style_expression_bodied_properties = true:suggestion | ||
csharp_style_expression_bodied_indexers = true:suggestion | ||
csharp_style_expression_bodied_accessors = true:suggestion | ||
|
||
# Use pattern matching when possible | ||
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion | ||
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion | ||
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion | ||
|
||
# Prefer 'is not null' over '!= null' | ||
csharp_style_prefer_is_not_expression = true:suggestion | ||
|
||
# Prefer 'null' check over 'object' check | ||
csharp_style_prefer_null_check_over_type_check = true:suggestion | ||
|
||
# Use 'default' literal instead of 'default(T)' | ||
csharp_style_prefer_simple_default_expression = true:suggestion | ||
|
||
# Use 'nameof' instead of string literals for parameter names | ||
csharp_style_prefer_nameof_expression = true:suggestion | ||
|
||
# Use 'using' statement instead of 'using' declaration | ||
csharp_prefer_simple_using_statement = true:suggestion | ||
|
||
# Use 'readonly' modifier for fields that are only assigned in the constructor | ||
dotnet_style_readonly_field = true:suggestion | ||
|
||
# Use 'this.' prefix for instance members | ||
dotnet_style_qualification_for_field = true:suggestion | ||
dotnet_style_qualification_for_property = true:suggestion | ||
dotnet_style_qualification_for_method = true:suggestion | ||
dotnet_style_qualification_for_event = true:suggestion | ||
|
||
# Use 'private' modifier for fields | ||
dotnet_style_require_accessibility_modifiers = always:suggestion |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
global using System; | ||
global using System; | ||
global using System.Collections.Generic; | ||
global using System.Linq; | ||
global using System.Text; | ||
global using System.Threading.Tasks; | ||
global using Microsoft.EntityFrameworkCore; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using AutoMapper; | ||
using ChitChat.Application.Models.Dtos.Message; | ||
|
||
namespace ChitChat.Application.Mapping | ||
{ | ||
public class MessageProfile : Profile | ||
{ | ||
public MessageProfile() | ||
{ | ||
CreateMap<RequestSendMessageDto, Message>(); | ||
CreateMap<Message, MessageDto>(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,16 @@ | ||
using AutoMapper; | ||
using AutoMapper; | ||
using ChitChat.Application.Models.Dtos.User; | ||
using ChitChat.Domain.Identity; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace ChitChat.Application.Mapping | ||
{ | ||
public class UserProfile: Profile | ||
public class UserProfile : Profile | ||
{ | ||
public UserProfile() { | ||
public UserProfile() | ||
{ | ||
CreateMap<UserApplication, UserDto>(); | ||
CreateMap<RegisterationRequestDto, UserApplication>(); | ||
CreateMap<LoginRequestDto, UserApplication>(); | ||
|
||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
src/ChitChat.Application/Models/Dtos/Conversation/ConversationDto.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using ChitChat.Application.Models.Dtos.Message; | ||
using ChitChat.Application.Models.Dtos.User; | ||
|
||
namespace ChitChat.Application.Models.Dtos.Conversation | ||
{ | ||
public class ConversationDto | ||
{ | ||
public Guid Id { get; set; } | ||
public UserDto UserReceiver { get; set; } | ||
public MessageDto? LastMessage { get; set; } | ||
public bool IsSeen { get; set; } = false; | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
src/ChitChat.Application/Models/Dtos/Message/MessageDto.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
namespace ChitChat.Application.Models.Dtos.Message | ||
{ | ||
public class MessageDto | ||
{ | ||
Guid Id { get; set; } | ||
public string MessageText { get; set; } | ||
public DateTime CreatedOn { get; set; } | ||
public DateTime UpdateOn { get; set; } | ||
public string SenderId { get; set; } | ||
public Guid ConversationId { get; set; } | ||
public string Status { get; set; } | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
src/ChitChat.Application/Models/Dtos/Message/RequestSearchMessageDto.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
namespace ChitChat.Application.Models.Dtos.Message | ||
{ | ||
public class RequestSearchMessageDto | ||
{ | ||
public string Text { get; set; } | ||
public Guid ConversationId { get; set; } | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
src/ChitChat.Application/Models/Dtos/Message/RequestSendMessageDto.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
namespace ChitChat.Application.Models.Dtos.Message | ||
{ | ||
public class RequestSendMessageDto | ||
{ | ||
public Guid ConversationId { get; set; } | ||
public string MessageText { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 0 additions & 6 deletions
6
src/ChitChat.Application/Models/Dtos/User/LoginResponseDto.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 1 addition & 7 deletions
8
src/ChitChat.Application/Models/Dtos/User/RegisterationRequestDto.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.