feat: import services and standardize Go 1.26.5
This commit is contained in:
23
apps/ec/mall/internal/models/mall_notice.go
Normal file
23
apps/ec/mall/internal/models/mall_notice.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"git.apinb.com/bsm-sdk/core/database"
|
||||
"git.apinb.com/bsm-sdk/core/types"
|
||||
)
|
||||
|
||||
type MallNotice struct {
|
||||
types.Std_IICUDS
|
||||
Std_Store
|
||||
Title string `gorm:"column:title;type:varchar(255);not null;" json:"title"` // 标题
|
||||
Author string `gorm:"column:author;type:varchar(255);not null;" json:"author"` // 作者
|
||||
Content string `gorm:"column:content;type:text;default:'';" json:"content"` // 正文
|
||||
}
|
||||
|
||||
func init() {
|
||||
database.AppendMigrate(&MallNotice{})
|
||||
}
|
||||
|
||||
// TableName .
|
||||
func (table *MallNotice) TableName() string {
|
||||
return "mall_notice" //对应数据库表名
|
||||
}
|
||||
Reference in New Issue
Block a user