Discover Packages
github.com/p12s/library-rest-api/library
pkg
models
package
Version:
v0.0.0-...-a1e0f3c
Opens a new window with list of versions in this module.
Published: Dec 4, 2021
License: Apache-2.0
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
type Author struct {
Id int `json:"id" db:"id"`
FirstName string `json:"first_name" db:"first_name"`
SecondName string `json:"second_name" db:"second_name"`
}
Author - just a author
type Book struct {
Id int `json:"id" db:"id"`
Title string `json:"title" db:"title"`
Authors []Author `json:"authors,omitempty" db:"authors"`
}
Book - just a book
type User struct {
Id int `json:"-" db:"id"`
Name string `json:"name" binding:"required"`
Username string `json:"username" binding:"required"`
Password string `json:"password" binding:"required"`
}
User - just a user
Source Files
¶
Click to show internal directories.
Click to hide internal directories.