1234567891011121314151617181920212223242526272829303132333435 |
- package yb_activity_voice
- import "time"
- // YbActivityVoice [...]
- type YbActivityVoice struct {
- ActivityVoiceID int `gorm:"primaryKey;column:activity_voice_id;type:int(11);not null" json:"activity_voice_id"`
- ActivityID uint32 `gorm:"index:idx_activity_id;column:activity_id;type:int(11) unsigned;not null;default:0" json:"activityId"` // 活动id
- VoiceURL string `gorm:"unique;column:voice_url;type:varchar(500);not null;default:''" json:"voiceUrl"` // 音频地址
- VoiceName string `gorm:"column:voice_name;type:varchar(255);not null;default:''" json:"voiceName"` // 音频名称
- VoicePlaySeconds string `gorm:"column:voice_play_seconds;type:varchar(255);not null;default:''" json:"voicePlaySeconds"` // 音频时长
- CreateTime time.Time `gorm:"column:create_time;type:timestamp;default:CURRENT_TIMESTAMP" json:"createTime"`
- }
- // TableName get sql table name.获取数据库表名
- func (m *YbActivityVoice) TableName() string {
- return "yb_activity_voice"
- }
- // YbActivityVoiceColumns get sql column name.获取数据库列名
- var YbActivityVoiceColumns = struct {
- ActivityVoiceID string
- ActivityID string
- VoiceURL string
- VoiceName string
- VoicePlaySeconds string
- CreateTime string
- }{
- ActivityVoiceID: "activity_voice_id",
- ActivityID: "activity_id",
- VoiceURL: "voice_url",
- VoiceName: "voice_name",
- VoicePlaySeconds: "voice_play_seconds",
- CreateTime: "create_time",
- }
|