20 lines
476 B
Go
20 lines
476 B
Go
package models
|
|
|
|
type Book struct {
|
|
ID int64 `xorm:"int(11) autoincr not null unique pk"`
|
|
Title string `xorm:"varchar(250) not null"`
|
|
Isbn string `xorm:"varchar(30)"`
|
|
Year int64 `xorm:"int(11)"`
|
|
Price float64 `xorm:"double"`
|
|
Status int64 `xorm:"int(11)"`
|
|
Publisher int64 `xorm:"int(11)"`
|
|
Created int64 `xorm:"created"`
|
|
Updated int64 `xorm:"updated"`
|
|
|
|
PublisherFull Publisher `xorm:"-"`
|
|
Authors []Author `xorm:"-"`
|
|
}
|
|
|
|
func (Book) TableName() string{
|
|
return "books"
|
|
} |