I have searched a lot in SO and SE but I did not get anything particularly about this kind of database design with coupon codes included. Please take a look at this problem.
I am developing a website in which I sell a service. People buy this service in advance (Pre-paid).
I sell that service in four plans
3 months plan,
6 months plan and
But as encouragement for people to use my service initially, I want to give them a free coupon code(One or more). So that they can redeem in their accounts and use.
Coupons codes can be
Monthly Coupon Code,
2 months Coupon Code,
3 months Coupon Code and so on.
Each account will have an
account_id in the user table.
I am struggling a lot to link This subscription model to coupons and Plans. I am a beginner at this kind of database design. Put me in a correct path.