feat: 小程序首页banner管理
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
package plant
|
||||
|
||||
import (
|
||||
"sundynix-go/global"
|
||||
"sundynix-go/model/system"
|
||||
)
|
||||
|
||||
type Banner struct {
|
||||
global.BaseModel
|
||||
Title string `json:"title" gorm:"column:title;comment:标题"`
|
||||
ImageId string `json:"imageId" gorm:"column:image_id;comment:图片ID"`
|
||||
Image *system.Oss `json:"image" gorm:"foreignKey:ImageId"`
|
||||
Sort int `json:"sort" gorm:"column:sort;default:0;comment:排序"`
|
||||
IsActive int `json:"isActive" gorm:"column:is_active;default:1;comment:状态 1:启用 2:禁用"`
|
||||
TargetUrl string `json:"targetUrl" gorm:"column:target_url;comment:跳转链接"`
|
||||
}
|
||||
|
||||
func (Banner) TableName() string {
|
||||
return "sundynix_plant_banner"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package request
|
||||
|
||||
import "sundynix-go/model/commom/request"
|
||||
|
||||
type BannerPageReq struct {
|
||||
request.PageInfo
|
||||
Title string `json:"title" form:"title"`
|
||||
IsActive *int `json:"isActive" form:"isActive"` // 1 启用 2 禁用
|
||||
}
|
||||
Reference in New Issue
Block a user