如何设置此图? (多种销售方式) [英] how to setup this diagram? (multiple selling methods)

查看:258
本文介绍了如何设置此图? (多种销售方式)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我应该创建一种第二品牌的网站。当某人想要出售产品时,他可以选择以以下价格出售产品:

I'm supposed to create a sort of second brand website. When someone wants to sell a product, he has the option to sell it for:


  • 固定金额

  • 免费

  • 竞标

有人可以帮助我如何继续吗?到目前为止,这是我所拥有的,但是我被困住了,不知道如何继续。 (对不起,使用母语,实体是:成员,卖方(排名第一),买方(底部)和产品)。

can anyone give me an assist on how to continue? This is what i have so far, but i'm stuck and don't know how to continue. (sorry for the use of native language, the entities are : member, seller (top one) buyer (bottom one) and products, in that order.

任何形式的帮助都值得赞赏!

any form of help is appreciated!

推荐答案

我真的不知道您的问题出在哪里,但我会考虑:

I really don’t know where your problem is but I would consider:

1)如果买卖双方共享相同类型的信息,那么我只会为用户制作一张桌子来存储它们都。这样,您就有一个唯一的user_id。

1) if buyers and sellers share the same kind of information then I would make just one table for users, to store them both. That way you have a unique user_id.

2)有一个像您一样的商品表,其中指明了Seller_id(用户表的外键)和一个字段,用于指示该商品是直接销售商品还是要出价的商品。

2) have a products table like yours, indicating the seller_id (foreign key to users table) and a field to indicate if it’s a direct sale or product for bidding.

3)有一个用于存储出价的表,指示product_id,buyer_id(用户表的外键)和出价详细信息:金额,日期等。

3) have a table for storing bids, indicating the product_id, buyer_id (foreign key to users table) and bid details: amount, date, etc.

4)有一张购买表,并将其用于两个目标:

4.1)存储产品的直接销售。

4.2 ),用于存储对某项产品进行出价的最终出价所产生的销售。

我将存储product_id,buyer_id,已付款金额,日期,甚至可能存储对bid_id的可选引用。

4) have a table for purchases, and use it for two goals:
4.1) for storing direct sales of products.
4.2) for storing the sale made on the final bid performed on a product for bidding.
I would store the product_id, buyer_id, amount paid, date, and perhaps even an optional reference to a bid_id.

这样,您可以在简单的模型中简化并获得相同类型的信息,易于查询。

That way you can simplify and have the same kind of information in a simple model, easy to query.

我希望对您有所帮助!

这篇关于如何设置此图? (多种销售方式)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