# Generated by Django 3.0.7 on 2020-07-04 19:40

import datetime
from django.db import migrations, models
import django.db.models.deletion
from django.utils.timezone import utc


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')),
                ('timestamp', models.DateTimeField(default=datetime.datetime(2020, 7, 4, 19, 40, 56, 923040, tzinfo=utc))),
                ('category_name', models.CharField(help_text='Enter category name', max_length=15)),
            ],
            options={
                'verbose_name_plural': 'categories',
            },
        ),
        migrations.CreateModel(
            name='Item',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('timestamp', models.DateTimeField(default=datetime.datetime(2020, 7, 4, 19, 40, 56, 923474, tzinfo=utc))),
                ('barcode', models.CharField(help_text='Enter barcode', max_length=10, verbose_name='Bar code')),
                ('item_name', models.CharField(help_text='Enter item name', max_length=25)),
                ('brandname', models.CharField(help_text='Enter brand name', max_length=25, verbose_name='Brand name')),
                ('modelname', models.CharField(help_text='Enter model name', max_length=25, verbose_name='Model name')),
                ('item_description', models.TextField(help_text='Enter item description', max_length=50)),
                ('sellingprice', models.FloatField(help_text='Enter selling price', verbose_name='Selling price')),
                ('category', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='kioskapp.Category')),
            ],
        ),
        migrations.CreateModel(
            name='User_type',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('timestamp', models.DateTimeField(default=datetime.datetime(2020, 7, 4, 19, 40, 56, 921627, tzinfo=utc), editable=False)),
                ('user_type_name', models.CharField(help_text='Enter user type', max_length=15)),
            ],
            options={
                'verbose_name_plural': 'User types',
            },
        ),
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('timestamp', models.DateTimeField(default=datetime.datetime(2020, 7, 4, 19, 40, 56, 922083, tzinfo=utc))),
                ('fullname', models.CharField(max_length=50, verbose_name='Full name')),
                ('email', models.EmailField(max_length=254)),
                ('password', models.CharField(max_length=50)),
                ('mobile', models.CharField(max_length=15)),
                ('user_type', models.ManyToManyField(help_text='Select user type', to='kioskapp.User_type')),
            ],
        ),
        migrations.CreateModel(
            name='Supplier',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('timestamp', models.DateTimeField(default=datetime.datetime(2020, 7, 4, 19, 40, 56, 925304, tzinfo=utc))),
                ('supplier_name', models.CharField(help_text='Enter supplier name', max_length=40)),
                ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='kioskapp.User')),
            ],
        ),
        migrations.CreateModel(
            name='Sold_item',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('timestamp', models.DateTimeField(default=datetime.datetime(2020, 7, 4, 19, 40, 56, 926258, tzinfo=utc))),
                ('sold_quantity', models.IntegerField(help_text='Enter sold quantity')),
                ('item', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='kioskapp.Item')),
                ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='kioskapp.User')),
            ],
            options={
                'verbose_name_plural': 'Sold items',
            },
        ),
        migrations.CreateModel(
            name='Received_item',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('timestamp', models.DateTimeField(default=datetime.datetime(2020, 7, 4, 19, 40, 56, 925729, tzinfo=utc))),
                ('received_quantity', models.IntegerField(help_text='Enter received quantity')),
                ('cost_price', models.FloatField(help_text='Enter cost price')),
                ('price_per_piece', models.FloatField(help_text='Enter price of single piece')),
                ('item', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='kioskapp.Item')),
                ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='kioskapp.User')),
            ],
            options={
                'verbose_name_plural': 'Received items',
            },
        ),
        migrations.CreateModel(
            name='Item_properties',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('timestamp', models.DateTimeField(default=datetime.datetime(2020, 7, 4, 19, 40, 56, 924106, tzinfo=utc))),
                ('color', models.CharField(help_text='Enter item color', max_length=25)),
                ('size', models.CharField(help_text='Enter item size', max_length=20)),
                ('weight', models.FloatField(help_text='Enter item weight')),
                ('item', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='kioskapp.Item')),
                ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='kioskapp.User')),
            ],
            options={
                'verbose_name_plural': 'Item properties',
            },
        ),
        migrations.CreateModel(
            name='Item_batch',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('timestamp', models.DateTimeField(default=datetime.datetime(2020, 7, 4, 19, 40, 56, 924729, tzinfo=utc))),
                ('item_batch_code', models.CharField(help_text='Enter batch code', max_length=15)),
                ('manufacture_date', models.DateField(help_text='Enter manufacture date')),
                ('expiry_date', models.DateField(help_text='Enter expiry date')),
                ('item', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='kioskapp.Item')),
                ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='kioskapp.User')),
            ],
            options={
                'verbose_name_plural': 'Item batches',
            },
        ),
        migrations.AddField(
            model_name='item',
            name='supplier',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='kioskapp.Supplier'),
        ),
        migrations.AddField(
            model_name='item',
            name='user',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='kioskapp.User'),
        ),
        migrations.AddField(
            model_name='category',
            name='user',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='kioskapp.User'),
        ),
    ]
