Documentation
¶
Index ¶
Constants ¶
View Source
const FirstCommentsNumber = 3
FirstCommentsNumber 直接记录在Comment中的子评论个数
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Comment ¶
type Comment struct {
Id int64
VideoId int64
UserId int64
ParentId *int64
ToUserId *int64
Content string
Date string
CreateTime time.Time
Comments []*Comment // 子评论
ChildNumbers int64 // 子评论个数
FirstComments []*Comment // 最初的x条子评论
}
func NewWithModel ¶
func (*Comment) AddFirstChildComments ¶
func (*Comment) GetChildCommentProto ¶
type Option ¶
type Option func(*Comment)
func WithContent ¶
func WithParentId ¶
func WithToUserId ¶
func WithUserId ¶
func WithVideoId ¶
Click to show internal directories.
Click to hide internal directories.