refactor: 1.修正api auth 2.帖子话题业务
This commit is contained in:
@@ -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"`
|
||||
}
|
||||
@@ -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"` // 标题 必须
|
||||
|
||||
@@ -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"`
|
||||
}
|
||||
Reference in New Issue
Block a user