# Generated by Django 3.2.12 on 2022-03-14 10:14

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

import cms.models.fields
import filer.fields.image


class Migration(migrations.Migration):

    dependencies = [
        ("publicbody", "0039_publicbody_alternative_emails"),
        migrations.swappable_dependency(settings.FILER_IMAGE_MODEL),
        ("cms", "0022_auto_20180620_1551"),
        ("froide_govplan", "0004_auto_20220311_2330"),
    ]

    operations = [
        migrations.CreateModel(
            name="GovernmentPlanSection",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("title", models.CharField(max_length=255, verbose_name="title")),
                (
                    "slug",
                    models.SlugField(max_length=255, unique=True, verbose_name="slug"),
                ),
                (
                    "description",
                    models.TextField(blank=True, verbose_name="description"),
                ),
                (
                    "icon",
                    models.CharField(
                        blank=True,
                        help_text='Enter an icon name from the <a href="https://fontawesome.com/v4.7.0/icons/" target="_blank">FontAwesome 4 icon set</a>',
                        max_length=50,
                        verbose_name="Icon",
                    ),
                ),
                ("order", models.PositiveIntegerField(default=0)),
                ("featured", models.DateTimeField(blank=True, null=True)),
                (
                    "categories",
                    models.ManyToManyField(blank=True, to="publicbody.Category"),
                ),
                (
                    "content_placeholder",
                    cms.models.fields.PlaceholderField(
                        editable=False,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        slotname="content",
                        to="cms.placeholder",
                    ),
                ),
                (
                    "government",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="froide_govplan.government",
                        verbose_name="government",
                    ),
                ),
                (
                    "image",
                    filer.fields.image.FilerImageField(
                        blank=True,
                        default=None,
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        to=settings.FILER_IMAGE_MODEL,
                        verbose_name="image",
                    ),
                ),
            ],
            options={
                "verbose_name": "Government plan section",
                "verbose_name_plural": "Government plan sections",
                "ordering": ("order", "title"),
            },
        ),
    ]
