Home  >  Q&A  >  body text

mysql - 优惠券表应该怎么建,求帮助

PHP中文网PHP中文网2742 days ago676

reply all(1)I'll reply

  • 高洛峰

    高洛峰2017-04-17 16:34:15

    I did write about the coupon function when I was making an app before. To put it simply, you need at least two tables for coupons, depending on the complexity of your business.
    1. Basic table, which stores the basic information of coupons. Do not store other fields, such as coupon name, face value, attributes, source, status, etc.;
    2. Association table, coupon ID, coupon usage rules, etc. Of course, this depends on your business. You may need more tables, related products, related users...

    reply
    0
  • Cancelreply