How to design base rates?

Good day
Tell me how to design database under this task:
There is a fitness club with pool and gym
At the fitness club there are 4 rates, for example - here's one: within 30 days available 30 hours 60 hours pool and gym
The user first registers and then selects the immediately rate
The problem of fixing the clock that the user spent in the pool or at the gym - leave beyond

Actually the easy part of BD is 2 tablets: users, tariffs
The relationship user->tariff - one-to-many

But then I'm odd blunt...
How and where to store:
- selected by the user tariff
the remaining quota according to the tariff for the user ?
At the moment the rate is only 2 points - the clock in the gym and in the pool - but not the fact that still and will remain...
March 20th 20 at 11:39
1 answer
March 20th 20 at 11:41

Has everything you need

Find more questions by tags MySQLDatabase design