// 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 entity import ( "time" ) const TableNameBookCategory = "book_categories" // BookCategory mapped from table type BookCategory struct { ID int64 `gorm:"column:id;type:int;primaryKey;autoIncrement:true" json:"id"` // ID BookID int64 `gorm:"column:book_id;type:int;not null" json:"book_id"` // 书籍ID CategoryID *int64 `gorm:"column:category_id;type:int" json:"category_id"` // 分类ID CreateAt time.Time `gorm:"column:create_at;type:timestamp;not null" json:"create_at"` // 创建时间 UpdateAt time.Time `gorm:"column:update_at;type:timestamp;not null;default:CURRENT_TIMESTAMP" json:"update_at"` // 更新时间 } // TableName BookCategory's table name func (*BookCategory) TableName() string { return TableNameBookCategory }