package report_ppt_img

import (
	"time"
)

// ReportPptImg Ppt与报告的图片表
type ReportPptImg struct {
	ReportPptImgID  uint64    `gorm:"primaryKey;column:report_ppt_img_id;type:bigint(9) unsigned;not null" json:"-"`
	PptID           uint32    `gorm:"index:idx_ppt_id;column:ppt_id;type:int(9) unsigned;default:0" json:"pptId"`                       // ppt的id
	ReportID        uint32    `gorm:"index:idx_rid_cid;column:report_id;type:int(9) unsigned;default:0" json:"reportId"`                // 报告id
	ReportChapterID uint32    `gorm:"index:idx_rid_cid;column:report_chapter_id;type:int(9) unsigned;default:0" json:"reportChapterId"` // 章节id
	ImgURL          string    `gorm:"column:img_url;type:varchar(255);default:''" json:"imgUrl"`                                        // ppt图片地址
	CreateTime      time.Time `gorm:"column:create_time;type:timestamp;default:CURRENT_TIMESTAMP" json:"createTime"`                    // 创建时间
}

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

// ReportPptImgColumns get sql column name.获取数据库列名
var ReportPptImgColumns = struct {
	ReportPptImgID  string
	PptID           string
	ReportID        string
	ReportChapterID string
	ImgURL          string
	CreateTime      string
}{
	ReportPptImgID:  "report_ppt_img_id",
	PptID:           "ppt_id",
	ReportID:        "report_id",
	ReportChapterID: "report_chapter_id",
	ImgURL:          "img_url",
	CreateTime:      "create_time",
}
