background/model/book.go

20 lines
745 B
Go

package model
import "background/utils"
// Book sss
type Book struct {
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:"author" json:"author"`
Title string `gorm:"column:title" sql:"title" json:"title"`
Tag string `gorm:"column:tag" sql:"tag" json:"tag"`
Content string `gorm:"column:content" sql:"content" json:"content"`
CreateTime utils.OrmTime ` gorm:"column:create_time" sql:"create_time" json:"create_time"`
}
// 设置User的表名为`profiles`
func (Book) TableName() string {
return "book"
}
// ReadHistory sss
type ReadHistory struct {
ID int64 `sql:"id" json:"id"`
}