Add: PostDescription model to archive app
This commit is contained in:
parent
4dd76d6ae3
commit
c1bc51736d
1 changed files with 8 additions and 0 deletions
|
@ -49,6 +49,14 @@ class DescriptionModel(models.Model):
|
|||
|
||||
def __str__(self):
|
||||
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):
|
||||
post_id = models.CharField(max_length=128, db_index=True)
|
||||
title = models.CharField(max_length=64)
|
||||
|
|
Loading…
Add table
Reference in a new issue