2021-01-09 14:55:22 +00:00
|
|
|
package model
|
2021-01-12 15:39:31 +00:00
|
|
|
import "background/utils"
|
2021-01-09 14:55:22 +00:00
|
|
|
// Book sss
|
|
|
|
type Book struct {
|
2021-01-12 15:39:31 +00:00
|
|
|
ID int64 `gorm:"column:id;primaryKey;default:0" sql:"id" json:"id"`
|
|
|
|
BookName string `gorm:"column:book_name" sql:"book_name" json:"book_name"`
|
|
|
|
Author string `gorm:"column:author" sql:"size" json:"size"`
|
|
|
|
Title string `gorm:"column:title" sql:"title" json:"title"`
|
|
|
|
Tag string `gorm:"column:tag" sql:"tag" json:"json"`
|
|
|
|
CreateTime utils.OrmTime ` gorm:"column:create_time" sql:"create_time" json:"create_time"`
|
|
|
|
}
|
|
|
|
// 设置User的表名为`profiles`
|
|
|
|
func (Book) TableName() string {
|
|
|
|
return "book"
|
2021-01-09 14:55:22 +00:00
|
|
|
}
|
|
|
|
// ReadHistory sss
|
|
|
|
type ReadHistory struct {
|
|
|
|
ID int64 `sql:"id" json:"id"`
|
|
|
|
}
|