Add notification
This commit is contained in:
parent
ab59065c0b
commit
de704fc250
17 changed files with 279 additions and 56 deletions
25
judge/migrations/0107_notification.py
Normal file
25
judge/migrations/0107_notification.py
Normal file
|
@ -0,0 +1,25 @@
|
|||
# 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 = [
|
||||
('judge', '0106_friend'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Notification',
|
||||
fields=[
|
||||
('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')),
|
||||
],
|
||||
),
|
||||
]
|
Loading…
Add table
Add a link
Reference in a new issue