# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-02-03 12:36
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='OpeningHours',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('day', models.IntegerField(choices=[(0, 'Monday'), (1, 'Tuesday'), (2, 'Wednesday'), (3, 'Thursday'), (4, 'Friday'), (5, 'Saturday'), (6, 'Sunday')])),
                ('opening_from', models.TimeField(verbose_name='Open from')),
                ('opening_to', models.TimeField(verbose_name='Open to')),
                ('ordering_from', models.TimeField(blank=True, null=True, verbose_name='Ordering from')),
            ],
            options={
                'ordering': ['restaurant', 'day'],
                'verbose_name_plural': 'opening hours',
            },
        ),
        migrations.CreateModel(
            name='PhoneNumber',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('number', models.CharField(max_length=10, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='Restaurant',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50, unique=True)),
                ('logo', models.ImageField(upload_to='logos/')),
                ('website', models.URLField(blank=True)),
            ],
        ),
        migrations.AddField(
            model_name='phonenumber',
            name='restaurant',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='restaurants.Restaurant'),
        ),
        migrations.AddField(
            model_name='openinghours',
            name='restaurant',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='restaurants.Restaurant'),
        ),
        migrations.AlterUniqueTogether(
            name='openinghours',
            unique_together=set([('restaurant', 'day')]),
        ),
    ]
