Add: PostDescription model to archive app

This commit is contained in:
Aroy-Art 2025-03-13 18:29:59 +01:00
parent 4dd76d6ae3
commit c1bc51736d
Signed by: Aroy
GPG key ID: 583642324A1D2070

View file

@ -49,6 +49,14 @@ class DescriptionModel(models.Model):
def __str__(self): def __str__(self):
return str(self.hash) return str(self.hash)
class PostDescription(models.Model):
post = models.ForeignKey("PostModel", on_delete=models.CASCADE)
description = models.ForeignKey(DescriptionModel, on_delete=models.CASCADE)
date_imported = models.DateTimeField(auto_now_add=True)
class PostModel(models.Model): class PostModel(models.Model):
post_id = models.CharField(max_length=128, db_index=True) post_id = models.CharField(max_length=128, db_index=True)
title = models.CharField(max_length=64) title = models.CharField(max_length=64)