Changes in PublicationCache model

This commit is contained in:
Óscar M. Lage 2024-11-14 18:09:25 +01:00
parent 1dd2aeb7eb
commit 15337cfe58
2 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,28 @@
# Generated by Django 5.1.3 on 2024-11-14 16:53
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='publicationcache',
name='author_name',
field=models.CharField(default='', max_length=255, verbose_name='Author Name'),
),
migrations.AddField(
model_name='publicationcache',
name='cid',
field=models.CharField(default='', max_length=255, verbose_name='CID'),
),
migrations.AddField(
model_name='publicationcache',
name='uri',
field=models.CharField(default='', max_length=255, verbose_name='URI'),
),
]

View File

@ -32,7 +32,10 @@ class PublicationCache(models.Model):
related_name="cached_publications") related_name="cached_publications")
content = models.TextField("Content") content = models.TextField("Content")
author = models.CharField("Author", max_length=255) author = models.CharField("Author", max_length=255)
author_name = models.CharField("Author Name", default="", max_length=255)
published_at = models.DateTimeField("Published At") published_at = models.DateTimeField("Published At")
uri = models.CharField("URI", default="", max_length=255)
cid = models.CharField("CID", default="", max_length=255)
is_unread = models.BooleanField("Unread", default=True) is_unread = models.BooleanField("Unread", default=True)
def mark_as_read(self): def mark_as_read(self):