我正在尝试在Django中实现关注者系统。我做到了
class FollowBridge(models.Model):
follower = models.ForeignKey(User, on_delete= models.CASCADE, related_name= 'm_follower')
followed = models.ForeignKey(User, on_delete= models.CASCADE, related_name= 'm_followed')
date = models.DateTimeField(auto_now_add = True)
def __str__(self):
return f'{self.follower} and {self.followed}'
每个跟随活动都记录在dB中。我的问题是,从长期来看,我的方法对数据库健康吗?