-
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.
feat: generate notification of post's tag events
- Loading branch information
1 parent
6b32ed2
commit 8b60a86
Showing
59 changed files
with
681 additions
and
351 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
17 changes: 17 additions & 0 deletions
17
Application/DTOs/Responses/Comment/PreviewCommentResponse.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,17 @@ | ||
using System; | ||
|
||
namespace InfinityNetServer.BuildingBlocks.Application.DTOs.Responses.Comment | ||
{ | ||
public sealed record PreviewCommentResponse | ||
{ | ||
|
||
public Guid Id { get; set; } | ||
|
||
public Guid ProfileId { get; set; } | ||
|
||
public Guid PostId { get; set; } | ||
|
||
public string PreviewContent { 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,15 @@ | ||
using System; | ||
|
||
namespace InfinityNetServer.BuildingBlocks.Application.DTOs.Responses.Post | ||
{ | ||
public sealed record PreviewPostResponse | ||
{ | ||
|
||
public Guid Id { get; set; } | ||
|
||
public Guid OwnerId { get; set; } | ||
|
||
public string PreviewContent { 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
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,23 @@ | ||
using AutoMapper; | ||
|
||
namespace InfinityNetServer.Services.Comment.Presentation.Mappers; | ||
|
||
public class CommentMappers : Profile | ||
{ | ||
public CommentMappers() | ||
{ | ||
|
||
CreateMap<Domain.Entities.Comment, BuildingBlocks.Application.Protos.PreviewCommentResponse>() | ||
.AfterMap((src, dest) => | ||
{ | ||
dest.PreviewContent = src.Content.Text[..50]; | ||
}); | ||
|
||
CreateMap<Domain.Entities.Comment, BuildingBlocks.Application.DTOs.Responses.Comment.PreviewCommentResponse>() | ||
.AfterMap((src, dest) => | ||
{ | ||
dest.PreviewContent = src.Content.Text[..50]; | ||
}); | ||
|
||
} | ||
} |
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,22 @@ | ||
using MongoDB.Bson; | ||
using MongoDB.Bson.Serialization.Attributes; | ||
using System; | ||
|
||
namespace InfinityNetServer.BuildingBlocks.Domain.Entities | ||
{ | ||
public abstract class MongoEntity<TId> | ||
{ | ||
|
||
[BsonId] | ||
[BsonElement("id")] | ||
[BsonRepresentation(BsonType.String)] | ||
public TId Id { get; set; } | ||
|
||
[BsonElement("created_at")] | ||
public DateTime? CreatedAt { get; set; } | ||
|
||
[BsonElement("updated_at")] | ||
public DateTime? UpdatedAt { get; set; } | ||
|
||
} | ||
} |
Oops, something went wrong.