package yb_community_question_audio

import (
	"time"
)

// YbCommunityQuestionAudio 研报-问答社区音频表
type YbCommunityQuestionAudio struct {
	CommunityQuestionAudioID int       `gorm:"primaryKey;column:community_question_audio_id;type:int(10) unsigned;not null" json:"-"`
	CommunityQuestionID      int       `gorm:"index:idx_question_id;column:community_question_id;type:int(10) unsigned;not null;default:0" json:"communityQuestionId"` // 社区问题ID
	AudioURL                 string    `gorm:"column:audio_url;type:varchar(255);not null;default:''" json:"audioUrl"`                                                 // 音频地址
	AudioPlaySeconds         string    `gorm:"column:audio_play_seconds;type:varchar(30);not null;default:''" json:"audioPlaySeconds"`                                 // 音频播放时长，单位s
	AudioSize                string    `gorm:"column:audio_size;type:varchar(30);not null;default:''" json:"audioSize"`                                                // 音频大小，单位M
	Sort                     int       `gorm:"column:sort;type:int(10) unsigned;not null;default:0" json:"sort"`                                                       // 排序
	CreateTime               time.Time `gorm:"column:create_time;type:datetime;default:CURRENT_TIMESTAMP" json:"createTime"`                                           // 创建时间
}

// TableName get sql table name.获取数据库表名
func (m *YbCommunityQuestionAudio) TableName() string {
	return "yb_community_question_audio"
}

// YbCommunityQuestionAudioColumns get sql column name.获取数据库列名
var YbCommunityQuestionAudioColumns = struct {
	CommunityQuestionAudioID string
	CommunityQuestionID      string
	AudioURL                 string
	AudioPlaySeconds         string
	AudioSize                string
	Sort                     string
	CreateTime               string
}{
	CommunityQuestionAudioID: "community_question_audio_id",
	CommunityQuestionID:      "community_question_id",
	AudioURL:                 "audio_url",
	AudioPlaySeconds:         "audio_play_seconds",
	AudioSize:                "audio_size",
	Sort:                     "sort",
	CreateTime:               "create_time",
}
