model

package
v0.0.0-...-748419f Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = sqlx.ErrNotFound

Functions

This section is empty.

Types

type Category

type Category struct {
	Id           int64  `db:"id"`
	Name         string `db:"name"`
	Abbreviation string `db:"abbreviation"`
	CreatedAt    int64  `db:"created_at"`
	UpdatedAt    int64  `db:"updated_at"`
}

type CategoryModel

type CategoryModel interface {
	// contains filtered or unexported methods
}

CategoryModel is an interface to be customized, add more methods here, and implement the added methods in customCategoryModel.

func NewCategoryModel

func NewCategoryModel(conn sqlx.SqlConn, c cache.CacheConf) CategoryModel

NewCategoryModel returns a model for the database table.

type Product

type Product struct {
	Id           int64  `db:"id"`
	BrandId      int64  `db:"brand_id"`
	CategoryId   int64  `db:"category_id"`
	Series       string `db:"series"`
	Name         string `db:"name"`
	Abbreviation string `db:"abbreviation"`
	CreatedAt    int64  `db:"created_at"`
	UpdatedAt    int64  `db:"updated_at"`
}

type ProductModel

type ProductModel interface {
	Pagination(ctx context.Context, cursor, limit int64) ([]Product, error)
	// contains filtered or unexported methods
}

ProductModel is an interface to be customized, add more methods here, and implement the added methods in customProductModel.

func NewProductModel

func NewProductModel(conn sqlx.SqlConn, c cache.CacheConf) ProductModel

NewProductModel returns a model for the database table.

Jump to

Keyboard shortcuts

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