product

package
Version: v0.0.0-...-2cd4ea5 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const LIMITZONE_TYPE_FORBIDDEN = 2
View Source
const LIMITZONE_TYPE_NO_RESTRICT = 0

ProductLogisticsInfo Model

View Source
const LIMITZONE_TYPE_SALE = 1
View Source
const PP_STATUS_DELETE = -1 //商品删除 不在当前供应商显示

PoolProduct model

View Source
const PP_STATUS_OFF = 0 //商品下架(待售)
View Source
const PP_STATUS_ON = 1 //商品上架
View Source
const PP_STATUS_ON_POOL = 2 //商品在商品池中显示
View Source
const PP_STATUS_WAIT_APPLICATION = 3 //等待审核
View Source
const PP_TYPE_CREATE = 2 //商户自身创建的商品
View Source
const PP_TYPE_SYNC = 1 //从其他商品池同步而来的商品
View Source
const PRODUCT_CATEGORY_NODE_TYPE_LEAF = 2
View Source
const PRODUCT_CATEGORY_NODE_TYPE_NODE = 1

ProductCategory Model

View Source
const PRODUCT_MEDIA_TYPE_IMAGE = 1

ProductMedia Model

View Source
const PRODUCT_MEDIA_TYPE_VIDEO = 2

Variables

View Source
var PPSTATUS2STR = map[int]string{
	PP_STATUS_OFF:              "off_shelf",
	PP_STATUS_ON:               "on_shelf",
	PP_STATUS_DELETE:           "deleted",
	PP_STATUS_ON_POOL:          "on_pool",
	PP_STATUS_WAIT_APPLICATION: "wait_application",
}
View Source
var PPTYPE2STR = map[int]string{
	PP_TYPE_SYNC:   "sync",
	PP_TYPE_CREATE: "create",
}
View Source
var PRODUCTCATEGORYNODE2STR = map[int]string{
	PRODUCT_CATEGORY_NODE_TYPE_NODE: "node",
	PRODUCT_CATEGORY_NODE_TYPE_LEAF: "leaf",
}
View Source
var PRODUCTMEDIA2STR = map[int]string{
	PRODUCT_MEDIA_TYPE_IMAGE: "image",
	PRODUCT_MEDIA_TYPE_VIDEO: "video",
}
View Source
var STR2PPSTATUS = map[string]int{
	"off_shelf":        PP_STATUS_OFF,
	"on_shelf":         PP_STATUS_ON,
	"deleted":          PP_STATUS_DELETE,
	"on_pool":          PP_STATUS_ON_POOL,
	"wait_application": PP_STATUS_WAIT_APPLICATION,
}
View Source
var STR2PPTYPE = map[string]int{
	"sync":   PP_TYPE_SYNC,
	"create": PP_TYPE_CREATE,
}
View Source
var STR2PRODUCTCATEGORYNODE = map[string]int{
	"node": PRODUCT_CATEGORY_NODE_TYPE_NODE,
	"leaf": PRODUCT_CATEGORY_NODE_TYPE_LEAF,
}
View Source
var STR2PRODUCTMEDIA = map[string]int{
	"image": PRODUCT_MEDIA_TYPE_IMAGE,
	"video": PRODUCT_MEDIA_TYPE_VIDEO,
}

Functions

This section is empty.

Types

type PoolProduct

type PoolProduct struct {
	eel.Model
	CorpId              int `gorm:"index"` //foreign key for corp
	ProductId           int
	ProductType         string
	SupplierId          int
	Status              int
	Type                int
	SoldCount           int // 销量
	SourcePoolProductId int `gorm:"index"` //sync product的source pool product
	DisplayIndex        int
	SyncAt              time.Time `gorm:"type(datetime)"`
}

func (*PoolProduct) TableName

func (self *PoolProduct) TableName() string

type Product

type Product struct {
	eel.Model
	CorpId         int `gorm:"index"` //foreign key for corp
	Type           string
	Name           string
	PromotionTitle string
	Code           string `gorm:"size:52;index"`
	DisplayIndex   int
	CategoryId     int //分类id
	Thumbnail      string
	IsDeleted      bool `gorm:"default:false"`
}

Product Model

