# Generated by Django 2.1.7 on 2019-08-26 15:44

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Libro',
            fields=[
                ('Autore', models.CharField(max_length=50)),
                ('Nome_Autore', models.CharField(max_length=20)),
                ('Cognome_Autore', models.CharField(max_length=20)),
                ('Titolo_Libro', models.CharField(max_length=100)),
                ('Descrizione', models.CharField(max_length=20)),
                ('Numero_Copie', models.IntegerField(null=True)),
                ('Casa_Editrice', models.CharField(max_length=20)),
                ('DataDiPubblicazione', models.DateField()),
                ('NumeroPagine', models.IntegerField()),
                ('ISBN10', models.IntegerField(primary_key=True, serialize=False)),
                ('ISBN13', models.IntegerField(unique=True)),
                ('Genere', models.CharField(max_length=20)),
                ('image', models.CharField(max_length=100)),
                ('Durata_Prestito', models.IntegerField()),
                ('Condizioni_Estensione', models.CharField(max_length=1000)),
            ],
        ),
        migrations.CreateModel(
            name='Prestito',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Utente', models.CharField(max_length=30)),
                ('Prenotato', models.BooleanField()),
                ('DataPrenotazione', models.DateTimeField(auto_now_add=True)),
                ('ISBN10', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='biblioteca.Libro')),
            ],
        ),
        migrations.CreateModel(
            name='Recensione',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Titolo_Libro', models.CharField(max_length=100)),
                ('Genere', models.CharField(max_length=20)),
                ('Valutazione', models.IntegerField(null=True)),
                ('Recensione', models.CharField(max_length=5000)),
                ('Utente', models.CharField(max_length=30)),
                ('ISBN10', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='biblioteca.Libro')),
            ],
        ),
    ]
