feat: 小程序首页banner管理

This commit is contained in:
Blizzard
2026-04-27 11:26:01 +08:00
parent c5aa1c6f2c
commit 37b9055994
10 changed files with 241 additions and 0 deletions
+20
View File
@@ -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"
}
+9
View File
@@ -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 禁用
}