# Generated by Django 5.2.13 on 2026-05-17 19:31

import django.db.models.deletion
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ("rims_grants", "0036_cs016_cs020_doc_kind_submission_settings"),
    ]

    operations = [
        migrations.AddField(
            model_name="grantcall",
            name="auto_close_confirmed_at",
            field=models.DateTimeField(
                blank=True,
                help_text="Set when the administrator acknowledges the auto-close behaviour at publish time.",
                null=True,
            ),
        ),
        migrations.CreateModel(
            name="CallNotificationConfig",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                (
                    "publication_notify_enabled",
                    models.BooleanField(
                        default=True,
                        help_text="When enabled, dispatch a notification to potential applicants on publish.",
                    ),
                ),
                (
                    "reminder_intervals_days",
                    models.JSONField(
                        blank=True,
                        default=list,
                        help_text="Days-before-deadline at which to remind in-progress applicants. e.g. [7, 1].",
                    ),
                ),
                (
                    "acknowledgement_enabled",
                    models.BooleanField(
                        default=True,
                        help_text="When enabled, send an acknowledgement notification to the applicant on submit.",
                    ),
                ),
                ("updated_at", models.DateTimeField(auto_now=True)),
                (
                    "call",
                    models.OneToOneField(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="notification_config",
                        to="rims_grants.grantcall",
                    ),
                ),
            ],
        ),
    ]
