I'm currently going to begin a new project to help with Complaints. I have worked out all the fields etc.. but in doing so, I've realised I need more than 1 type of Complaint. They are Customer Complaint, Supplier Complaint or Defect Complaint. They share many of the same fields but differ slightly, so I'm not sure how I would design this in a SQL Server database and/or using EF. The application will be an ASP.NET MVC 4 application using C#, so I could take advantage of Code First but as I said, I'm not sure how I'd design these Entities:
All 3 complaint types share the following columns:
ComplaintType (int), Department (int),
Code (int), DefectReference (string), Cause (int)
Customer complaint and supplier complaint share these columns:
ComplaintText (string), Orders (collection), Rectification (string)
Here are columns unique to customer complaint:
AccountNumber (string), CustomerName (string)
And finally, here are fields unique to Supplier Complaint:
SupplierNumber (string), SupplierName (string)
So my questions are:
- How would I approach this creating my Models to use with EF Code First or
- How would I design this using SQL Server?
Thanks
Note: There are more columns (ID's etc..) but I've shortened it for this example.