There is something very relaxing about creating storage classes when you think thru all you want to do and wrap it around in objects.
For the LiftApp I will need to store quite a lot of things:
- A pre-set list of exercises containing:
- Photo of the exercise (Maybe? If I can find something for free)
- A workout containing
- Day and Time of the Workout
- Workout Type – Feeding from a different table with a couple of pre-set types such as Arms, Chest or Running with the ability for the user to add new ones
- % of Goal completed
- A list of Exercises each exercise containing:
- Reference to the Name and Description from the Pre-Set list
List of Sets which should be abstract or an Interface because I will need to implement it in two variants:
So this is the basic design, time get coding I will attach the models folder link on GitHub once I am done :).
I did some remodeling mainly to simplify the model classes not get buried in my own complexity while implementing so the complete Graph for now is:
So the abstract List of sets has now been converted into a solid SetPart that has a count and a unit to it. Realized that to the app itself it really does not matter whether I count reps or seconds that have passed I can do that in the ViewModel :), should simply the SQLite implementation, and make this all overall more readable.
P.S. Just found out I cannot use Entity Framework with iOS :(, oh well the one supplemented with Xamarin is very similar and I should not have too much trouble implementing.