Chirag4904 / timetable

0 stars 2 forks source link

add api: remove teacher from database #111

Open RoguedBear opened 1 year ago

RoguedBear commented 1 year ago

when removing the teacher, remove them from

RoguedBear commented 1 year ago

@Chirag4904 do we future proof the deleting part by add a undo feature already? mark the teacher as "deleted", dont remove them from teachers collection, but remove from subjects and allotments and after a few days, actually delete the teacher from collection

Chirag4904 commented 1 year ago

sounds interesting like will it automatically delete after few days or the admin will have to delete the teacher again?

RoguedBear commented 1 year ago

we can do the deletion when the teacher API will be called

Chirag4904 commented 1 year ago

we can do the deletion when the teacher API will be called

ok so like we can add a property like toBeDeleted to that teacher along with condition that if the current time is more than X days than the last updated time of that teacher then totally remove that teacher. Something like that?

RoguedBear commented 1 year ago

yes, exactly like that. but ig, if the proj goes to production for real then maybe then that could be added as an improvement. i'll see.