12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- package yb_poster_config
- import (
- "time"
- )
- // YbPosterConfig 研报海报生成配置
- type YbPosterConfig struct {
- ID uint32 `gorm:"primaryKey;column:id;type:int(9) unsigned;not null" json:"-"`
- Source string `gorm:"index:idx_source;column:source;type:varchar(64);default:''" json:"source"` // 来源
- Hight float64 `gorm:"column:hight;type:double(9,2) unsigned;default:0.00" json:"hight"` // 海报高度
- Width float64 `gorm:"column:width;type:double(9,2) unsigned;default:0.00" json:"width"` // 海报宽度
- HTMLTemplate string `gorm:"column:html_template;type:text" json:"htmlTemplate"` // html代码模板
- HTMLReplaceConfig string `gorm:"column:html_replace_config;type:text" json:"htmlReplaceConfig"` // 模板中的变量替换规则
- DefaultValueConfig string `gorm:"column:default_value_config;type:text" json:"defaultValueConfig"` // 默认值的配置
- Remark string `gorm:"column:remark;type:varchar(255);default:''" json:"remark"` // 备注
- CreateTime time.Time `gorm:"column:create_time;type:timestamp;default:CURRENT_TIMESTAMP" json:"createTime"`
- }
- // TableName get sql table name.获取数据库表名
- func (m *YbPosterConfig) TableName() string {
- return "yb_poster_config"
- }
- // YbPosterConfigColumns get sql column name.获取数据库列名
- var YbPosterConfigColumns = struct {
- ID string
- Source string
- Hight string
- Width string
- HTMLTemplate string
- HTMLReplaceConfig string
- DefaultValueConfig string
- Remark string
- CreateTime string
- }{
- ID: "id",
- Source: "source",
- Hight: "hight",
- Width: "width",
- HTMLTemplate: "html_template",
- HTMLReplaceConfig: "html_replace_config",
- DefaultValueConfig: "default_value_config",
- Remark: "remark",
- CreateTime: "create_time",
- }
|