[Answer]-Per user soft-delete model design in Django

1πŸ‘

βœ…

I don’t think there is a general industry-standard solution for this. Just do whatever you feel will get the job done for you specific application.

From what I understood, your message can only be viewed by a sender as well as a recipient, in which case I see no reason to add a M2M field. It will only slow down your application as it will use extra resources to do the extra lookups. However if you will need to extend you application where many users will be able to see a single message (e.g. group conversation), then it would make sense to add M2M field.

Bottom line is do whatever fits you application needs. Like always, its a compromise between abstraction (more flexibility) to performance.

πŸ‘€miki725

Leave a comment