taxobj

package
v0.0.0-...-8499f05 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2020 License: MIT Imports: 0 Imported by: 0

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.

type Usecase

type Usecase interface {
	CreateTaxObject(*TaxObject) error
}

Usecase defines the required behavior for business logic in the tax object.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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