You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
406 B
34 lines
406 B
1 year ago
|
package category
|
||
|
|
||
|
import (
|
||
|
"product/backend/module/base"
|
||
|
)
|
||
|
|
||
|
const tableName = moduleName
|
||
|
|
||
|
type Body struct {
|
||
|
State bool `gorm:"" json:"state"`
|
||
|
}
|
||
|
|
||
|
type Model struct {
|
||
|
Body
|
||
|
base.Model
|
||
|
}
|
||
|
|
||
|
type PostModel struct {
|
||
|
Model
|
||
|
}
|
||
|
|
||
|
type PutModel struct {
|
||
|
Model
|
||
|
ID uint `gorm:"primarykey" json:"id" binding:"required"`
|
||
|
}
|
||
|
|
||
|
func (*Model) TableName() string {
|
||
|
return tableName
|
||
|
}
|
||
|
|
||
|
type GetReq struct {
|
||
|
base.GetReq
|
||
|
}
|