erp-platform/api/src/Kurs.Platform.Domain/Entities/ForumPost.cs
2025-06-24 00:22:11 +03:00

37 lines
No EOL
1.1 KiB
C#

using System;
using System.Collections.Generic;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.MultiTenancy;
namespace Kurs.Platform.Forum;
public class ForumPost : FullAuditedEntity<Guid>
{
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<ForumPost> 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 = [];
}
}