R
R
Rodion Yurchenko2019-05-03 17:35:31
MySQL
Rodion Yurchenko, 2019-05-03 17:35:31

How to design a base with tariffs?

Good afternoon
Tell me how to design the base for such a task:
There is a fitness club with a swimming pool and a gym
The fitness club has 4 tariffs, for example - here is one of them: Within 30 days, 30 hours of the pool and 60 hours of the gym are available
User first registers and then immediately selects the tariff The
problem of fixing the hours that the user spent in the pool or in the gym - let's leave it out of the scope
Actually, the simple part of the database is 2 tables: users, tariffs
Relationships user->tariff - one to
many ...
How and where is it better to store:
- the tariff chosen by the user
- the remaining quota according to the tariff for the user?
At the moment, there are only 2 points in the tariff - hours in the gym and in the pool - but it's not a fact that everything will remain the same ...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Aksentiev, 2019-05-03
@Sanasol

https://github.com/rennokki/plans
Has everything you need

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question