# Generated by Django 3.1.3 on 2020-11-14 16:11

import django.contrib.sites.managers
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone


class Migration(migrations.Migration):

    dependencies = [
        ("sites", "0002_alter_domain_unique"),
        ("contenttypes", "0002_remove_content_type_name"),
        ("core", "0007_dashboard_widget_order"),
    ]

    operations = [
        migrations.CreateModel(
            name="DataCheckResult",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("extended_data", models.JSONField(default=dict, editable=False)),
                (
                    "check",
                    models.CharField(
                        choices=[], max_length=255, verbose_name="Related data check task"
                    ),
                ),
                ("object_id", models.CharField(max_length=255)),
                ("solved", models.BooleanField(default=False, verbose_name="Issue solved")),
                ("sent", models.BooleanField(default=False, verbose_name="Notification sent")),
                (
                    "content_type",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE, to="contenttypes.contenttype"
                    ),
                ),
                (
                    "site",
                    models.ForeignKey(
                        default=1,
                        editable=False,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="sites.site",
                    ),
                ),
            ],
            options={
                "permissions": (
                    ("run_data_checks", "Can run data checks"),
                    ("solve_data_problem", "Can solve data check problems"),
                ),
                "verbose_name": "Data check result",
                "verbose_name_plural": "Data check results",
            },
            managers=[("objects", django.contrib.sites.managers.CurrentSiteManager()),],
        ),
    ]
