Documentation ¶
Overview ¶
Package models contains all database models.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddCustomer ¶
type AddCustomer struct { Name string `json:"name" example:"A Company Ltd." format:"string"` Address string `json:"address" example:"Street 1234, 01234 City, Country" format:"string"` }
AddCustomer is a limited creation version of customer object.
func (AddCustomer) Validate ¶
func (a AddCustomer) Validate() error
Validate whether customer creation request is correct.
type Customer ¶
type Customer struct { ID uuid.UUID `json:"id" example:"f3537d5c-cf15-48cc-b309-7a51312a574f" format:"uuid"` Name string `json:"name" example:"A Company Ltd." format:"string"` Address string `json:"address" example:"Street 1234, 01234 City, Country" format:"string"` }
Customer is a model representing customer.
func FindCustomerByID ¶
FindCustomerByID finds customer by ID and returns it.
type MenuItem ¶
type MenuItem struct { Name string `json:"name" example:"Food" format:"string"` Count uint `json:"count" example:"1" format:"uint"` UnitPrice float64 `json:"unit_price" example:"3.99" format:"float64"` }
MenuItem is a model representing an item on the menu.
Click to show internal directories.
Click to hide internal directories.