# Generated by Django 2.2 on 2019-04-13 20:38

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('category_name', models.CharField(max_length=50, unique=True)),
                ('category_code', models.IntegerField(unique=True)),
                ('category_description', models.TextField()),
                ('category_status', models.CharField(max_length=20)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='Company',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('company_name', models.CharField(max_length=50, unique=True)),
                ('company_code', models.IntegerField(unique=True)),
                ('company_phone', models.CharField(max_length=15)),
                ('company_email', models.EmailField(max_length=50)),
                ('company_address', models.TextField()),
                ('company_status', models.CharField(max_length=10)),
                ('company_notify', models.BooleanField()),
                ('company_logo', models.ImageField(default='company/blank.png', upload_to='company/')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='SubCategory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('sub_category_name', models.CharField(max_length=50, unique=True)),
                ('sub_category_code', models.IntegerField(unique=True)),
                ('sub_category_description', models.TextField()),
                ('sub_category_status', models.CharField(max_length=20)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('category_name', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.Category')),
            ],
        ),
    ]
