# Generated by Django 2.0.3 on 2018-05-06 14:27

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Branch',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Name', models.CharField(max_length=100)),
                ('Description', models.CharField(max_length=300)),
                ('ImageID', models.ImageField(upload_to='Branch_images')),
            ],
        ),
        migrations.CreateModel(
            name='CustomerProfile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Name', models.CharField(max_length=100)),
                ('UserName', models.CharField(max_length=100)),
                ('Password', models.CharField(max_length=100)),
                ('Email', models.EmailField(max_length=100, unique=True)),
                ('PhoneNumber', models.CharField(max_length=8)),
                ('Wallet', models.IntegerField(default=0)),
            ],
        ),
        migrations.CreateModel(
            name='Employee',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Name', models.CharField(max_length=100)),
                ('UserName', models.CharField(max_length=100)),
                ('Password', models.CharField(max_length=100)),
                ('Email', models.EmailField(max_length=100, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='Manager',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Name', models.CharField(max_length=100)),
                ('UserName', models.CharField(max_length=100)),
                ('Password', models.CharField(max_length=100)),
                ('Email', models.EmailField(max_length=100, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('PickupTime', models.DateTimeField()),
                ('PaymentMethod', models.CharField(choices=[('CreditCard', 'Credit Card'), ('Wallet', 'From Wallet'), ('OnPickup', 'On Pickup')], default=2, max_length=100)),
                ('TotalPrice', models.IntegerField()),
                ('Description', models.CharField(max_length=300)),
                ('OrderStatus', models.IntegerField(choices=[(0, 'Received'), (1, 'Cooking'), (2, 'Ready')], default=0)),
                ('Branch', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='OrdersApp.Branch')),
            ],
        ),
        migrations.CreateModel(
            name='OrderItem',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Quantity', models.IntegerField()),
                ('Order', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='items', to='OrdersApp.Order')),
            ],
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Category', models.CharField(choices=[('coffee', 'Coffee product'), ('beans', 'Coffee Beans'), ('food', 'Food product')], max_length=10)),
                ('Name', models.CharField(max_length=100)),
                ('Price', models.IntegerField()),
                ('Description', models.CharField(max_length=300)),
                ('Stock', models.IntegerField(default=1)),
                ('unlimited', models.BooleanField(default=False)),
                ('Image', models.ImageField(blank=True, default='products_images/no-img.jpg', null=True, upload_to='products_images')),
            ],
        ),
        migrations.AddField(
            model_name='orderitem',
            name='Product',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='products', to='OrdersApp.Product'),
        ),
    ]
