Documentation ¶
Index ¶
- type Book
- func (b *Book) BeforeCreate()
- func (b *Book) DeleteABook(db *gorm.DB, id uuid.UUID) (int64, error)
- func (b *Book) FindAllBooks(db *gorm.DB) (*[]Book, error)
- func (b *Book) FindBookByID(db *gorm.DB, id uuid.UUID) (*Book, error)
- func (b *Book) SaveBook(db *gorm.DB) (*Book, error)
- func (b *Book) UpdateBook(db *gorm.DB, id uuid.UUID) (*Book, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Book ¶
type Book struct { UUID uuid.UUID `gorm:"primary_key" json:"uuid"` Title string `gorm:"size:255;not null;" json:"title"` Author string `gorm:"size:255;not null;" json:"author"` ImageURL string `gorm:"size:255;not null;" json:"image_url"` Description string `gorm:"size:255;not null;" json:"description"` }
Book ...
func (*Book) DeleteABook ¶
DeleteABook ...
func (*Book) FindAllBooks ¶
FindAllBooks ...
func (*Book) FindBookByID ¶
FindBookByID ...
Click to show internal directories.
Click to hide internal directories.