Files
workdock-platform/backend/workflows/migrations/0022_notificationrule.py
2026-03-19 10:22:20 +01:00

35 lines
1.7 KiB
Python

# Generated by Django 5.1.5 on 2026-03-10 12:47
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('workflows', '0021_workflowconfig_email_account_and_more'),
]
operations = [
migrations.CreateModel(
name='NotificationRule',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=120)),
('is_active', models.BooleanField(default=True)),
('event_type', models.CharField(choices=[('onboarding', 'Onboarding'), ('offboarding', 'Offboarding')], max_length=20)),
('field_name', models.CharField(blank=True, max_length=80)),
('operator', models.CharField(choices=[('always', 'Immer'), ('contains', 'Enthält'), ('equals', 'Ist gleich'), ('is_true', 'Ist aktiv/Ja'), ('is_false', 'Ist inaktiv/Nein')], default='always', max_length=20)),
('expected_value', models.CharField(blank=True, max_length=255)),
('recipients', models.TextField(help_text='Mehrere E-Mail-Adressen mit Komma, Semikolon oder Zeilenumbruch trennen.')),
('template_key', models.CharField(blank=True, max_length=60)),
('custom_subject', models.CharField(blank=True, max_length=255)),
('custom_body', models.TextField(blank=True)),
('include_pdf_attachment', models.BooleanField(default=False)),
('sort_order', models.PositiveIntegerField(default=0)),
],
options={
'ordering': ['event_type', 'sort_order', 'id'],
},
),
]