# Generated by Django 2.2.2 on 2019-06-04 15:03

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Prodotto',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('descrizione', models.TextField()),
                ('prezzo', models.FloatField()),
                ('tempo_preparazione', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='StatoProdottoOrdinato',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(max_length=30)),
            ],
        ),
        migrations.CreateModel(
            name='TipoPortata',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(max_length=30)),
            ],
        ),
        migrations.CreateModel(
            name='TipoProdotto',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(max_length=30)),
            ],
        ),
        migrations.CreateModel(
            name='ProdottoOrdinato',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('quantita', models.IntegerField()),
                ('tempo_inizio_lavorazione', models.DateTimeField(auto_now_add=True)),
                ('prodotto', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='backend.Prodotto')),
                ('stato_prodotto_ordinato', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='backend.StatoProdottoOrdinato')),
            ],
        ),
        migrations.AddField(
            model_name='prodotto',
            name='tipo_portata',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='backend.TipoPortata'),
        ),
        migrations.AddField(
            model_name='prodotto',
            name='tipo_prodotto',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='backend.TipoProdotto'),
        ),
        migrations.CreateModel(
            name='Ordinazione',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('id_tavolo', models.CharField(max_length=5)),
                ('prodotto_ordinato', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.ProdottoOrdinato')),
            ],
        ),
    ]
