go18/book/v4/apps/book/model.go
2025-05-25 09:57:28 +08:00

20 lines
296 B
Go

package book
import "github.com/infraboard/mcube/v2/tools/pretty"
type Book struct {
// 对象Id
Id uint `json:"id" gorm:"primaryKey;column:id"`
CreateBookRequest
}
func (b *Book) String() string {
return pretty.ToJSON(b)
}
// books
func (b *Book) TableName() string {
return "books"
}