# Generated by Django 5.1.2 on 2024-11-03 17:08

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ("django_pylabels", "0003_rename_updated_labelspecification_modified"),
    ]

    operations = [
        migrations.CreateModel(
            name="LabelSpecification",
            fields=[],
            options={
                "proxy": True,
                "indexes": [],
                "constraints": [],
            },
            bases=("django_pylabels.labelspecification",),
        ),
        migrations.CreateModel(
            name="Drawing",
            fields=[
                (
                    "name",
                    models.CharField(
                        help_text="This is the stored value, required",
                        max_length=250,
                        unique=True,
                        verbose_name="Stored value",
                    ),
                ),
                (
                    "plural_name",
                    models.CharField(max_length=250, null=True, verbose_name="Plural name"),
                ),
                (
                    "display_name",
                    models.CharField(
                        help_text="(suggest 40 characters max.)",
                        max_length=250,
                        unique=True,
                        verbose_name="Name",
                    ),
                ),
                (
                    "display_index",
                    models.IntegerField(
                        default=0,
                        help_text="Index to control display order if not alphabetical, not required",
                        verbose_name="display index",
                    ),
                ),
                (
                    "field_name",
                    models.CharField(
                        blank=True,
                        editable=False,
                        help_text="Not required",
                        max_length=25,
                        null=True,
                    ),
                ),
                ("extra_value", models.CharField(max_length=250, null=True)),
                (
                    "version",
                    models.CharField(default="1.0", editable=False, max_length=35),
                ),
                ("id", models.AutoField(primary_key=True, serialize=False)),
            ],
            options={
                "verbose_name": "Drawing callables",
                "verbose_name_plural": "Drawings callables",
                "abstract": False,
                "default_permissions": (
                    "add",
                    "change",
                    "delete",
                    "view",
                    "export",
                    "import",
                ),
                "indexes": [
                    models.Index(
                        fields=["display_index", "display_name"],
                        name="edc_pylabel_display_00eed7_idx",
                    )
                ],
            },
        ),
        migrations.CreateModel(
            name="Label",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("name", models.CharField(max_length=25, unique=True)),
                ("drawing_callable_name", models.CharField(max_length=25)),
                (
                    "label_specification",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.PROTECT,
                        to="django_pylabels.labelspecification",
                    ),
                ),
            ],
            options={
                "verbose_name": "Label",
                "verbose_name_plural": "Labels",
            },
        ),
    ]
