初始化项目框架,完成部分接口开发
This commit is contained in:
38
internal/model/category.go
Normal file
38
internal/model/category.go
Normal file
@ -0,0 +1,38 @@
|
||||
package model
|
||||
|
||||
import "github.com/gogf/gf/v2/frame/g"
|
||||
|
||||
type Category struct {
|
||||
g.Meta `orm:"table:categories"`
|
||||
Id int64 `json:"id" orm:"id"` // 分类ID
|
||||
Name string `json:"name" orm:"name"` // 分类名称
|
||||
Type int `json:type orm:"type"` // 类型,1 男频,2 女频
|
||||
}
|
||||
|
||||
type CategoryListIn struct {
|
||||
Page int
|
||||
Size int
|
||||
Name string
|
||||
Type int
|
||||
}
|
||||
type CategoryListOut struct {
|
||||
Total int
|
||||
List []Category
|
||||
}
|
||||
|
||||
type CategoryAddIn struct {
|
||||
Name string
|
||||
Type int // 类型,1 男频,2 女频
|
||||
}
|
||||
type CategoryEditIn struct {
|
||||
Id int
|
||||
Name string
|
||||
Type int // 类型,1 男频,2 女频
|
||||
}
|
||||
type CategoryDelIn struct {
|
||||
Id int
|
||||
}
|
||||
|
||||
type CategoryCRUDOut struct {
|
||||
Success bool
|
||||
}
|
||||
Reference in New Issue
Block a user