// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.

package dao

import (
	"github.com/bangumi/server/dal/utiltype"
)

const TableNameSubject = "chii_subjects"

// Subject mapped from table <chii_subjects>
type Subject struct {
	ID            uint32                     `gorm:"column:subject_id;type:mediumint(8) unsigned;primaryKey;autoIncrement:true" json:""`
	TypeID        uint8                      `gorm:"column:subject_type_id;type:smallint(6) unsigned;not null" json:""`
	Name          utiltype.HTMLEscapedString `gorm:"column:subject_name;type:varchar(512);not null" json:""`
	NameCN        utiltype.HTMLEscapedString `gorm:"column:subject_name_cn;type:varchar(512);not null" json:""`
	UID           string                     `gorm:"column:subject_uid;type:varchar(20);not null;comment:isbn / imdb" json:""` // isbn / imdb
	Creator       uint32                     `gorm:"column:subject_creator;type:mediumint(8) unsigned;not null" json:""`
	Dateline      uint32                     `gorm:"column:subject_dateline;type:int(10) unsigned;not null" json:""`
	Image         string                     `gorm:"column:subject_image;type:varchar(255);not null" json:""`
	Platform      uint16                     `gorm:"column:subject_platform;type:smallint(6) unsigned;not null" json:""`
	Infobox       utiltype.HTMLEscapedString `gorm:"column:field_infobox;type:mediumtext;not null" json:""`
	FieldMetaTags string                     `gorm:"column:field_meta_tags;type:mediumtext;not null" json:""`
	Summary       string                     `gorm:"column:field_summary;type:mediumtext;not null;comment:summary" json:""`       // summary
	Field5        string                     `gorm:"column:field_5;type:mediumtext;not null;comment:author summary" json:""`      // author summary
	Volumes       uint32                     `gorm:"column:field_volumes;type:mediumint(8) unsigned;not null;comment:卷数" json:""` // 卷数
	Eps           uint32                     `gorm:"column:field_eps;type:mediumint(8) unsigned;not null" json:""`
	Wish          uint32                     `gorm:"column:subject_wish;type:mediumint(8) unsigned;not null" json:""`
	Done          uint32                     `gorm:"column:subject_collect;type:mediumint(8) unsigned;not null" json:""`
	Doing         uint32                     `gorm:"column:subject_doing;type:mediumint(8) unsigned;not null" json:""`
	OnHold        uint32                     `gorm:"column:subject_on_hold;type:mediumint(8) unsigned;not null;comment:搁置人数" json:""` // 搁置人数
	Dropped       uint32                     `gorm:"column:subject_dropped;type:mediumint(8) unsigned;not null;comment:抛弃人数" json:""` // 抛弃人数
	Series        bool                       `gorm:"column:subject_series;type:tinyint(1) unsigned;not null" json:""`
	SeriesEntry   uint32                     `gorm:"column:subject_series_entry;type:mediumint(8) unsigned;not null" json:""`
	IdxCn         string                     `gorm:"column:subject_idx_cn;type:varchar(1);not null" json:""`
	Airtime       uint8                      `gorm:"column:subject_airtime;type:tinyint(1) unsigned;not null" json:""`
	Nsfw          bool                       `gorm:"column:subject_nsfw;type:tinyint(1);not null" json:""`
	Ban           uint8                      `gorm:"column:subject_ban;type:tinyint(1) unsigned;not null" json:""`
	Fields        SubjectField               `gorm:"foreignKey:subject_id;references:field_sid" json:"fields"`
}

// TableName Subject's table name
func (*Subject) TableName() string {
	return TableNameSubject
}
