sku_metas

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddOne

func AddOne(obj *sku.SKU, metas string, check bool) (err error)

Types

type SkuMetas

type SkuMetas struct {
	ID            int64  `gorm:"column:id;type:bigint unsigned NOT NULL;autoIncrement;primaryKey" json:"id"`
	SKU           string `gorm:"column:sku;type:varchar(64) NOT NULL;uniqueIndex:udx_sku" json:"sku"`                                         //SKU
	Model         string `gorm:"column:model;type:varchar(128) NOT NULL;index:idx_model" json:"model"`                                        //型号
	BrandName     string `gorm:"column:brand_name;type:varchar(128) NOT NULL" json:"brand_name"`                                              //品牌名称
	BrandCode     string `gorm:"column:brand_code;type:varchar(16) NOT NULL;index:idx_brand_code" json:"brand_code"`                          //品牌编码
	CreatedAt     string `gorm:"column:created_at;->;type:timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP" json:"-"`                             //更新时间
	UpdatedAt     string `gorm:"column:updated_at;->;type:timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP" json:"-"` //更新时间
	Specification string `gorm:"column:specification;type:text DEFAULT NULL" json:"specification"`                                            //属性
}

func GetOne

func GetOne(sku string) (obj *SkuMetas, err error)

func (*SkuMetas) Create

func (p *SkuMetas) Create() error

func (*SkuMetas) TableName

func (p *SkuMetas) TableName() string

func (*SkuMetas) Update added in v0.0.3

func (p *SkuMetas) Update(data SkuMetas) error

Jump to

Keyboard shortcuts

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