refactor: reorganize modules and add Linux build tooling
This commit is contained in:
26
module/ec/mall/internal/models/mall_ads.go
Normal file
26
module/ec/mall/internal/models/mall_ads.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"git.apinb.com/bsm-sdk/core/database"
|
||||
"git.apinb.com/bsm-sdk/core/types"
|
||||
)
|
||||
|
||||
type MallAds struct {
|
||||
types.Std_IICUDS
|
||||
Std_Store
|
||||
Title string `gorm:"column:title;type:varchar(255);not null;" json:"title"` // 广告名称
|
||||
PosKey string `gorm:"column:pos_key;type:varchar(255);not null;" json:"pos_key"` // 广告位key
|
||||
Content string `gorm:"column:content;type:varchar(255);measuring_name;" json:"content"` // 广告内容
|
||||
Type ContentType `gorm:"column:type;default:0;" json:"type"` // 广告类型
|
||||
ToUrl string `gorm:"column:to_url;type:varchar(255);default:'';" json:"to_url"` // 跳转链接
|
||||
|
||||
}
|
||||
|
||||
func init() {
|
||||
database.AppendMigrate(&MallAds{})
|
||||
}
|
||||
|
||||
// TableName .
|
||||
func (table *MallAds) TableName() string {
|
||||
return "mall_ads" //对应数据库表名
|
||||
}
|
||||
Reference in New Issue
Block a user