-
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.
- Loading branch information
1 parent
0770741
commit b27b491
Showing
31 changed files
with
797 additions
and
624 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
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,12 +1,28 @@ | ||
namespace VNH.Application.DTOs.Catalog.Posts | ||
using Microsoft.EntityFrameworkCore.Metadata.Internal; | ||
using System.ComponentModel.DataAnnotations.Schema; | ||
using VNH.Application.DTOs.Catalog.Users; | ||
|
||
namespace VNH.Application.DTOs.Catalog.Posts | ||
{ | ||
public class CommentPostDto | ||
{ | ||
public Guid Id { get; set; } = Guid.NewGuid(); | ||
public Guid? UserId { get; set; } | ||
public string PostId { get; set; } = String.Empty; | ||
public Guid UserId { get; set; } | ||
public UserShortDto? UserShort { get; set; } | ||
public string Content { get; set; } = String.Empty; | ||
public DateTime CreatedAt { get; set; } | ||
public DateTime? UpdatedAt { get; set; } | ||
public List<SubCommentDto>? SubComment { get; set; } | ||
} | ||
public class SubCommentDto | ||
{ | ||
public Guid Id { get; set; } | ||
public string? Content { get; set; } | ||
[Column(TypeName = "datetime")] | ||
public DateTime? CreatedAt { get; set; } | ||
[Column(TypeName = "datetime")] | ||
public DateTime? UpdatedAt { get; set; } | ||
public UserShortDto? UserShort { 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
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,15 @@ | ||
using AutoMapper; | ||
using VNH.Application.DTOs.Catalog.Posts; | ||
using VNH.Domain; | ||
|
||
namespace VNH.Application.Mappers | ||
{ | ||
public class CommentMapper : Profile | ||
{ | ||
public CommentMapper() { | ||
CreateMap<PostComment, CommentPostDto>().ReverseMap(); | ||
CreateMap<PostSubComment, SubCommentDto>().ReverseMap(); | ||
} | ||
|
||
} | ||
} |
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.