sile9t
sile9t
CC#
Created by sile9t on 9/15/2024 in #help
The good way to store user info
I'm making a web app for apartment reservation and i have those models: user, apartment(has fk user), reservationDate(pk is date+apartmentId, fks: user, who reserved this date, and occupancy, to what associates this date), occupancy(fks: reservedBy, apartment, and collection of reserved dates). First I display apartments list that fits to the requested date range (in the service I filter query to get apartments with requested dates in 'empty' state). When user choose an apartment from apartments list and then hits reserve button, I want to create a new occupancy instance and change dates states to 'reserved' (there only 2 states: 'empty' and 'reserved') and add wire this occupancy to user. So, how should I store user info? Should I store only id and where?
28 replies