# Generated by Django 3.0.2 on 2020-03-24 01:37

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Dish',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=20)),
                ('descripton', models.CharField(max_length=200)),
                ('price', models.DecimalField(decimal_places=2, max_digits=10)),
                ('default_image', models.ImageField(upload_to='dishes')),
                ('is_new', models.SmallIntegerField(choices=[(0, 'notNew'), (1, 'isNew')], default=0)),
                ('is_recommend', models.SmallIntegerField(choices=[(0, 'nomarl'), (1, 'medium'), (2, 'large')], default=0)),
                ('is_spicy', models.SmallIntegerField(choices=[(0, 'nomarl'), (1, 'medium'), (2, 'large')], default=0)),
                ('is_selling', models.SmallIntegerField(choices=[(0, 'notSell'), (1, 'isSell')], default=1)),
                ('created_time', models.DateTimeField()),
                ('fix_time', models.DateTimeField()),
            ],
        ),
        migrations.CreateModel(
            name='DishType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=20)),
                ('type_image', models.ImageField(upload_to='types')),
                ('created_time', models.DateTimeField()),
                ('fix_time', models.DateTimeField()),
                ('dish', models.ManyToManyField(related_name='dish_type', to='dish.Dish')),
            ],
        ),
        migrations.CreateModel(
            name='DishImage',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image', models.ImageField(upload_to='dishes')),
                ('created_time', models.DateTimeField()),
                ('fix_time', models.DateTimeField()),
                ('dish', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='dish_all_images', to='dish.Dish')),
            ],
        ),
        migrations.CreateModel(
            name='DishDisplayInTurn',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image', models.ImageField(upload_to='play')),
                ('index', models.SmallIntegerField(default=0)),
                ('dish', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='dish_display_in_turn', to='dish.Dish')),
            ],
        ),
        migrations.CreateModel(
            name='DishDisPlay',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image', models.ImageField(upload_to='play')),
                ('index', models.SmallIntegerField(default=0)),
                ('dish', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='dish_display', to='dish.Dish')),
                ('type', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='type_display', to='dish.DishType')),
            ],
        ),
    ]
