You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
3.3 KiB

3 years ago
package manage
import (
"github.com/shopspring/decimal"
3 years ago
"recook/internal/v2/model/recook/goods"
3 years ago
"time"
)
const (
RecookThirdPartySupplyStatusNone = 1 // 未入库
RecookThirdPartySupplyStatusAdopt = 2 // 已入库
RecookThirdPartySupplySupplyStatusUp = 1 // 上架
RecookThirdPartySupplySupplyStatusDown = 2 // 下架
3 years ago
RecookThirdPartySupplyVendorId = 4000
3 years ago
)
type RecookThirdPartySupply struct {
Id uint `gorm:"column:id"`
SupplySkuId uint // 供应链商品id
Name string // sku名称
BrandId uint // 供应链品牌id
BrandName string // 品牌名称
ThirdPartySupplyCategoryId uint // 分类表id
ThirdPartySupplyCategory RecookThirdPartySupplyCategory `gorm:"foreignKey:ThirdPartySupplyCategoryId"`
FirstCategoryId uint // 一级分类id
FirstCategoryName string // 一级分类名称
SecondCategoryId uint // 二级分类id
SecondCategoryName string // 二级分类名称
ThirdCategoryId uint // 三级分类id
ThirdCategoryName string // 三级分类名称
Price decimal.Decimal // 供货家
GuidePrice decimal.Decimal // 建议售价
ImgUrl string // 商品主图
Profit decimal.Decimal // 利润
Size string // 尺寸
Color string // 颜色
Tax string // 税率
Unit string // 销售单位
UpcCode string // upc码
TaxName string // 税收名称
TaxCode string // 税收编码
Content string // 商品详情
Status uint // 状态 1=未入库 2=已入库
SupplyStatus uint // 供应链状态 1=上架 2=下架
GoodsId uint // 瑞库客商品id
3 years ago
SkuId uint // 瑞库客skuId
Sku goods.RecookGoodsSkuModel `gorm:"foreignKey:SkuId"`
3 years ago
Imgs []RecookThirdPartySupplyImg `gorm:"foreignKey:SupplySkuId;references:SupplySkuId"`
Specifications []RecookThirdPartySupplySpecification `gorm:"foreignKey:SupplySkuId;references:SupplySkuId"`
CreatedAt time.Time
UpdatedAt time.Time
}
func (r *RecookThirdPartySupply) TableName() string {
return "recook_third_party_supply"
}