# Generated by Django 3.0.6 on 2020-11-05 08:07

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='item_status',
            fields=[
                ('item_code', models.AutoField(primary_key=True, serialize=False, unique=True)),
                ('item_name', models.CharField(blank=True, max_length=50)),
                ('type', models.CharField(blank=True, max_length=100)),
                ('price', models.FloatField()),
                ('status', models.CharField(choices=[{'AVAILABLE', 'Item ready to be purchased'}, {'SOLD', 'Item Sold'}, {'RESTOCKING', 'Item restocking in few days'}], default='AVAILABLE', max_length=50)),
                ('item_quantity_available', models.IntegerField()),
                ('issues', models.CharField(default='No issues', max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='Post',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('post', models.TextField()),
            ],
        ),
        migrations.CreateModel(
            name='supplier',
            fields=[
                ('supplier_id', models.AutoField(primary_key=True, serialize=False, unique=True)),
                ('supplier_name', models.CharField(max_length=500)),
                ('supplier_phone', models.CharField(max_length=15)),
            ],
        ),
        migrations.CreateModel(
            name='sales_record',
            fields=[
                ('record_id', models.AutoField(primary_key=True, serialize=False, unique=True)),
                ('item_quantity_sold', models.IntegerField(null=True)),
                ('item_quantity_before_sales', models.IntegerField(null=True)),
                ('item_quantity_after_sales', models.IntegerField(null=True)),
                ('date_sold', models.DateField(auto_now_add=True)),
                ('item_code', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='salesitem', to='inventory.item_status')),
            ],
        ),
        migrations.CreateModel(
            name='reorder',
            fields=[
                ('order_id', models.AutoField(primary_key=True, serialize=False, unique=True)),
                ('date_reorder', models.DateField(blank=True, null=True)),
                ('quantity_reorder', models.IntegerField()),
                ('date_of_receive', models.DateField(blank=True, null=True)),
                ('quantity_receive', models.IntegerField(blank=True, null=True)),
                ('remarks', models.CharField(default='No issue', max_length=100)),
                ('item_code', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='reorderitem', to='inventory.item_status')),
                ('supplier', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='supplier', to='inventory.supplier')),
            ],
        ),
    ]
