domser2002 / dotnet-webapp

0 stars 0 forks source link

Add Request to database and repositories #41

Open zuzwoj opened 9 months ago

zuzwoj commented 9 months ago

Branch: request_repository I list all the changes I've made because it escalated as it wasn't viable to make some of the repository changes without modifying anything else. Added:

  1. Requests table (+ indexes)
  2. IRequestRepository
  3. FakeRequestRepository
  4. RequestRepository
  5. DB integration test for inserting into Request table
  6. void AddRequest(string userID, Request request) function to IUserRepository (User can add Request to their account) and its implementations
  7. Parameterless Request constructor (for convenience for creating fake data in fake repositories/ data seeding)
  8. ContactInformation constructor taking a User instance

Changed:

  1. DatabaseSeeding inserts data into Request table
  2. Auth0Id column in Users table is explicitly marked as unique to work as a foreign key to Requests table, DB integration test for inserting into Users ensures it's inserting a User with a unique Auth0Id
  3. User model now has a list of requests rather than a list of inquiries (+ necessary changes in User repositories)
  4. Request class now has a ContactInformation Owner field
domser2002 commented 9 months ago

Looks fine for me

MatthewCloudy commented 9 months ago

Ok

domser2002 commented 9 months ago

does not compile - needs to be fixed before merging