12345678910111213141516171819202122232425262728293031323334353637 |
- package yb_poster_resource
- import (
- "time"
- )
- // YbPosterResource 海报图片表
- type YbPosterResource struct {
- ID uint32 `gorm:"primaryKey;column:id;type:int(10) unsigned;not null" json:"-"`
- Path string `gorm:"column:path;type:varchar(255);not null;default:''" json:"path"` // 请求路径
- ImgURL string `gorm:"column:img_url;type:varchar(255);not null;default:''" json:"imgUrl"` // 图片地址
- Type string `gorm:"column:type;type:varchar(20);not null;default:''" json:"type"` // 类型 poster-海报; qrcode-太阳码
- Version string `gorm:"column:version;type:varchar(20);not null;default:''" json:"version"` // 版本号
- CreateTime time.Time `gorm:"column:create_time;type:datetime;default:CURRENT_TIMESTAMP" json:"createTime"` // 创建时间
- }
- // TableName get sql table name.获取数据库表名
- func (m *YbPosterResource) TableName() string {
- return "yb_poster_resource"
- }
- // YbPosterResourceColumns get sql column name.获取数据库列名
- var YbPosterResourceColumns = struct {
- ID string
- Path string
- ImgURL string
- Type string
- Version string
- CreateTime string
- }{
- ID: "id",
- Path: "path",
- ImgURL: "img_url",
- Type: "type",
- Version: "version",
- CreateTime: "create_time",
- }
|