✨ init project
This commit is contained in:
19
model/article/article.go
Normal file
19
model/article/article.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package article
|
||||
|
||||
import (
|
||||
"git.echol.cn/loser/lckt/global"
|
||||
)
|
||||
|
||||
type Article struct {
|
||||
global.GVA_MODEL
|
||||
Title string `json:"title" gorm:"comment:文章标题"`
|
||||
Desc string `json:"desc" gorm:"comment:文章描述"`
|
||||
Content string `json:"content" gorm:"comment:文章内容"`
|
||||
CoverImg string `json:"coverImg" gorm:"comment:文章封面图"`
|
||||
Price int64 `json:"price" gorm:"comment:文章价格(单位为分)"`
|
||||
}
|
||||
|
||||
// TableName 文章表
|
||||
func (Article) TableName() string {
|
||||
return "article"
|
||||
}
|
11
model/article/request/article.go
Normal file
11
model/article/request/article.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package request
|
||||
|
||||
import "git.echol.cn/loser/lckt/model/common/request"
|
||||
|
||||
type GetList struct {
|
||||
request.PageInfo
|
||||
}
|
||||
|
||||
type DeleteIds struct {
|
||||
Ids []int `json:"ids" form:"ids" binding:"required"`
|
||||
}
|
Reference in New Issue
Block a user