commodity

package
v0.0.0-...-176ebac Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Commodity

type Commodity struct {
	gorm.Model
	ID       string `gorm:"primaryKey;autoIncrement;"`
	Name     string `gorm:"unique"`
	Price    float64
	Stock    int
	Category string
	ImageUrl string
	Unit     string
	Barcode  string
}

func (*Commodity) Create

func (m *Commodity) Create(ctx context.Context) error

type CommodityCollection

type CommodityCollection struct {
	List []*Commodity
}

func (*CommodityCollection) SearchByCode

func (c *CommodityCollection) SearchByCode(ctx context.Context, codePattern string) error

func (*CommodityCollection) SearchByName

func (c *CommodityCollection) SearchByName(ctx context.Context, namePattern string) error

Jump to

Keyboard shortcuts

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