123456789101112131415161718192021222324252627 |
- package yb_speaker
- type YbSpeaker struct {
- SpeakerID uint32 `gorm:"primaryKey;column:speaker_id;type:int(9) unsigned;not null" json:"speakerId"` // 主讲人id
- SpeakerName string `gorm:"column:speaker_name;type:varchar(255)" json:"speakerName"` // 主讲人名称
- SpeakerHeadPic string `gorm:"column:speaker_head_pic;type:varchar(255);default:''" json:"speakerHeadPic"` // 主讲人头像
- SpeakerBackgroundPic string `gorm:"column:speaker_background_pic;type:varchar(255);default:''" json:"speakerBackgroundPic"` // 主讲人背景图
- }
- // TableName get sql table name.获取数据库表名
- func (m *YbSpeaker) TableName() string {
- return "yb_speaker"
- }
- // YbSpeakerColumns get sql column name.获取数据库列名
- var YbSpeakerColumns = struct {
- SpeakerID string
- SpeakerName string
- SpeakerHeadPic string
- SpeakerBackgroundPic string
- }{
- SpeakerID: "speaker_id",
- SpeakerName: "speaker_name",
- SpeakerHeadPic: "speaker_head_pic",
- SpeakerBackgroundPic: "speaker_background_pic",
- }
|