return postdto from post create

This commit is contained in:
john 2025-05-28 20:05:00 +02:00
parent 8ad4302ec8
commit d1687f276b
15 changed files with 226 additions and 111 deletions

View file

@ -2,15 +2,14 @@ namespace Femto.Modules.Blog.Domain.Posts;
public class PostReaction
{
public Guid Id { get; private set; }
public Guid AuthorId { get; private set; }
public Guid PostId { get; private set; }
public string Emoji { get; private set; } = null!;
public int Count { get; private set; }
public PostReaction(string emoji, int count)
public PostReaction(Guid authorId, Guid postId, string emoji)
{
this.Id = Guid.CreateVersion7();
this.AuthorId = authorId;
this.PostId = postId;
this.Emoji = emoji;
this.Count = count;
}
private PostReaction() { }