package research_report_type

import "time"

// ResearchReportType 研究报告类型表
type ResearchReportType struct {
	ResearchReportTypeID    uint64    `gorm:"primaryKey;column:research_report_type_id;type:bigint(20) unsigned;not null" json:"-"`                         // 研究报告id
	ResearchReportID        uint64    `gorm:"index:research_report_id;column:research_report_id;type:bigint(20) unsigned;not null" json:"researchReportId"` // 报告id
	TypeID                  int       `gorm:"index:type_id;column:type_id;type:int(10)" json:"typeId"`                                                      // 分类id
	Edit                    int8      `gorm:"column:edit;type:tinyint(1);not null;default:0" json:"edit"`                                                   // 是否编辑过
	Trend                   string    `gorm:"column:trend;type:varchar(20)" json:"trend"`                                                                   // 趋势观点
	ResearchReportTypeTitle string    `gorm:"column:research_report_type_title;type:varchar(128)" json:"researchReportTypeTitle"`                           // 研究报告标题
	CreatedTime             time.Time `gorm:"index:created_time;column:created_time;type:datetime;default:CURRENT_TIMESTAMP" json:"createdTime"`            // 创建时间
	LastUpdatedTime         time.Time `gorm:"index:last_updated_time;column:last_updated_time;type:timestamp;not null;default:CURRENT_TIMESTAMP" json:"lastUpdatedTime"`
}

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

// ResearchReportTypeColumns get sql column name.获取数据库列名
var ResearchReportTypeColumns = struct {
	ResearchReportTypeID    string
	ResearchReportID        string
	TypeID                  string
	Edit                    string
	Trend                   string
	ResearchReportTypeTitle string
	CreatedTime             string
	LastUpdatedTime         string
}{
	ResearchReportTypeID:    "research_report_type_id",
	ResearchReportID:        "research_report_id",
	TypeID:                  "type_id",
	Edit:                    "edit",
	Trend:                   "trend",
	ResearchReportTypeTitle: "research_report_type_title",
	CreatedTime:             "created_time",
	LastUpdatedTime:         "last_updated_time",
}
