Api/Netina.Domain/Entities/Comments/Comment.Aggregate.cs

18 lines
429 B
C#

namespace Netina.Domain.Entities.Comments;
public partial class Comment
{
public static Comment Create(string title, string content, float rate,bool isAdmin, Guid userId)
{
return new Comment(title, content, rate,isAdmin, userId);
}
public void ConfirmReview()
=> IsConfirmed = true;
public void SetParent(Guid parentId)
{
ParentId = parentId;
IsRoot = false;
}
}