feat: import services and standardize Go 1.26.5
This commit is contained in:
31
apps/base/cms/internal/models/cms_site.go
Normal file
31
apps/base/cms/internal/models/cms_site.go
Normal file
@@ -0,0 +1,31 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"git.apinb.com/bsm-sdk/core/database"
|
||||
"git.apinb.com/bsm-sdk/core/types"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
// CmsSite 站点配置
|
||||
type CmsSite struct {
|
||||
gorm.Model
|
||||
types.Std_Identity
|
||||
|
||||
Title string `gorm:"column:title;type:varchar(255);not null" json:"title"`
|
||||
Description string `gorm:"column:description;type:varchar(255);not null" json:"description"`
|
||||
IconPath string `gorm:"column:icon_path;type:varchar(255);not null" json:"icon_path"`
|
||||
Keywords string `gorm:"column:keywords;type:varchar(255);not null" json:"keywords"`
|
||||
Domain string `gorm:"column:domain;type:varchar(255);not null" json:"domain"`
|
||||
Seo string `gorm:"column:seo;type:text;not null" json:"seo"`
|
||||
Theme string `gorm:"column:theme;type:varchar(255);not null" json:"theme"`
|
||||
Configs string `gorm:"column:configs;type:text;not null" json:"configs"`
|
||||
}
|
||||
|
||||
func init() {
|
||||
database.MigrateTables = append(database.MigrateTables, &CmsSite{})
|
||||
}
|
||||
|
||||
// TableName .CmsAccessory 分类表
|
||||
func (c *CmsSite) TableName() string {
|
||||
return "cms_site" // 对应数据库表名
|
||||
}
|
||||
Reference in New Issue
Block a user