NDOJ/judge/migrations/0107_notification.py

52 lines
1.6 KiB
Python
Raw Normal View History

2020-07-03 02:50:31 +00:00
# Generated by Django 2.2.12 on 2020-07-03 01:16
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
2022-05-14 17:57:27 +00:00
("judge", "0106_friend"),
2020-07-03 02:50:31 +00:00
]
operations = [
migrations.CreateModel(
2022-05-14 17:57:27 +00:00
name="Notification",
2020-07-03 02:50:31 +00:00
fields=[
2022-05-14 17:57:27 +00:00
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
(
"time",
models.DateTimeField(auto_now_add=True, verbose_name="posted time"),
),
("read", models.BooleanField(default=False, verbose_name="read")),
("category", models.CharField(max_length=10, verbose_name="category")),
(
"comment",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
to="judge.Comment",
verbose_name="comment",
),
),
(
"owner",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="notifications",
to="judge.Profile",
verbose_name="owner",
),
),
2020-07-03 02:50:31 +00:00
],
),
]