# -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2018-09-06 12:38
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(db_index=True, max_length=50)),
                ('icon', models.ImageField(blank=True, upload_to='')),
                ('is_public', models.BooleanField(db_index=True, default=False)),
            ],
        ),
        migrations.CreateModel(
            name='Item',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(db_index=True, max_length=50)),
                ('desc', models.TextField(blank=True)),
                ('amount', models.PositiveIntegerField()),
                ('photo', models.ImageField(blank=True, upload_to='')),
                ('is_public', models.BooleanField(db_index=True, default=False)),
            ],
        ),
        migrations.CreateModel(
            name='MenuCategory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(db_index=True, max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Review',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('message', models.TextField()),
                ('photo', models.ImageField(blank=True, upload_to='')),
                ('flaver_rating', models.SmallIntegerField(validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(5)])),
                ('amount_of_food_rating', models.SmallIntegerField(validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(5)])),
                ('delivery_rating', models.SmallIntegerField(validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(5)])),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ('-id',),
            },
        ),
        migrations.CreateModel(
            name='Shop',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(db_index=True, max_length=50)),
                ('photo', models.ImageField(blank=True, upload_to='')),
                ('lnglat', models.CharField(blank=True, max_length=100)),
                ('is_public', models.BooleanField(db_index=True, default=False)),
                ('category', models.ManyToManyField(to='shop.Category')),
            ],
        ),
        migrations.CreateModel(
            name='ShopDesc',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('start_time', models.CharField(blank=True, max_length=10, verbose_name='영업시작 시간')),
                ('finisehd_time', models.CharField(blank=True, max_length=10, verbose_name='영업종료 시간')),
                ('min_order_amount', models.PositiveIntegerField(blank=True, verbose_name='최소주문금액')),
                ('method_of_payment', models.CharField(blank=True, max_length=50, verbose_name='지불수단')),
                ('business_name', models.CharField(blank=True, max_length=50, verbose_name='상호명')),
                ('company_registration_number', models.CharField(blank=True, max_length=50, verbose_name='사업자등록번호')),
                ('origin_info', models.TextField(blank=True, verbose_name='원산지 정보')),
                ('delivery_time', models.CharField(blank=True, max_length=10)),
            ],
        ),
        migrations.AddField(
            model_name='shop',
            name='desc',
            field=models.OneToOneField(null=True, on_delete=django.db.models.deletion.SET_NULL, to='shop.ShopDesc'),
        ),
        migrations.AddField(
            model_name='review',
            name='shop',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='shop.Shop'),
        ),
        migrations.AddField(
            model_name='item',
            name='menu_category',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='shop.MenuCategory'),
        ),
        migrations.AddField(
            model_name='item',
            name='shop',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='shop.Shop'),
        ),
    ]
