background/model/book.go

22 lines
747 B
Go
Raw Normal View History

2021-01-09 14:55:22 +00:00
package model
2021-02-10 15:57:22 +00:00
2021-01-12 15:39:31 +00:00
import "background/utils"
2021-02-10 15:57:22 +00:00
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"`
2021-01-12 15:46:51 +00:00
Author string `gorm:"column:author" sql:"author" json:"author"`
2021-01-12 15:39:31 +00:00
Title string `gorm:"column:title" sql:"title" json:"title"`
2021-01-12 15:46:51 +00:00
Tag string `gorm:"column:tag" sql:"tag" json:"tag"`
2021-01-25 14:34:45 +00:00
Content string `gorm:"column:content" sql:"content" json:"content"`
2021-01-12 15:39:31 +00:00
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"`
}