func (*Product) TableName

func (self *Product) TableName() string

type ProductCategory

type ProductCategory struct {
	eel.Model
	CorpId       int    `gorm:"index"` //foreign key for corp
	Name         string `gorm:"size:52"`
	NodeType     int    //分类节点类型(中间节点,叶节点)
	FatherId     int    //父节点id(0表示没有父节点)
	ProductCount int
	DisplayIndex int
	IsEnabled    bool `gorm:"default:true"`
}

func (*ProductCategory) TableName

func (self *ProductCategory) TableName() string

type ProductDescription

type ProductDescription struct {
	Id           int `gorm:"primary_key"`
	ProductId    int `gorm:"index"`
	Introduction string
	Detail       string `gorm:"type:text"`
	Remark       string `gorm:"type:text"`
}

ProductDescription Model

func (*ProductDescription) TableName

func (self *ProductDescription) TableName() string

type ProductHasLabel

type ProductHasLabel struct {
	eel.Model
	ProductId int //foreign key product
	LabelId   int //foreign key product_label
}

ProductHasLabel Model

func (*ProductHasLabel) TableName

func (self *ProductHasLabel) TableName() string

type ProductLabel

type ProductLabel struct {
	eel.Model
	CorpId    int `gorm:"index"` //foreign key for corp
	Name      string
	IsEnabled bool `gorm:"default(true)"`
}

ProductLabel Model

func (*ProductLabel) TableName

func (self *ProductLabel) TableName() string

type ProductLogisticsInfo

type ProductLogisticsInfo struct {
	Id                  int    `gorm:"primary_key"`
	ProductId           int    `gorm:"index"`
	PostageType         string //运费类型
	UnifiedPostageMoney int    //统一运费金额
	LimitZoneType       int
	LimitZoneId         int
	CreatedAt           time.Time `gorm:"auto_now_add;type(datetime)"`
}

func (*ProductLogisticsInfo) TableName

func (self *ProductLogisticsInfo) TableName() string

type ProductMedia

type ProductMedia struct {
	Id        int `gorm:"primary_key"`
	ProductId int `gorm:"index"`
	Type      int
	Url       string
}

func (*ProductMedia) TableName

func (self *ProductMedia) TableName() string

type ProductProperty

type ProductProperty struct {
	eel.Model
	CorpId    int `gorm:"index"` //foreign key for corp
	Name      string
	IsDeleted bool `gorm:"default:false"`
}

ProductProperty Model

func (*ProductProperty) TableName

func (self *ProductProperty) TableName() string

type ProductPropertyValue

type ProductPropertyValue struct {
	eel.Model
	PropertyId int `gorm:"index"` //foreign key for property
	Text       string
	Image      string
	IsDeleted  bool `gorm:"default:false"`
}

ProductPropertyValue Model

func (*ProductPropertyValue) TableName

func (self *ProductPropertyValue) TableName() string

type ProductSku

type ProductSku struct {
	eel.Model
	CorpId    int `gorm:"index"` //foreign key for corp
	ProductId int
	Name      string //规格名
	Code      string //规格编码
	Price     int    //商品价格
	CostPrice int    //商品成本价
	Stocks    int    //库存
	IsDeleted bool   `gorm:"default:false"`
}

ProductSku Model

func (*ProductSku) TableName

func (self *ProductSku) TableName() string

type ProductSkuHasPropertyValue

type ProductSkuHasPropertyValue struct {
	Id              int
	SkuId           int       //foreign key product_sku
	PropertyId      int       //foreign key product_property
	PropertyValueId int       //foreign key product_property_value
	CreatedAt       time.Time `gorm:"type:datetime"`
}

func (*ProductSkuHasPropertyValue) TableName

func (self *ProductSkuHasPropertyValue) TableName() string

type ProductUsableImoney

type ProductUsableImoney struct {
	Id         int `gorm:"primary_key"`
	ProductId  int `gorm:"index"`
	ImoneyCode string
	IsEnabled  bool `gorm:"default:true"`
}

ProductUsableImoney Model

func (*ProductUsableImoney) TableName

func (self *ProductUsableImoney) TableName() string

Source Files

Jump to

Keyboard shortcuts

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