# Generated by Django 3.1.2 on 2020-10-14 10:49

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Detail',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('sold', models.BooleanField(default=False)),
                ('Imei', models.BigIntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='Products',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=10, unique=True)),
                ('product_model', models.CharField(choices=[('Itel', 'Itel'), ('Techno', 'Techno'), ('Oking', 'Oking'), ('Infinix', 'Infinix'), ('Samsung', 'Samsung'), ('Huawei', 'Huawei'), ('Oppo', 'Oppo'), ('Realme', 'Realme'), ('Nokia', 'Nokia'), ('Wiko', 'Wiko'), ('Energizer', 'Energizer'), ('SQ', 'SQ'), ('KGTEL', 'KGTEL'), ('ITFLY', 'ITFLY'), ('Vifone', 'Vifone'), ('IYOU', 'IYOU'), ('Guava', 'Guava'), ('Pride', 'Pride'), ('Vital', 'Vital'), ('Suply', 'Suply'), ('Smartopus', 'Smartopus'), ('Joytel', 'Joytel'), ('Vonex', 'Vonex')], max_length=10)),
                ('quantity', models.PositiveIntegerField()),
                ('entryprice', models.PositiveIntegerField()),
                ('product_type', models.CharField(choices=[('Phones', 'Phones'), ('Chargers', 'Chargers'), ('Earphones', 'Earphones'), ('Screen Guard', 'Screen Guard')], max_length=15)),
                ('date_added', models.DateTimeField(auto_now_add=True)),
                ('date_modified', models.DateTimeField(auto_now=True)),
            ],
            options={
                'verbose_name_plural': 'products',
            },
        ),
        migrations.CreateModel(
            name='Sales',
            fields=[
                ('no', models.AutoField(primary_key=True, serialize=False)),
                ('date_sold', models.DateTimeField(auto_now_add=True)),
                ('selling_price', models.PositiveIntegerField()),
                ('payment_method', models.CharField(choices=[('Mpesa', 'Mpesa'), ('Cash', 'Cash'), ('Credit', 'Credit')], default='Cash', max_length=10)),
                ('Imei', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Physical.detail')),
                ('product_model', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Physical.products')),
            ],
            options={
                'verbose_name_plural': 'sales',
            },
        ),
        migrations.AddField(
            model_name='detail',
            name='product',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Physical.products'),
        ),
    ]
