refactor: 1.修正api auth 2.帖子话题业务

This commit is contained in:
Blizzard
2026-02-07 15:52:54 +08:00
parent e4de80eecc
commit 9adad90490
17 changed files with 314 additions and 35 deletions
+14
View File
@@ -0,0 +1,14 @@
package plant
import (
"sundynix-go/global"
"time"
)
type Topic struct {
global.BaseModel
Title string `json:"title"`
StartTime time.Time `json:"start_time" gorm:"column:start_time;"`
EndTime time.Time `json:"end_time" gorm:"column:end_time;"`
Remark string `json:"remark"`
}
+3 -1
View File
@@ -1,6 +1,8 @@
package request
import common "sundynix-go/model/commom/request"
import (
common "sundynix-go/model/commom/request"
)
type CreatePost struct {
Title string `json:"title"` // 标题 必须
+16
View File
@@ -0,0 +1,16 @@
package request
type CreateTopic struct {
Title string `json:"title"`
StartTime string `json:"start_time"`
EndTime string `json:"end_time"`
Remark string `json:"remark"`
}
type UpdateTopic struct {
Id int `json:"id" binding:"required"`
Title string `json:"title"`
StartTime string `json:"start_time"`
EndTime string `json:"end_time"`
Remark string `json:"remark"`
}