# -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2017-01-15 10:38
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='category_data',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('category', models.CharField(max_length=120, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='CUSTOM',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('value', models.CharField(blank=True, max_length=120, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='KEYS',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('value', models.CharField(blank=True, max_length=120, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='KEYS_LIST',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('key', models.CharField(max_length=120, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='order_data',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('order_id', models.CharField(blank=True, max_length=20, null=True)),
                ('name', models.CharField(blank=True, max_length=20, null=True)),
                ('mobile', models.CharField(blank=True, max_length=11, null=True)),
                ('branch', models.CharField(max_length=300)),
                ('total_price', models.IntegerField(default=0)),
                ('discount', models.IntegerField(default=0)),
                ('total_price_discounted', models.IntegerField(default=0)),
                ('server_backup', models.BooleanField(default=False)),
                ('modified', models.DateTimeField(auto_now=True)),
                ('created', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='order_details_data',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('order_id', models.CharField(blank=True, max_length=120, null=True)),
                ('product_id', models.IntegerField(default=0)),
                ('name', models.CharField(max_length=120)),
                ('price', models.IntegerField(default=0)),
                ('quantity', models.IntegerField(default=0)),
                ('modified', models.DateTimeField(auto_now=True)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('category', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='orders.category_data', to_field='category')),
            ],
        ),
        migrations.AddField(
            model_name='keys',
            name='key',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='orders.KEYS_LIST', to_field='key'),
        ),
        migrations.AddField(
            model_name='custom',
            name='key',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='orders.KEYS_LIST', to_field='key'),
        ),
    ]
