I'm starting work on a new personal project and I'm looking to get advice in regards to setting up my classes.
My base class is a User. The User class will have the following general properties
- User ID
- User Name
- Password
- Address (this will be a complex/value type)
I will then have a Subscriber class which is a User who has chosen to subscribe to a plan that I offer. The Subscriber class will have its own properties in addition to that of the User including:
- Subscriber ID
- Plan ID
- Date Subscribed
- etc
Is inheritance the way to go here with User being the base class or is a foreign key from the Subscriber to User class the better way? If inheritance is preferred then which method? TPH or TPT?
The plan is to have other classes with the User class acting as the base including Participants and Volunteers.
Thanks!