wokring final build version
This commit is contained in:
40
backend/notifications/migrations/0001_initial.py
Normal file
40
backend/notifications/migrations/0001_initial.py
Normal file
@@ -0,0 +1,40 @@
|
||||
# Generated by Django 5.2.7 on 2026-06-10 17:13
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Notification',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('is_deleted', models.BooleanField(default=False)),
|
||||
('deleted_at', models.DateTimeField(blank=True, null=True)),
|
||||
('title', models.CharField(help_text='Předmět oznámení.', max_length=200)),
|
||||
('text', models.TextField(help_text='Obsah oznámení.')),
|
||||
('notification_type', models.CharField(choices=[('system', 'Systém'), ('order', 'Objednávka'), ('payment', 'Platba'), ('social', 'Sociální'), ('chat', 'Chat'), ('advertisement', 'Inzerát')], default='system', help_text='Kategorie oznámení — používá se pro ikonky a filtrování na frontendu.', max_length=20)),
|
||||
('action_url', models.CharField(blank=True, help_text="Volitelný odkaz na detail (např. '/objednavky/123/').", max_length=500, null=True)),
|
||||
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||
('bulk', models.BooleanField(default=False, help_text='True, pokud bylo oznámení vytvořeno hromadně pro více uživatelů.')),
|
||||
('is_read', models.BooleanField(default=False)),
|
||||
('read_at', models.DateTimeField(blank=True, null=True)),
|
||||
('send_email', models.BooleanField(default=False, help_text='True, pokud byl zároveň odeslán e-mail.')),
|
||||
('email_subject', models.CharField(blank=True, max_length=255, null=True)),
|
||||
('email_template_path', models.CharField(blank=True, max_length=255, null=True)),
|
||||
('user', models.ForeignKey(help_text='Příjemce oznámení.', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='notifications', to=settings.AUTH_USER_MODEL)),
|
||||
],
|
||||
options={
|
||||
'ordering': ['-created_at'],
|
||||
},
|
||||
),
|
||||
]
|
||||
Reference in New Issue
Block a user