CommentDao
Namespace: SlottyMedia.Database.Daos
This class represents the Comment table in the database.
public class CommentDao : Supabase.Postgrest.Models.BaseModel
Inheritance Object → BaseModel → CommentDao
Properties
CommentId
The ID of the Comment. This is the Primary Key. It is auto-generated.
public Nullable<Guid> CommentId { get; set; }
Property Value
ParentCommentId
The ID of the Parent Comment. This is only set when there is a Parent Comment.
public Nullable<Guid> ParentCommentId { get; set; }
Property Value
CreatorUserId
The ID of the User who created the Comment. This is a Foreign Key to the User Table.
public Nullable<Guid> CreatorUserId { get; set; }
Property Value
PostId
The ID of the Post the Comment is related to. This is a Foreign Key to the Post Table.
public Nullable<Guid> PostId { get; set; }
Property Value
Content
The Content of the Comment.
public string Content { get; set; }
Property Value
CreatedAt
The Date and Time the Comment was created.
public DateTimeOffset CreatedAt { get; set; }
Property Value
BaseUrl
public string BaseUrl { get; set; }
Property Value
RequestClientOptions
public ClientOptions RequestClientOptions { get; set; }
Property Value
ClientOptions
TableName
public string TableName { get; }
Property Value
PrimaryKey
public Dictionary<PrimaryKeyAttribute, object> PrimaryKey { get; }
Property Value
Dictionary<PrimaryKeyAttribute, Object>
Constructors
CommentDao()
Default constructor.
public CommentDao()
CommentDao(Guid, Guid, String, Nullable<Guid>)
This constructor is used to create a new Comment. The CommentId is auto-generated.
public CommentDao(Guid creatorUserId, Guid postId, string content, Nullable<Guid> parentCommentId)
Parameters
creatorUserId Guid
The user who created the comment
postId Guid
The postId of the comment
content String
The content of the comment
parentCommentId Nullable<Guid>
The ID of the parent comment, if any
Methods
ToString()
The ToString method is used to return a string representation of the CommentDao object.
public string ToString()