title: Per user soft-delete model design in Django
body: <p>I am designing an application where users send/receive records and I would like deletes to be separated for each user listed in the record (one user's delete will not hide the record from the other user).</p>
  
  <p>My base model design looks like this:</p>
  
  <pre><code>class BasePrivateMessage(TimeStampedModel):
      accepted = models.NullBooleanField(default=None, null=True, blank=True)
      # fields in question 
      archived_by_recipient = models.BooleanField(default=False)
      archived_by_sender = models.BooleanField(default=False)
  
      read = models.BooleanField(default=False,
                                 help_text='Recipient has viewed.')
      recipient = models.ForeignKey('accounts.CommonUserProfile',
                                related_name='%(class)s_received')
  
      sender = models.ForeignKey('accounts.CommonUserProfile',
                                 related_name='%(class)s_sent')
      message_body = models.TextField()
  </code></pre>
  
  <p>Would it be an improvement to replace the <code>archived_by_xxxx</code> fields with a <code>ManyToManyField</code> to <code>accounts.CommonUserProfile</code> that is responsible for storing a list of users who have hidden (soft-deleted) the record? It seems that would make client-side code simpler down the line. How is soft-delete typically implemented on a per-user basis?</p>