sku_encap

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(so *sku.SKU, eo *encap.Encap, img string, check bool) (err error)

Types

type SkuEncap

type SkuEncap 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_encap" json:"sku"`                                   //SKU
	Model     string `gorm:"column:model;type:varchar(128) NOT NULL" 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" json:"brand_code"`                                               //品牌编码
	EncapName string `gorm:"column:encap_name;type:varchar(128) NOT NULL" json:"encap_name"`                                              //封装编码
	EncapCode string `gorm:"column:encap_code;type:varchar(16) NOT NULL;uniqueIndex:udx_sku_encap" json:"encap_code"`                     //封装编码
	EncapImg  string `gorm:"column:encap_img;type:varchar(256) DEFAULT ''" json:"encap_img"`                                              //图片
	DeletedAt int64  `gorm:"column:deleted_at;type:int unsigned NOT NULL DEFAULT '0';index:idx_deleted_at" json:"-"`                      //删除时间
	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:"-"` //更新时间
}

func GetOne

func GetOne(sku, code string) (*SkuEncap, error)

func (*SkuEncap) Create

func (p *SkuEncap) Create() error

func (*SkuEncap) TableName

func (p *SkuEncap) TableName() string

func (*SkuEncap) Update added in v0.0.3

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

Jump to

Keyboard shortcuts

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