entity.go 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. package yb_community_question_audio
  2. import (
  3. "time"
  4. )
  5. // YbCommunityQuestionAudio 研报-问答社区音频表
  6. type YbCommunityQuestionAudio struct {
  7. CommunityQuestionAudioID int `gorm:"primaryKey;column:community_question_audio_id;type:int(10) unsigned;not null" json:"-"`
  8. CommunityQuestionID int `gorm:"index:idx_question_id;column:community_question_id;type:int(10) unsigned;not null;default:0" json:"communityQuestionId"` // 社区问题ID
  9. AudioURL string `gorm:"column:audio_url;type:varchar(255);not null;default:''" json:"audioUrl"` // 音频地址
  10. AudioPlaySeconds string `gorm:"column:audio_play_seconds;type:varchar(30);not null;default:''" json:"audioPlaySeconds"` // 音频播放时长,单位s
  11. AudioSize string `gorm:"column:audio_size;type:varchar(30);not null;default:''" json:"audioSize"` // 音频大小,单位M
  12. Sort int `gorm:"column:sort;type:int(10) unsigned;not null;default:0" json:"sort"` // 排序
  13. CreateTime time.Time `gorm:"column:create_time;type:datetime;default:CURRENT_TIMESTAMP" json:"createTime"` // 创建时间
  14. }
  15. // TableName get sql table name.获取数据库表名
  16. func (m *YbCommunityQuestionAudio) TableName() string {
  17. return "yb_community_question_audio"
  18. }
  19. // YbCommunityQuestionAudioColumns get sql column name.获取数据库列名
  20. var YbCommunityQuestionAudioColumns = struct {
  21. CommunityQuestionAudioID string
  22. CommunityQuestionID string
  23. AudioURL string
  24. AudioPlaySeconds string
  25. AudioSize string
  26. Sort string
  27. CreateTime string
  28. }{
  29. CommunityQuestionAudioID: "community_question_audio_id",
  30. CommunityQuestionID: "community_question_id",
  31. AudioURL: "audio_url",
  32. AudioPlaySeconds: "audio_play_seconds",
  33. AudioSize: "audio_size",
  34. Sort: "sort",
  35. CreateTime: "create_time",
  36. }