I'm trying to find the best implementation of class diagram and database structure for football court management. The system have three actors:
- Super Admin : manage everything with all privileged (web back-office)
- Court Owner : can create a Football Club that may have more than one stadium (web back-office)
- Player: who can review a club and book an available stadium (mobile)
My problems are :
Since the three actors have the same properties, I don't need the "extend" relation between "user" and "owner", "player", "admin", but also I can't only have the class "user" because not all users can submit a review and only the owner can add a club... so how to manage the privilege of different users who have the same properties ? and do I need the User group table that can help me to know the group of each user ("owner", "admin", "player") ? (I see that Joomla and Wordpress use a user group table)
The Club can have many stadiums (courts) in the majority of cases they are identical so should In my solution bellow is it correct to have two classes "club" and "stadium" and put the common information (city , latitude, longitude) inside the class "club" ?
Take in consideration that player can book a stadium of a club and the club have another available stadiums that can be booked is my solution bellow correct ?
Please I need your guidance and suggestion of the best implementation for a football clubs management where:
- There is three actors ("player", "admin", "club owner")
- Each actor have different privileged (only owner can create a club, only player can book and review...)
Avery Club can have many stadiums and player can book one of them or many, and we need to keep track of the availability of other stadiums of the same club.
Here is what I have tried:
Edit link : https://creately.com/diagram/iaqn8ddo/T1IfqHRrhGcHYPihjOwMIQSwM%3D
View Link : http://creately.com/diagram/example/iaqn8ddo/Copy%2Bof%2BTakwira
Does not look too bad.
Owner
has acreateClub()
method andPlayer
hasbook()
etc.Booking
class that keeps track of the bookings made byPlayer
One observation: the composition from
Stadium
(you have a typo in the name) toSportsClub
does not seem to make sense. A club is not composed of stadiums. In best case it's composed of members. Replace it with an association and useownedStadium
as role.