# Generated by Django 4.1.9 on 2023-09-12 18:10

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ("catalogue", "0050_audience_woblink"),
    ]

    operations = [
        migrations.CreateModel(
            name="IsbnPool",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("prefix", models.CharField(max_length=10)),
                ("suffix_from", models.IntegerField()),
                ("suffix_to", models.IntegerField()),
                ("ref_from", models.IntegerField()),
                (
                    "purpose",
                    models.CharField(
                        choices=[("WL", "Wolne Lektury"), ("GENERAL", "Ogólne")],
                        max_length=8,
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="Isbn",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("datestamp", models.DateField()),
                ("suffix", models.IntegerField()),
                ("form", models.CharField(choices=[], max_length=32)),
                (
                    "book",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.PROTECT, to="catalogue.book"
                    ),
                ),
                (
                    "pool",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.PROTECT, to="isbn.isbnpool"
                    ),
                ),
            ],
            options={
                "ordering": ["pool", "suffix"],
                "unique_together": {("pool", "suffix")},
            },
        ),
    ]
