using System; using System.Collections.Generic; using Volo.Abp.Domain.Entities.Auditing; using Volo.Abp.MultiTenancy; namespace Kurs.Platform.Forum; public class ForumPost : FullAuditedEntity { public Guid TopicId { get; set; } public string Content { get; set; } public Guid AuthorId { get; set; } public string AuthorName { get; set; } public int LikeCount { get; set; } public bool IsAcceptedAnswer { get; set; } public Guid? ParentPostId { get; set; } public Guid? TenantId { get; set; } public ForumTopic Topic { get; set; } public ForumPost ParentPost { get; set; } public ICollection Replies { get; set; } protected ForumPost() { } public ForumPost(Guid id, Guid topicId, string content, Guid authorId, string authorName, Guid? parentPostId = null, Guid? tenantId = null) : base(id) { TopicId = topicId; Content = content; AuthorId = authorId; AuthorName = authorName; ParentPostId = parentPostId; LikeCount = 0; IsAcceptedAnswer = false; TenantId = tenantId; Replies = []; } }