yb_activity_voice.go 1.5 KB

1234567891011121314151617181920212223242526272829303132333435
  1. package yb_activity_voice
  2. import "time"
  3. // YbActivityVoice [...]
  4. type YbActivityVoice struct {
  5. ActivityVoiceID int `gorm:"primaryKey;column:activity_voice_id;type:int(11);not null" json:"activity_voice_id"`
  6. ActivityID uint32 `gorm:"index:idx_activity_id;column:activity_id;type:int(11) unsigned;not null;default:0" json:"activityId"` // 活动id
  7. VoiceURL string `gorm:"unique;column:voice_url;type:varchar(500);not null;default:''" json:"voiceUrl"` // 音频地址
  8. VoiceName string `gorm:"column:voice_name;type:varchar(255);not null;default:''" json:"voiceName"` // 音频名称
  9. VoicePlaySeconds string `gorm:"column:voice_play_seconds;type:varchar(255);not null;default:''" json:"voicePlaySeconds"` // 音频时长
  10. CreateTime time.Time `gorm:"column:create_time;type:timestamp;default:CURRENT_TIMESTAMP" json:"createTime"`
  11. }
  12. // TableName get sql table name.获取数据库表名
  13. func (m *YbActivityVoice) TableName() string {
  14. return "yb_activity_voice"
  15. }
  16. // YbActivityVoiceColumns get sql column name.获取数据库列名
  17. var YbActivityVoiceColumns = struct {
  18. ActivityVoiceID string
  19. ActivityID string
  20. VoiceURL string
  21. VoiceName string
  22. VoicePlaySeconds string
  23. CreateTime string
  24. }{
  25. ActivityVoiceID: "activity_voice_id",
  26. ActivityID: "activity_id",
  27. VoiceURL: "voice_url",
  28. VoiceName: "voice_name",
  29. VoicePlaySeconds: "voice_play_seconds",
  30. CreateTime: "create_time",
  31. }