# Generated by Django 2.0.7 on 2018-07-15 09:29

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


class Migration(migrations.Migration):

    dependencies = [
        ('catalog', '0013_auto_20180715_1457'),
    ]

    operations = [
        migrations.CreateModel(
            name='Loan',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('loanStart', models.DateField(blank=True, null=True, verbose_name='Дата сдачи')),
                ('loanDuration', models.PositiveSmallIntegerField(blank=True, null=True, validators=[django.core.validators.MaxValueValidator(30)], verbose_name='Срок сдачи')),
            ],
        ),
        migrations.RemoveField(
            model_name='copy',
            name='loanDuration',
        ),
        migrations.RemoveField(
            model_name='copy',
            name='loanStart',
        ),
        migrations.RemoveField(
            model_name='copy',
            name='student',
        ),
        migrations.AddField(
            model_name='loan',
            name='book',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='catalog.Copy'),
        ),
        migrations.AddField(
            model_name='loan',
            name='student',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='catalog.Student', verbose_name='Студент'),
        ),
    ]
