Files
sundynix-plant-be/model/plant/community_post_comment.go
T
2026-02-06 17:28:42 +08:00

17 lines
793 B
Go

package plant
import (
"sundynix-go/global"
"sundynix-go/model/system"
)
type PostComment struct {
global.BaseModel
RootId string `json:"rootId" form:"rootId" gorm:"column:root_id;size:50;default:'0';comment:根评论id"`
ParentId string `json:"parentId" form:"parentId" gorm:"column:parent_id;size:50;comment:父级评论id"`
PostId string `json:"postId" form:"postId" gorm:"index;column:post_id;size:50;comment:帖子id"`
UserId string `json:"userId" form:"userId" gorm:"index;column:user_id;size:50;comment:用户id"`
Content string `json:"content" form:"content" gorm:"column:content;size:500;comment:评论内容"`
Commentator *system.User `json:"commentator" form:"commentator" gorm:"foreignKey:UserId;comment:评论者"`
}