# Generated by Django 2.2 on 2020-05-03 23:33

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Account',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('username', models.CharField(max_length=200, unique=True)),
                ('name', models.CharField(max_length=200)),
                ('phone', models.CharField(max_length=200, null=True)),
                ('email', models.EmailField(max_length=200, unique=True, verbose_name='email')),
                ('profile_pic', models.ImageField(blank=True, default='profile1.png', null=True, upload_to='')),
                ('date_created', models.DateTimeField(auto_now_add=True)),
                ('last_login', models.DateTimeField(auto_now=True)),
                ('is_superuser', models.BooleanField(default=False)),
                ('is_admin', models.BooleanField(default=False)),
                ('is_salesman', models.BooleanField(default=False)),
                ('is_manager', models.BooleanField(default=False)),
                ('is_staff', models.BooleanField(default=False)),
                ('is_active', models.BooleanField(default=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='CollectItem',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Invoice_no', models.CharField(max_length=15)),
                ('CN', models.CharField(max_length=15)),
                ('DN', models.CharField(max_length=15)),
                ('Total', models.FloatField(default=0, verbose_name='Total Price')),
                ('Remark', models.TextField(max_length=200)),
            ],
        ),
        migrations.CreateModel(
            name='Message',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('msg', models.CharField(max_length=200, null=True)),
                ('date_created', models.DateTimeField(auto_now_add=True)),
                ('is_seen', models.BooleanField(default=False)),
            ],
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Brand', models.CharField(choices=[('LICIN LICIN', 'LICIN LICIN'), ('L LADY', 'L LADY'), ('CNC', 'CNC'), ('RADIX ', 'RADIX')], max_length=50)),
                ('Barcodes', models.CharField(max_length=20, null=True)),
                ('Name', models.CharField(max_length=50)),
                ('Product', models.CharField(max_length=100, unique=True)),
                ('PackSize', models.CharField(max_length=10)),
                ('CtnQty', models.IntegerField()),
                ('RCP', models.DecimalField(decimal_places=2, max_digits=10)),
                ('RSP', models.DecimalField(decimal_places=2, max_digits=10)),
                ('RetailerMargin', models.FloatField(default=0)),
                ('FastPay', models.FloatField(default=0)),
                ('UlkPurchase', models.FloatField(default=0)),
                ('Description', models.TextField(blank=True, max_length=256, null=True)),
                ('DateCreated', models.DateTimeField(auto_now_add=True)),
                ('LastEdit', models.DateTimeField(auto_now=True)),
                ('Picture', models.ImageField(blank=True, default='profile1.png', null=True, upload_to='products/')),
            ],
        ),
        migrations.CreateModel(
            name='ReturnItem',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Qty', models.IntegerField(verbose_name='Order Quantity')),
                ('DQty', models.FloatField(default=0, verbose_name='Discount Quantity')),
                ('DFP', models.FloatField(default=0, verbose_name='Discount FP')),
                ('UAD', models.DecimalField(decimal_places=2, max_digits=10, verbose_name='Price After Discount')),
                ('Remark', models.TextField(max_length=200)),
                ('Item', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='accounts.Product')),
            ],
        ),
        migrations.CreateModel(
            name='outlet',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('CompanyName', models.CharField(max_length=50)),
                ('AccOpenDate', models.DateField(null=True)),
                ('Status', models.CharField(choices=[('Active', 'Active'), ('Non Active', 'Non Active')], max_length=15)),
                ('Address', models.CharField(max_length=100)),
                ('CreditLimit', models.DecimalField(decimal_places=2, max_digits=10, null=True)),
                ('Email', models.CharField(max_length=25, null=True)),
                ('BusinessNature', models.CharField(max_length=20, null=True)),
                ('Code', models.CharField(max_length=20, unique=True)),
                ('CompanyCategory', models.CharField(choices=[('A1', 'A1'), ('A2', 'A2'), ('CSC', 'CSC'), ('DEALER', 'DEALER'), ('END USER', 'END USER'), ('RETAIL GROUP', 'RETAIL GROUP')], max_length=15)),
                ('Attention', models.CharField(max_length=20, null=True)),
                ('Phone1', models.CharField(max_length=20, null=True)),
                ('Area', models.CharField(max_length=25)),
                ('CreditTerm', models.CharField(max_length=15)),
                ('AddTime', models.DateTimeField(auto_now_add=True)),
                ('LastEdit', models.DateTimeField(auto_now=True)),
                ('Agent', models.ManyToManyField(to=settings.AUTH_USER_MODEL)),
                ('Products', models.ManyToManyField(to='accounts.Product')),
            ],
        ),
        migrations.CreateModel(
            name='OrderItem',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Bal', models.IntegerField(verbose_name='Balance')),
                ('Qty', models.IntegerField(verbose_name='Order Quantity')),
                ('DQty', models.FloatField(default=0, verbose_name='Discount Quantity')),
                ('DFP', models.FloatField(default=0, verbose_name='Discount FP')),
                ('UAD', models.DecimalField(decimal_places=2, max_digits=10, verbose_name='Price After Discount')),
                ('Remark', models.TextField(max_length=200)),
                ('Item', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='accounts.Product')),
            ],
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Invoice_no', models.CharField(max_length=15, unique=True)),
                ('status', models.CharField(choices=[('Pending', 'Pending'), ('Approved', 'Approved'), ('Rejected1', 'Rejected1'), ('Process', 'Process'), ('Rejected2', 'Rejected2'), ('Delivered', 'Delivered'), ('Cancel', 'Cancel'), ('Paid', 'Paid')], max_length=15, null=True)),
                ('is_paid', models.BooleanField(default=False)),
                ('DateCreated', models.DateTimeField(auto_now_add=True)),
                ('DeliveryDate', models.DateField(null=True)),
                ('DueDate', models.DateField(null=True)),
                ('LastEdit', models.DateTimeField(auto_now=True)),
                ('Price', models.DecimalField(decimal_places=2, max_digits=10, verbose_name='Total Price')),
                ('Collect', models.ManyToManyField(to='accounts.CollectItem')),
                ('Item', models.ManyToManyField(to='accounts.OrderItem')),
                ('Outlet', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='accounts.outlet')),
                ('POC', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('Return', models.ManyToManyField(to='accounts.ReturnItem')),
            ],
        ),
        migrations.AddField(
            model_name='account',
            name='Messages',
            field=models.ManyToManyField(blank=True, to='accounts.Message'),
        ),
    ]
