models

package
v0.0.0-...-3b15b66 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 29, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Book

type Book struct {
	gorm.Model
	Name        string `gorm:""json:"name"`
	Author      string `json:"author"`
	Publication string `json:"publication"`
}

func DeleteBookById

func DeleteBookById(Id int64) Book

func GetAllBooks

func GetAllBooks() []Book

func GetBookById

func GetBookById(Id int64) (*Book, *gorm.DB)

func (*Book) CreateBook

func (b *Book) CreateBook() *Book

funcs with receivers are like functions of struct itself to manipulate the struct obj

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL