manuals icon indicating copy to clipboard operation
manuals copied to clipboard

用户、订单、套餐商品该如何关联呢?

Open itcuihao opened this issue 5 years ago • 8 comments

想是不是可以有个用户套餐关联的表,

table user_meal
column: user_id,order_id,meal_id

还是直接在订单表关联呢

table order
column: order_id, user_id, meal_id

大家这种关联关系倾向于那种呢?

itcuihao avatar Jul 02 '19 02:07 itcuihao

订单表 最好不要做这种关联字段

------------------ 原始邮件 ------------------ 发件人: "haoc7"[email protected]; 发送时间: 2019年7月2日(星期二) 上午10:25 收件人: "skr-shop/manuals"[email protected]; 抄送: "Subscribed"[email protected]; 主题: [skr-shop/manuals] 用户、订单、套餐商品该如何关联呢? (#19)

想是不是可以有个用户套餐关联的表, table user_meal column: user_id,order_id,meal_id
还是直接在订单表关联呢 table order column: order_id, user_id, meal_id
大家这种关联关系倾向于那种呢?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

cullenx avatar Jul 02 '19 06:07 cullenx

我觉得这主要看业务需求,我一般多对多关系才有中间表(就是第一种),一对一,一对多时就用一张表关联(第二种)。

almas1992 avatar Jul 02 '19 07:07 almas1992

订单表 最好不要做这种关联字段 ------------------ 原始邮件 ------------------ 发件人: "haoc7"[email protected]; 发送时间: 2019年7月2日(星期二) 上午10:25 收件人: "skr-shop/manuals"[email protected]; 抄送: "Subscribed"[email protected]; 主题: [skr-shop/manuals] 用户、订单、套餐商品该如何关联呢? (#19) 想是不是可以有个用户套餐关联的表, table user_meal column: user_id,order_id,meal_id 还是直接在订单表关联呢 table order column: order_id, user_id, meal_id 大家这种关联关系倾向于那种呢? — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

期待订单中心更新呀,因为我们现在接触的业务都是虚拟商品,后续可能有周边实体商品,要考量下订单表和订单明细的设计。

itcuihao avatar Jul 04 '19 09:07 itcuihao

我会帮你催相关的大佬。不过目前七月是没有希望了

helei112g avatar Jul 06 '19 09:07 helei112g

都快过年了,更新吧~

xmaxing avatar Nov 20 '19 09:11 xmaxing

哈哈哈

TIGERB avatar Nov 20 '19 10:11 TIGERB

@xmaxing 今天我们更新了

helei112g avatar Dec 09 '19 07:12 helei112g

欧力给

chunpat avatar Jan 10 '20 09:01 chunpat