# -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2017-09-08 16:20
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=50)),
                ('status', models.CharField(choices=[('Active', 'Active'), ('InActive', 'InActive'), ('Deleted', 'Deleted')], default='Active', max_length=5)),
            ],
            options={
                'db_table': 'category',
            },
        ),
        migrations.CreateModel(
            name='Department',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=50)),
                ('status', models.CharField(choices=[('Active', 'Active'), ('InActive', 'InActive'), ('Deleted', 'Deleted')], default='Active', max_length=5)),
            ],
            options={
                'db_table': 'department',
            },
        ),
        migrations.CreateModel(
            name='Location',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=50)),
                ('status', models.CharField(choices=[('Active', 'Active'), ('InActive', 'InActive'), ('Deleted', 'Deleted')], default='Active', max_length=5)),
            ],
            options={
                'db_table': 'location',
            },
        ),
        migrations.CreateModel(
            name='SKU',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('stock_id', models.CharField(max_length=10, unique=True)),
                ('name', models.CharField(max_length=30)),
                ('barcode', models.CharField(max_length=50)),
            ],
            options={
                'db_table': 'stock_keeping_unit',
            },
        ),
        migrations.CreateModel(
            name='SubCategory',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=50)),
                ('status', models.CharField(choices=[('Active', 'Active'), ('InActive', 'InActive'), ('Deleted', 'Deleted')], default='Active', max_length=5)),
                ('Category', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='category_subcategories', to='services.Department')),
            ],
            options={
                'db_table': 'subcategory',
            },
        ),
        migrations.AddField(
            model_name='sku',
            name='subcategory',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='subcategory_products', to='services.SubCategory'),
        ),
        migrations.AddField(
            model_name='department',
            name='location',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='location_departments', to='services.Location'),
        ),
        migrations.AddField(
            model_name='category',
            name='department',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='department_categories', to='services.Department'),
        ),
    ]
