Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository interface { GetAll() ([]TaxObject, error) Create(*TaxObject) error Close() Migrate() error }
Repository define the required behavior of data management in the tax object.
type TaxObject ¶
type TaxObject struct { ID int64 `json:"id"` Name string `json:"name" validate:"required"` TaxCode int64 `json:"tax_code" validate:"required,gte=1,lte=3"` Price float64 `json:"price" validate:"required,gt=0"` }
TaxObject define the model for tax object. This is the data that the user will input. Tax objects are also used to calculate bills.
Click to show internal directories.
Click to hide internal directories.