Add support for subscribing to games
This commit is contained in:
parent
c447abc6fe
commit
fabc9d23f6
6 changed files with 134 additions and 10 deletions
29
twitch/migrations/0002_notificationsubscription.py
Normal file
29
twitch/migrations/0002_notificationsubscription.py
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
# Generated by Django 5.2.4 on 2025-08-02 02:08
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('twitch', '0001_initial'),
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='NotificationSubscription',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('notify_found', models.BooleanField(default=False)),
|
||||
('notify_live', models.BooleanField(default=False)),
|
||||
('game', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='twitch.game')),
|
||||
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
|
||||
],
|
||||
options={
|
||||
'unique_together': {('user', 'game')},
|
||||
},
|
||||
),
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue