Alice52 / project

This repository is muti language and tech integration project.
MIT License
0 stars 0 forks source link

[ec] sku&spu #95

Closed Alice52 closed 3 years ago

Alice52 commented 3 years ago

relation

  1. brand : category: n : n

    • pms_category_brand_relation
  2. category : group: 1 : n

  3. group : attr: n : n

    • group-attr-relation table

group : attr: n : n

  1. attr : product_attr_value: 1 : n[spu_id]
  2. attr : sale_attr_value: 1 : n[sku_id]
  3. sku : spu : n : 1

tables

  1. pms_brand: pms_category_brand_relation
  2. pms_category
  3. pms_attr_group
  4. pms_attr
  5. pms_attr_attrgroup_relation
  6. pms_product_attr_value
  7. pms_sku_sale_attr_value
  8. pms_sku_info: pms_sku_images
  9. pms_sku_image: sku images
  10. pms_spu_info: pms_spu_images, pms_spu_info_desc, pms_spu_comment
Alice52 commented 3 years ago

group : attr: n : n

Alice52 commented 3 years ago

spu

  1. Standard Product Unit: 标准化产品单元, 描述一个产品的特征
  2. 是商品信息聚合的最小单位
  3. 是一组可复用, 易检索的标准化信息的集合
  4. 描述 SPU 的属性被称作基本属性
  5. 比如 iphone12 就是 SPU

sku

  1. Store Keeping Unit: 库存量的最小单位
  2. 在 SPU 的基础上添加 SKU 可以唯一确认一个商品
  3. 描述 SKU 的属性被称作销售属性
  4. 比如: 内存, 颜色 等

基本属性&销售属性

  1. 每个分类下的商品共享规格参数[基本属性], 有些商品可以不使用这些属性
  2. 属性是以三级分类形式组织起来的
  3. 基本属性有些字段可以提供检索功能
  4. 基本属性具有自己的分组
  5. 属性的名字确定, 需要加上商品分类才能确定

表设计

  1. attr: name, catelogId, attr_type
  2. attr_group: id, catelogId
  3. attr_attr_group_rtelation: groupId, attrId 一个分组可以有多个属性[每个 catelog 下, 不同 catelog 数据互不相干]
  4. product_attr_value: spuId, attrId, attrValue 存放基本属性的值
  5. sku_sale_attr_value: skuId, attrId, attrValue 存放销售属性的值 sku:attr => n:n, 相当于是 attr 和 sku 的关联表,且带有 attrValue
  6. sku_info: sku self info
  7. sku_image: sku image info
  8. sku_info: spu self info
Alice52 commented 3 years ago

attr_attr_group_rtelation: groupId, attrId 一个分组可以有多个属性[每个 catelog 下, 不同 catelog 数据互不相干]

其实可以不使用关联表