I need some help designing Entity Framework Model structure for my current project.
The most basic item in my project is a Job
, which have several properties. The Job
can be either created in the system internaly
or externaly
. In the second case, it has same properties than the normal Job
, but also some additional ones (external reference number, source system etc.). There is also a possiblity to create a BookingJob
, which is in fact the same Job, but again with some other additional properties (Booking Date, Booking User, etc.).
So now we have a Job
, ExternalJob
, which derives from Job
and a BookingJob
which can either derive directly from Job
or from ExternalJob
(because it can be also created from external system).
On the top of that those, jobs can be either created for Maintenance
or Repair
. Those 2 are very different in terms of own properties, although share the same base properties from the Job
and can be either Internal, External or Booking.
So to summarise, what I can have is:
1. Internal Maintenance Job
2. Internal Repair Job
3. Internal Booking Maintenance Job
4. Internal Booking Repair Job
5. External Maintenance Job
6. External Repair Job
7. External Booking Maintenance Job
8. External Booking Repair Job
I'm trying to find a nice design and create an entity model which will be easy to maintain and notvery problemantic to map to ViewModels for my WebAPI, but at the same time, avoid creating one table with unnecessary columns.
Aucun commentaire:
Enregistrer un commentaire