Home > Backend Development > PHP Tutorial > How to design the database of red envelopes (coupons)?

How to design the database of red envelopes (coupons)?

WBOY
Release: 2016-07-06 13:51:21
Original
3718 people have browsed it

I want to design a red envelope database. How to design it? Please give me some guidance. The red envelope is the kind where you get one yuan off when you spend 5 yuan or more. It expires within seven days.
It is a mall system, redeem coupons.

Reply content:

I want to design a red envelope database. How to design it? Please give me some guidance. The red envelope is the kind where you get one yuan off when you spend 5 yuan or more. It expires within seven days.
It is a mall system, redeem coupons.

Is it a mall system? This should be a kind of coupon, the type is full discount coupon

This requires designing a promotion rules engine

Rules Plan
Reduced x yuan if you spend x yuan
Contains x product and get points
Does not include x product, free shipping

<code>                    送赠品
                   送优惠券</code>
Copy after login

They are a one-to-many relationship, any rule should have multiple solutions
This is the promotion design I have seen in Shangpai Ecstore mall, it is very complicated
I have 3 years of PHP experience. I don’t even fully understand their source code

Database fields

id (self-increasing ID) name (coupon name) rule (rule) soule (plan) start_time (start time) end_time (end time) status (whether enabled)
This data table is enough for a small mall

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template