47 lines
1.7 KiB
Go
47 lines
1.7 KiB
Go
package dao
|
|
|
|
const (
|
|
AdStatusNormal uint8 = 1 // 正常
|
|
AdStatusDisabled uint8 = 2 // 禁用
|
|
)
|
|
|
|
// type: 1、商城首页banner 2、商城首页视频 3、商城首页公告 4、商城首页教程
|
|
|
|
type AdCreate struct {
|
|
Id int `gorm:"column:id;primaryKey;autoIncrement" json:"id"`
|
|
Type uint8 `gorm:"column:type" json:"type"`
|
|
Image string `gorm:"column:image" json:"image"`
|
|
Content string `gorm:"column:content" json:"content"`
|
|
Url string `gorm:"column:url" json:"url"`
|
|
AdminId int `gorm:"column:admin_id" json:"admin_id"`
|
|
AdminName string `gorm:"column:admin_name" json:"admin_name"`
|
|
}
|
|
|
|
type AdInfo struct {
|
|
Id int `gorm:"column:id" json:"id"`
|
|
Type uint8 `gorm:"column:type" json:"type"`
|
|
Image string `gorm:"column:image" json:"image"`
|
|
Content string `gorm:"column:content" json:"content"`
|
|
Reason string `gorm:"column:reason" json:"reason"`
|
|
Status uint8 `gorm:"column:status" json:"status"`
|
|
Url string `gorm:"column:url" json:"url"`
|
|
UpdateTime string `gorm:"column:update_time" json:"update_time"`
|
|
CreateTime string `gorm:"column:create_time" json:"create_time"`
|
|
}
|
|
|
|
type AdStatus struct {
|
|
Id int `gorm:"column:id;primaryKey" json:"id"`
|
|
Reason string `gorm:"column:reason" json:"reason"`
|
|
Status uint8 `gorm:"column:status" json:"status"`
|
|
AdminId int `gorm:"column:admin_id" json:"admin_id"`
|
|
AdminName string `gorm:"column:admin_name" json:"admin_name"`
|
|
}
|
|
|
|
type AdWebInfo struct {
|
|
Id int `gorm:"column:id" json:"id"`
|
|
Type uint8 `gorm:"column:type" json:"type"`
|
|
Image string `gorm:"column:image" json:"image"`
|
|
Content string `gorm:"column:content" json:"content"`
|
|
Url string `gorm:"column:url" json:"url"`
|
|
}
|