# Generated by Django 3.1.2 on 2020-12-09 11:45

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='AutoreCD',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(max_length=50)),
                ('nazione', models.CharField(max_length=20)),
            ],
            options={
                'verbose_name': 'Autore',
                'verbose_name_plural': 'Autori',
            },
        ),
        migrations.CreateModel(
            name='GenereCD',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(max_length=50)),
            ],
            options={
                'verbose_name': 'Genere',
                'verbose_name_plural': 'Generi',
            },
        ),
        migrations.CreateModel(
            name='LibroCD',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('titolo', models.CharField(max_length=50)),
                ('autore', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='autore', to='libreria.autorecd')),
                ('generi', models.ManyToManyField(to='libreria.GenereCD')),
            ],
            options={
                'verbose_name': 'Libro',
                'verbose_name_plural': 'Libri',
            },
        ),
    ]
