商品SKU设计

淘宝网商品SKU系统设计经验分享
PHP商城 商品模块 数据库 表设计

Refer:

这里写图片描述

    sc_product_categories:
        (product_category_id,   product_category_name,  product_parent_category_id, create_at)
    {
        1,                      coin,           (00 XX XX XX)           0
        2,                      coin_gold,      (00 00 00 00)           1
        3,                      coin_gift,      (00 00 00 01)           1
        4,                      course,         (01 XX XX XX)           0
        5,                      course_math,    (01 00 00 00)           4
        6,                      course_physics, (01 00 00 01)           4
    }

    sc_orders:
        (local_trade_number,    third_trade_number, third_type, pay_price,  pay_status, pay_at, ship_at,    ship_status,    ship_finish_at, ship_number,    ship_type,  order_status create_at, update_at)
    {
        1532517950902           1021532517950902    ali_pay     20          success
    }   

    sc_order_products:
        (order_id,      product_id, sku_id, number_of_products, order_product_price,    product_category_type,  /** is_token_valid **/, create_at, update_at)
    {
        1532517950902   1           1       1                   10                      01000000                true
        1532517950902   1           2       1                   10                      01000000                true
    }

    sc_products:
        (product_id,    product_name,           product_category_type,          is_virtual,     spu_sales,      number_of_upvotes,  number_of_downvotes,    create_at,  update_at)
    {
        1               2018秋季小学六年级数学   01XXXXXX                        true            100             100                 0
    }

    sc_sku:
        (sku_id,    sku_name,                       product_id,         /** course_lecturer_id **/      balance,    price,  sku_values,         still_valid,    create_at)
    {
        1           2018秋季小学六年级数学           1                   0                               infinity    10      [1:1,2:3,4:8]       true
        2           王老师 2018秋季小学六年级数学   1                   1                               infinity    10      [1:1,2:2,3:6,4:8]   true
    }   

    sc_product_properties:
        (property_id,       property_name,  create_at)
    {
        2                   PAY_BY
        4                   COURSE_TYPE
        5                   LECTURER_LEVEL
    }

    sc_product_property_values:
        (property_value_id,     property_id,        property_value_name,    creat_at)
    {
        2                       2                   ALL
        3                       2                   QUARTER
        4                       2                   MONTH
        5                       2                   SCHEDULE
        7                       4                   COURSE_ONE_ON_ONE
        8                       4                   COURSE_ONE_ON_SIX
        9                       5                   LECTURER_EXPERT
        10                      5                   LECTURER_MASTER
        11                      5                   LECTURER_NORMAL
    }

    sc_product_property_relations:
        (sku_id,        property_id,        property_value_id)
    {
        1               1                   1
        1               2                   3
        1               4                   8
        2               1                   1
        2               2                   2
        2               3                   6
        2               4                   8
    }

    sc_course_prototypes:
        course_prototype_id             1
        product_id                      1
        course_name                     '2018秋季小学六年级数学'
        course_content                  '{"统计与概率", "解三角形", "平行向量", "一元二次方程", "三角函数", "不等式", "集合", "三角函数"}'
        course_teaching_material_type   '{"浙教版", "鲁教版", "北师大版", "苏教版", "人教版", "华师大版", "京教版", "湘教版", "冀教版"}'
        for_grade                       6
        number_of_course_schedules      8
        create_at

猜你喜欢

转载自blog.csdn.net/xy707707/article/details/81219756