Skip to content

Commit

Permalink
feat: add an attention section to the new article
Browse files Browse the repository at this point in the history
  • Loading branch information
Gowtham1729 committed Dec 12, 2023
1 parent e0b2ca6 commit e379f60
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Generated by Django 4.2.7 on 2023-12-12 10:46

from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("news", "0007_alter_news_img_src_url_alter_news_sentiment_and_more"),
]

operations = [
migrations.AddField(
model_name="news",
name="need_attention",
field=models.BooleanField(default=False),
),
migrations.AddField(
model_name="news",
name="reason",
field=models.TextField(null=True),
),
migrations.AlterField(
model_name="news",
name="sentiment",
field=models.IntegerField(default=0),
),
]
4 changes: 3 additions & 1 deletion applications/backend/django_server/news/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ class News(models.Model):

publish_time = models.DateTimeField()

sentiment = models.IntegerField()
sentiment = models.IntegerField(default=0)
need_attention = models.BooleanField(default=False)
reason = models.TextField(null=True)

class Meta:
unique_together = ("symbol", "headline")
Expand Down

0 comments on commit e379f60

Please sign in to comment.