V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
changsha
V2EX  ›  问与答

商品表与国家的关系?

  •  
  •   changsha · Oct 11, 2014 via iPhone · 3482 views
    This topic created in 4215 days ago, the information mentioned may be changed or developed.
    商品表
    id name price

    分类表
    id name

    国家表
    id code

    从中国cn发货到us,jp
    us,jp 根据cn进行信息本地化,name、price。然后放到不同的货架上(分类)

    发货到uk
    uk 发现 us (产品介绍)很适合自己 只是售价不同,调整一下price,放到相同货架上。

    怎么实现商品信息存储?以及信息共享?(us-uk)
    4 replies    2014-10-11 20:49:46 +08:00
    changsha
        1
    changsha  
    OP
       Oct 11, 2014
    不要在乎我的头像
    11
        2
    11  
       Oct 11, 2014
    block
    scusjs
        3
    scusjs  
       Oct 11, 2014
    @changsha 挠死
    KiseXu
        4
    KiseXu  
       Oct 11, 2014
    代表国家的code是唯一的,可以直接用来当id,不需要code字段。

    商品表加个country字段,如商品1:
    id name price country
    1 鸡蛋 6 cn

    发到us后就是:
    id name price country
    2 egg 1 us

    如果要记录发货关系,再建个表记录商品id关联
    id from to time
    1 1 2 xxxx...
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5363 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 76ms · UTC 01:21 · PVG 09:21 · LAX 18:21 · JFK 21:21
    ♥ Do have faith in what you're doing.