21 lines
1.1 KiB
Go
21 lines
1.1 KiB
Go
package models
|
|
|
|
import "git.apinb.com/bsm-sdk/core/types"
|
|
|
|
// feed评论表
|
|
type FeedComment struct {
|
|
types.Std_IICUDS
|
|
types.Std_Passport
|
|
PostIdentity string `gorm:"column:post_identity;type:varchar(36);index;" json:"post_identity"` // 推文唯一码
|
|
ParentIdentity string `gorm:"column:parent_identity;type:varchar(36);index;" json:"parent_identity"` // 上级评论唯一码
|
|
Content string `gorm:"column:content;type:text;default:'';" json:"content"` // 正文
|
|
SubComment []FeedComment `gorm:"foreignkey:parent_identity;"` // 子评论唯一码
|
|
CntLike int64 `gorm:"column:cnt_like;type:int;default:0" json:"cnt_like"` // 点赞数
|
|
CntUnlike int64 `gorm:"column:cnt_unlike;type:int;default:0" json:"cnt_unlike"` // 点踩数
|
|
CntComment int64 `gorm:"column:cnt_comment;type:int;default:0" json:"cnt_comment"` // 评论数
|
|
}
|
|
|
|
func (table *FeedComment) TableName() string {
|
|
return "feed_comment"
|
|
}
|