# Generated by Django 5.2.9 on 2026-02-08 20:05

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


class Migration(migrations.Migration):

    dependencies = [
        ("simulated_trading", "0007_dailyinspectionreportmodel"),
    ]

    operations = [
        migrations.CreateModel(
            name="DailyInspectionNotificationConfigModel",
            fields=[
                ("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
                ("is_enabled", models.BooleanField(default=True, verbose_name="启用邮件通知")),
                (
                    "notify_on",
                    models.CharField(
                        choices=[("warning_error", "仅预警/异常"), ("all", "所有状态")],
                        default="warning_error",
                        max_length=20,
                        verbose_name="触发级别",
                    ),
                ),
                ("include_owner_email", models.BooleanField(default=True, verbose_name="包含账户所有者邮箱")),
                ("recipient_emails", models.JSONField(blank=True, default=list, verbose_name="额外收件人")),
                ("created_at", models.DateTimeField(auto_now_add=True, verbose_name="创建时间")),
                ("updated_at", models.DateTimeField(auto_now=True, verbose_name="更新时间")),
                (
                    "account",
                    models.OneToOneField(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="inspection_notification_config",
                        to="simulated_trading.simulatedaccountmodel",
                        verbose_name="所属账户",
                    ),
                ),
            ],
            options={
                "verbose_name": "模拟盘巡检通知配置",
                "verbose_name_plural": "模拟盘巡检通知配置",
                "db_table": "simulated_daily_inspection_notify_config",
            },
        ),
    ]
