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.
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>
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