feat: post api

This commit is contained in:
Blizzard
2026-02-06 17:28:42 +08:00
parent 3115b58cb2
commit 87c31f119f
14 changed files with 420 additions and 6 deletions
+16
View File
@@ -0,0 +1,16 @@
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:评论者"`
}