yb_speaker.go 1.1 KB

123456789101112131415161718192021222324252627
  1. package yb_speaker
  2. type YbSpeaker struct {
  3. SpeakerID uint32 `gorm:"primaryKey;column:speaker_id;type:int(9) unsigned;not null" json:"speakerId"` // 主讲人id
  4. SpeakerName string `gorm:"column:speaker_name;type:varchar(255)" json:"speakerName"` // 主讲人名称
  5. SpeakerHeadPic string `gorm:"column:speaker_head_pic;type:varchar(255);default:''" json:"speakerHeadPic"` // 主讲人头像
  6. SpeakerBackgroundPic string `gorm:"column:speaker_background_pic;type:varchar(255);default:''" json:"speakerBackgroundPic"` // 主讲人背景图
  7. }
  8. // TableName get sql table name.获取数据库表名
  9. func (m *YbSpeaker) TableName() string {
  10. return "yb_speaker"
  11. }
  12. // YbSpeakerColumns get sql column name.获取数据库列名
  13. var YbSpeakerColumns = struct {
  14. SpeakerID string
  15. SpeakerName string
  16. SpeakerHeadPic string
  17. SpeakerBackgroundPic string
  18. }{
  19. SpeakerID: "speaker_id",
  20. SpeakerName: "speaker_name",
  21. SpeakerHeadPic: "speaker_head_pic",
  22. SpeakerBackgroundPic: "speaker_background_pic",
  23. }