package yb_activity_poster

import "time"

// YbActivityPoster 活动海报表
type YbActivityPoster struct {
	ActivityPosterID uint32    `gorm:"primaryKey;column:activity_poster_id;type:int(11) unsigned;not null" json:"-"`
	ActivityID       uint32    `gorm:"index:idx_activity_id;column:activity_id;type:int(11) unsigned;not null;default:0" json:"activityId"` // 活动id
	URL              string    `gorm:"unique;column:url;type:varchar(500);not null;default:''" json:"url"`                                  // 海报地址
	Name             string    `gorm:"column:name;type:varchar(255);not null;default:''" json:"name"`                                       // 海报名称
	CreateTime       time.Time `gorm:"column:create_time;type:timestamp;default:CURRENT_TIMESTAMP" json:"createTime"`
}

// TableName get sql table name.获取数据库表名
func (m *YbActivityPoster) TableName() string {
	return "yb_activity_poster"
}

// YbActivityPosterColumns get sql column name.获取数据库列名
var YbActivityPosterColumns = struct {
	ActivityPosterID string
	ActivityID       string
	URL              string
	Name             string
	CreateTime       string
}{
	ActivityPosterID: "activity_poster_id",
	ActivityID:       "activity_id",
	URL:              "url",
	Name:             "name",
	CreateTime:       "create_time",
}
