# Generated by Django 4.2.13 on 2024-06-25 16:40

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ("contenttypes", "0002_remove_content_type_name"),
    ]

    operations = [
        migrations.CreateModel(
            name="NamedSerialNumber",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "name",
                    models.CharField(blank=True, max_length=50, verbose_name="name"),
                ),
                (
                    "next_counter",
                    models.IntegerField(default=1, verbose_name="next counter"),
                ),
                ("step", models.IntegerField(default=1, verbose_name="step")),
                ("prefix", models.CharField(max_length=10, verbose_name="prefix")),
                ("width", models.IntegerField(verbose_name="number width")),
                (
                    "content_type",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="contenttypes.contenttype",
                    ),
                ),
            ],
        ),
        migrations.AddConstraint(
            model_name="namedserialnumber",
            constraint=models.UniqueConstraint(
                fields=("name", "content_type"), name="unique_name_for_content_type"
            ),
        ),
    ]
