-
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.
Merge pull request #31 from LuongXuanNhat/master_check
Master check
- Loading branch information
Showing
99 changed files
with
16,022 additions
and
656 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
14 changes: 14 additions & 0 deletions
14
VNH.Application/DTOs/Catalog/Document/CreateDocumentDto.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,14 @@ | ||
using Microsoft.AspNetCore.Http; | ||
namespace VNH.Application.DTOs.Catalog.Document | ||
{ | ||
public class CreateDocumentDto | ||
{ | ||
|
||
public Guid? Id { get; set; } = Guid.NewGuid(); | ||
public string? SubId { get; set; } | ||
public string Title { get; set; } = string.Empty; | ||
public string Description { get; set; } = string.Empty; | ||
public IFormFile? FileName { 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace VNH.Application.DTOs.Catalog.Document | ||
{ | ||
public class DocumentFpkDto | ||
{ | ||
public string DocumentId { get; set; } = string.Empty; | ||
public string UserId { get; set; } = string.Empty; | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
VNH.Application/DTOs/Catalog/Document/DocumentReponseDto.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,26 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using VNH.Application.DTOs.Catalog.Users; | ||
|
||
namespace VNH.Application.DTOs.Catalog.Document | ||
{ | ||
public class DocumentReponseDto | ||
{ | ||
public Guid? Id { get; set; } | ||
public string? SubId { get; set; } | ||
public string Title { get; set; } = string.Empty; | ||
public string Description { get; set; } = string.Empty; | ||
|
||
public string FileName { get; set; } = string.Empty; | ||
|
||
public DateTime? CreatedAt { get; set; } | ||
public DateTime? UpdatedAt { get; set; } | ||
public UserShortDto UserShort { get; set; } = new UserShortDto(); | ||
public int ViewNumber { get; set; } = 0; | ||
public int DownloadNumber { get; set; } = 0; | ||
public int PageNumber { get; set; } = 0; | ||
} | ||
} |
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 System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace VNH.Application.DTOs.Catalog.Forum.Answer | ||
{ | ||
public class AnswerFpkDto | ||
{ | ||
public string AnswerId { get; set; } = string.Empty; | ||
public string UserId { get; set; } = string.Empty; | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
VNH.Application/DTOs/Catalog/Forum/Answer/AnswerQuestionDto.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,44 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.ComponentModel.DataAnnotations.Schema; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using VNH.Application.DTOs.Catalog.Users; | ||
|
||
namespace VNH.Application.DTOs.Catalog.Forum.Answer | ||
{ | ||
public class AnswerQuestionDto | ||
{ | ||
|
||
public Guid Id { get; set; } = Guid.NewGuid(); | ||
public Guid? AuthorId { get; set; } | ||
|
||
public string QuestionId { get; set; } = string.Empty; | ||
public UserShortDto? UserShort { get; set; } | ||
public string Content { get; set; } = String.Empty; | ||
public DateTime PubDate { get; set; } | ||
public DateTime? UpdateAt { get; set; } | ||
public bool Confirm { get; set; } = false; | ||
public bool MostConfirm { get; set; } = false; | ||
public List<SubAnswerQuestionDto>? SubAnswer { get; set; } | ||
|
||
} | ||
|
||
public class SubAnswerQuestionDto | ||
{ | ||
public Guid Id { get; set; } = Guid.NewGuid(); | ||
public Guid PreAnswerId { get; set; } | ||
public Guid AuthorId { get; set; } | ||
public string Content { get; set; } = string.Empty; | ||
[Column(TypeName = "datetime")] | ||
public DateTime? PubDate { get; set; } | ||
[Column(TypeName = "datetime")] | ||
public DateTime? UpdateAt { get; set; } | ||
|
||
public UserShortDto? UserShort { get; set; } | ||
|
||
|
||
} | ||
|
||
} |
40 changes: 40 additions & 0 deletions
40
VNH.Application/DTOs/Catalog/Forum/Answer/AnswerResponseDto.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,40 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.ComponentModel.DataAnnotations.Schema; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using VNH.Application.DTOs.Catalog.Users; | ||
|
||
namespace VNH.Application.DTOs.Catalog.Forum.Answer | ||
{ | ||
public class AnswerResponseDto | ||
{ | ||
|
||
public string Id { get; set; } = string.Empty; | ||
public string Content { get; set; } = string.Empty; | ||
|
||
public string QuestionId { get; set; } = string.Empty; | ||
|
||
[Column(TypeName = "datetime")] | ||
public DateTime? PubDate { get; set; } | ||
public UserShortDto UserShort { get; set; } = new UserShortDto(); | ||
public bool Confirm { get; set; } | ||
public bool MostConfirm { get; set; } | ||
public List<SubAnswerResponseDto>? SubAnserwer { get; set; } | ||
|
||
} | ||
|
||
public class SubAnswerResponseDto | ||
{ | ||
public Guid Id { get; set; } | ||
public Guid PreAnswerId { get; set; } | ||
public string Content { get; set; } = string.Empty; | ||
[Column(TypeName = "datetime")] | ||
public DateTime? PubDate { get; set; } | ||
|
||
public UserShortDto? UserShort { get; set; } | ||
|
||
} | ||
|
||
} |
30 changes: 30 additions & 0 deletions
30
VNH.Application/DTOs/Catalog/Forum/Answer/CreateAnswerDto.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,30 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using VNH.Application.DTOs.Catalog.Users; | ||
|
||
namespace VNH.Application.DTOs.Catalog.Forum.Answer | ||
{ | ||
public class CreateAnswerDto | ||
{ | ||
public Guid Id { get; set; } = Guid.NewGuid(); | ||
public Guid? AuthorId { get; set; } | ||
public string QuestionId { get; set; } = string.Empty; | ||
public string Content { get; set; } = string.Empty; | ||
|
||
} | ||
|
||
public class SubAnswerDto | ||
{ | ||
public Guid Id { get; set; } = Guid.NewGuid(); | ||
public Guid PreAnswerId { get; set; } | ||
|
||
public string Content { get; set; } = string.Empty; | ||
|
||
public Guid AuthorId { get; set; } | ||
|
||
|
||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
VNH.Application/DTOs/Catalog/Forum/Question/CreateQuestionDto.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,18 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace VNH.Application.DTOs.Catalog.Forum.Question | ||
{ | ||
public class CreateQuestionDto | ||
{ | ||
public Guid? Id { get; set; } = Guid.NewGuid(); | ||
|
||
public string? Title { get; set; } = string.Empty; | ||
public string? Content { get; set; } = string.Empty; | ||
public List<string>? Tag { get; set; } | ||
|
||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
VNH.Application/DTOs/Catalog/Forum/Question/QuestionFpkDto.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,14 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace VNH.Application.DTOs.Catalog.Forum.Question | ||
{ | ||
public class QuestionFpkDto | ||
{ | ||
public string QuestionId { get; set; } = string.Empty; | ||
public string UserId { get; set; } = string.Empty; | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
VNH.Application/DTOs/Catalog/Forum/Question/QuestionResponseDto.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,21 @@ | ||
| ||
using VNH.Application.DTOs.Catalog.HashTags; | ||
using VNH.Application.DTOs.Catalog.Users; | ||
|
||
namespace VNH.Application.DTOs.Catalog.Forum.Question | ||
{ | ||
public class QuestionResponseDto | ||
{ | ||
public string Id { get; set; } =string.Empty; | ||
public string Title { get; set; } = string.Empty; | ||
public string Content { get; set; } = string.Empty; | ||
public DateTime? CreateAt { get; set; } | ||
public DateTime? UpdateAt { get; set; } | ||
public List<TagDto> Tags { get; set; } = new List<TagDto>(); | ||
public UserShortDto UserShort { get; set; } = new UserShortDto(); | ||
public int ViewNumber { get; set; } = 0; | ||
public int CommentNumber { get; set; } = 0; | ||
public int SaveNumber { get; set; } = 0; | ||
|
||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
namespace VNH.Application.DTOs.Catalog.Posts | ||
{ | ||
public class PostFpkDto | ||
{ | ||
public string PostId { get; set; } = string.Empty; | ||
public string UserId { get; set; } = string.Empty; | ||
} | ||
} |
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
VNH.Application/Interfaces/Catalog/Chats/ICommentService.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 System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace VNH.Application.Interfaces.Catalog.Chats | ||
{ | ||
public interface ICommentService | ||
{ | ||
|
||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
VNH.Application/Interfaces/Catalog/Documents/IDocumentService.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,20 @@ | ||
using VNH.Application.DTOs.Catalog.Document; | ||
using VNH.Application.DTOs.Catalog.Posts; | ||
using VNH.Application.DTOs.Common.ResponseNotification; | ||
|
||
namespace VNH.Application.Interfaces.Documents | ||
{ | ||
public interface IDocumentService | ||
{ | ||
Task<ApiResult<DocumentReponseDto>> Create(CreateDocumentDto requestDto, string name); | ||
Task<ApiResult<DocumentReponseDto>> Update(CreateDocumentDto requestDto, string name); | ||
Task<ApiResult<DocumentReponseDto>> Detail(string Id); | ||
Task<ApiResult<List<DocumentReponseDto>>> GetAll(); | ||
Task<ApiResult<string>> Delete(string id, string email); | ||
|
||
Task<ApiResult<bool>> GetSave(DocumentFpkDto docsFpk); | ||
|
||
Task<ApiResult<int>> AddOrRemoveSaveDocs(DocumentFpkDto docsFpk); | ||
|
||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
VNH.Application/Interfaces/Catalog/Forum/IAnswerService.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,25 @@ | ||
using VNH.Application.DTOs.Catalog.Forum.Answer; | ||
using VNH.Application.DTOs.Common.ResponseNotification; | ||
using VNH.Domain; | ||
|
||
namespace VNH.Application.Interfaces.Catalog.Forum | ||
{ | ||
public interface IAnswerService | ||
{ | ||
|
||
Task<ApiResult<List<AnswerQuestionDto>>> GetAnswer(string questionId); | ||
Task<ApiResult<List<AnswerQuestionDto>>> CreateAnswer(AnswerQuestionDto answer); | ||
Task<ApiResult<List<AnswerQuestionDto>>> UpdateAnswer(AnswerQuestionDto answer); | ||
Task<ApiResult<string>> DeteleAnswer(string id); | ||
|
||
|
||
Task<ApiResult<string>> CreateSubAnswer(SubAnswerQuestionDto subAnswer); | ||
|
||
Task<ApiResult<SubAnswerQuestionDto>> UpdateSubAnswer(SubAnswerQuestionDto answer); | ||
Task<ApiResult<string>> DeteleSubAnswer(string id); | ||
|
||
Task<ApiResult<int>> ConfirmOrNoConfirm(AnswerFpkDto answerFpk); | ||
|
||
|
||
} | ||
} |
Oops, something went wrong.