# Generated by Django 4.2.15 on 2025-02-13 01:38

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


class Migration(migrations.Migration):
    initial = True

    dependencies = [
        ("note", "0007_alter_note_polymorphic_ctype_and_more"),
    ]

    operations = [
        migrations.CreateModel(
            name="Bde",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("name", models.CharField(max_length=255, verbose_name="name")),
                ("date_start", models.DateTimeField(verbose_name="date start")),
                ("date_end", models.DateTimeField(verbose_name="date end")),
            ],
            options={
                "verbose_name": "BDE",
                "verbose_name_plural": "BDE",
            },
        ),
        migrations.CreateModel(
            name="Wrapped",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "generated",
                    models.BooleanField(default=False, verbose_name="generated"),
                ),
                ("public", models.BooleanField(default=False, verbose_name="public")),
                (
                    "data_json",
                    models.TextField(
                        default="{}",
                        help_text="data in the wrapped and generated by the script generate_wrapped",
                        verbose_name="data json",
                    ),
                ),
                (
                    "bde",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.PROTECT,
                        related_name="+",
                        to="wrapped.bde",
                        verbose_name="bde",
                    ),
                ),
                (
                    "note",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.PROTECT,
                        related_name="+",
                        to="note.note",
                        verbose_name="note",
                    ),
                ),
            ],
            options={
                "verbose_name": "Wrapped",
                "verbose_name_plural": "Wrappeds",
                "unique_together": {("note", "bde")},
            },
        ),
    ]
