# Generated by Django 2.2.7 on 2020-01-30 17:58

from django.conf import settings
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone


class Migration(migrations.Migration):

    dependencies = [
        ('gallery', '0008_merge_20191212_0752'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('establishment', '0088_merge_20200130_1318'),
    ]

    operations = [
        migrations.CreateModel(
            name='MenuGallery',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_main', models.BooleanField(default=False, verbose_name='Is the main image')),
                ('image', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='menu_gallery', to='gallery.Image', verbose_name='image')),
            ],
            options={
                'verbose_name': 'menu gallery',
                'verbose_name_plural': 'menu galleries',
            },
        ),
        migrations.CreateModel(
            name='MenuUploads',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(default=django.utils.timezone.now, editable=False, verbose_name='Date created')),
                ('modified', models.DateTimeField(auto_now=True, verbose_name='Date updated')),
                ('title', models.CharField(default='', max_length=255, verbose_name='title')),
                ('file', models.FileField(upload_to='', validators=[django.core.validators.FileExtensionValidator(allowed_extensions=('doc', 'docx', 'pdf'))], verbose_name='File')),
                ('created_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='menuuploads_records_created', to=settings.AUTH_USER_MODEL, verbose_name='created by')),
            ],
            options={
                'verbose_name': 'menu upload',
                'verbose_name_plural': 'menu uploads',
            },
        ),
        migrations.RemoveField(
            model_name='menufiles',
            name='created_by',
        ),
        migrations.RemoveField(
            model_name='menufiles',
            name='modified_by',
        ),
        migrations.RemoveField(
            model_name='menu',
            name='average_desert_price',
        ),
        migrations.RemoveField(
            model_name='menu',
            name='average_main_dish_price',
        ),
        migrations.RemoveField(
            model_name='menu',
            name='average_starter_price',
        ),
        migrations.RemoveField(
            model_name='menu',
            name='dishes',
        ),
        migrations.RemoveField(
            model_name='menu',
            name='highest_price',
        ),
        migrations.RemoveField(
            model_name='menu',
            name='lowest_price',
        ),
        migrations.RemoveField(
            model_name='menu',
            name='name',
        ),
        migrations.RemoveField(
            model_name='menu',
            name='nb_wine',
        ),
        migrations.RemoveField(
            model_name='menu',
            name='price',
        ),
        migrations.RemoveField(
            model_name='menu',
            name='price_max_by_glass',
        ),
        migrations.RemoveField(
            model_name='menu',
            name='price_min_by_glass',
        ),
        migrations.RemoveField(
            model_name='menu',
            name='renewal_per_year',
        ),
        migrations.RemoveField(
            model_name='menu',
            name='served_by_glasses',
        ),
        migrations.RemoveField(
            model_name='menu',
            name='uploads',
        ),
        migrations.AlterField(
            model_name='menu',
            name='schedule',
            field=models.ManyToManyField(blank=True, related_name='menus', to='timetable.Timetable', verbose_name='Establishment schedule'),
        ),
        migrations.DeleteModel(
            name='MenuDish',
        ),
        migrations.DeleteModel(
            name='MenuFiles',
        ),
        migrations.AddField(
            model_name='menuuploads',
            name='menu',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='menu_uploads', to='establishment.Menu', verbose_name='menu'),
        ),
        migrations.AddField(
            model_name='menuuploads',
            name='modified_by',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='menuuploads_records_modified', to=settings.AUTH_USER_MODEL, verbose_name='modified by'),
        ),
        migrations.AddField(
            model_name='menugallery',
            name='menu',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='menu_gallery', to='establishment.Menu', verbose_name='menu'),
        ),
        migrations.AlterUniqueTogether(
            name='menugallery',
            unique_together={('menu', 'image'), ('menu', 'is_main')},
        ),
    ]
