Documentation ¶
Index ¶
- type Comment
- func (c Comment) Create(commentUid, articleId, content string, parentId int) error
- func (c Comment) Delete(comment *Comment) (err error)
- func (c Comment) GetCommentByID(id int64) (*Comment, error)
- func (c Comment) GetComments(articleId string) (comments []*Comment, err error)
- func (c Comment) UpdateComment(comment *Comment) (err error)
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Comment ¶
type Comment struct { gorm.Model Content string `json:"content" form:"content"` ArticleId string `json:"article_id" form:"article_id"` CommentUid string `json:"comment_uid" form:"comment_uid"` ParentId int `json:"parent_id" form:"parent_id"` IsTop int `json:"is_top" form:"is_top"` Status int `json:"status" form:"status"` }
Comment 留言
func (Comment) GetCommentByID ¶
GetCommentByID Get one comment by primary key
func (Comment) GetComments ¶
GetComments Search comment by article_id
func (Comment) UpdateComment ¶
Update update comment
Click to show internal directories.
Click to hide internal directories.