models

package
v0.0.0-...-24fa19e Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ApiCfg = apiConfig{}

Functions

This section is empty.

Types

type Author

type Author struct {
	ID          uuid.UUID `json:"id"`
	Name        string    `json:"name"`
	CreatedAt   time.Time `json:"created_at"`
	UpdatedAt   time.Time `json:"updated_at"`
	Description string    `json:"description"`
}

func AuthorToAuthor

func AuthorToAuthor(dbBook db.Author) Author

func AuthorsToAuthors

func AuthorsToAuthors(dbBook []db.Author) []Author

type Book

type Book struct {
	ID          uuid.UUID `json:"id"`
	Name        string    `json:"name"`
	CreatedAt   time.Time `json:"created_at"`
	UpdatedAt   time.Time `json:"updated_at"`
	PublishedAt time.Time `json:"published_at"`
	Isbn        string    `json:"isbn"`
	Description string    `json:"description"`
	AuthorID    uuid.UUID `json:"author_id"`
}

func BookToBook

func BookToBook(dbBook db.Book) Book

func BooksToBooks

func BooksToBooks(dbBook []db.Book) []Book

Jump to

Keyboard shortcuts

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