# Generated by Django 3.0.7 on 2020-08-16 20:03

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='BillType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=25)),
            ],
        ),
        migrations.CreateModel(
            name='PaymentMethod',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=25)),
            ],
        ),
        migrations.CreateModel(
            name='ResState',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=30)),
            ],
        ),
        migrations.CreateModel(
            name='Reservation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('creation', models.DateTimeField(auto_now_add=True)),
                ('description', models.TextField()),
                ('scoring', models.PositiveIntegerField(default=0)),
                ('show', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='movies.Show', verbose_name='movie that was booked')),
                ('spots', models.ManyToManyField(to='movies.Spot', verbose_name='spots that were booked')),
                ('state', models.ForeignKey(default=1, on_delete=django.db.models.deletion.PROTECT, to='reservations.ResState', verbose_name='state of the reservation')),
            ],
        ),
        migrations.CreateModel(
            name='Bill',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('value', models.FloatField()),
                ('saved_score', models.FloatField()),
                ('bill_type', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='reservations.BillType', verbose_name='billing type')),
                ('payment_method', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='reservations.PaymentMethod', verbose_name='payment method of the bill')),
                ('reservation', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='reservation', to='reservations.Reservation', verbose_name='reservation of the bill')),
            ],
        ),
    ]
