Untitled

mail@pastecode.io avatar
unknown
django
3 years ago
507 B
3
Indexable
Never
class Notifications(models.model):
    time_created = models.DateTimeField(default=timezone.now)
    n_type = models.CharField(choices=CHOICES)
    video = models.ForeignKey(to=Video, on_delete=models.CASCADE, null=True, blank=True, related_name="related_video")
    comment = models.ForeignKey(to=Video, on_delete=models.CASCADE, null=True, blank=True, related_name="related_comment")
    sender = models.ForeignKey(to=Viber, on_delete=models.CASCADE, null=True, blank=True, related_name="related_sender")