# Generated by Django 3.1 on 2020-09-03 22:23

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('books', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Property_Publishing_house',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=30, verbose_name='Publishing_house')),
            ],
            options={
                'verbose_name': 'Publisher',
                'verbose_name_plural': 'Publishing House',
                'db_table': 'Publishing_house',
            },
        ),
        migrations.CreateModel(
            name='Property_Status',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(choices=[('Available', 'Available'), ('Unavailable', 'Unavailable')], max_length=20)),
            ],
            options={
                'verbose_name': 'Status',
                'verbose_name_plural': 'Property Status',
                'db_table': 'Property_Status',
            },
        ),
        migrations.CreateModel(
            name='Property_book',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('year', models.PositiveIntegerField(help_text='Use the following format: <YYYY>', validators=[django.core.validators.MinValueValidator(1700), django.core.validators.MaxValueValidator(2020)])),
                ('serial_number', models.CharField(max_length=20, verbose_name='S/N')),
                ('rack', models.CharField(max_length=10, verbose_name='rack №')),
                ('shelf', models.BigIntegerField(verbose_name='shelf №')),
                ('property_Publishing_house', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='property_book.property_publishing_house', verbose_name='Publisher')),
                ('property_status', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='property_book.property_status', verbose_name='status')),
                ('title', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='books.books', verbose_name='book')),
            ],
            options={
                'verbose_name': 'Property Book',
                'verbose_name_plural': 'Property Books',
                'db_table': 'Property_books',
            },
        ),
    ]
