models

package
v0.0.0-...-f8c27d3 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Product

type Product struct {
	ID       int       `json:"id"`
	Name     string    `json:"name"`
	Price    float64   `json:"price"`
	Sale     float64   `json:"total_sales"`
	Created  time.Time `json:"-"`
	Modified time.Time `json:"-"`
}

func (*Product) CreateProduct

func (p *Product) CreateProduct(db *sql.DB) error

func (*Product) DeleteProduct

func (p *Product) DeleteProduct(db *sql.DB) error

func (*Product) GetProduct

func (p *Product) GetProduct(db *sql.DB) error

func (*Product) GetProducts

func (p *Product) GetProducts(db *sql.DB, start, count int) ([]Product, error)

func (*Product) UpdateProduct

func (p *Product) UpdateProduct(db *sql.DB) error

Jump to

Keyboard shortcuts

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