Business/Process logic for deleting/editing without affecting current records
Hi guys,
Take for example a relationship between a concert and venue scenario.
#An event organizer books a venue (Hall A) at $400 dollar a day, for 3 days. It will sum up to $1200. These records will be saved on the database with reference to Venue_ID - 1.
#when the venue_owner deletes/edit the record (Hall A).
#delete scenario- The delete action will remove the booked record and it will clear away the records made by the event organizer.
#edit scenario - The venue_owner increase the price to $800 a day, they will cause the price of the venue to sum up to $2400 without him/her knowing.
I know that this is definitely not the way to implement the logic. So if anyone have a good idea how can i allow edit/delete without affecting the event organizer that has made booking of the venue. Please advice me.
price for a pre-existing booking should be calculated at the time of the booking, and stored along with it, not tied to the rental price and calculated on the fly -- unless that is expected. If there is a 'prices are subject to change' policy, then that might be a desired behavior.
As for the deletion, if a venue owner deletes a venue, then shouldn't any pre-existing booking be removed as well? To me that would signify going out of business, or demolition of the property, something like that.
If, instead they simply need to make it unavailable so that they can do renovations or something, then there should just be a way to unpublish, no need to delete.