gengoprod

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Code generated by gotoc_sql. DO NOT EDIT. gotoc version: 0.0.2 source: samples/sql/prod.gotoc.sql

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddProd

func AddProd(db sqlimpl.Execable, prod *Product) (int64, error)

AddProd 插入一个新的商品

func AddSkus

func AddSkus(db sqlimpl.Execable, skus []*Sku) (int64, error)

AddSkus 插入多个sku

Types

type Product

type Product struct {
	//
	Id int64
	//
	Title string
	//
	Status int8
	//
	Img string
	//
	UpdateBy string
}

Product fetch struct from prod

func GetProductById

func GetProductById(db sqlimpl.Queryable, pid int64) (ret *Product, err error)

GetProductById

type Sku

type Sku struct {
	//
	Id int64
	//
	Pid int64
	//
	Qty int32
	//
	Weight int32
	//
	Price string
}

Sku fetch struct from sku

func FindSkus

func FindSkus(db sqlimpl.Queryable, pid int64) (ret []*Sku, err error)

FindSkus 查询某个商品的所有sku

Jump to

Keyboard shortcuts

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