# Generated by Django 2.2 on 2019-12-30 15:16

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


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('store', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Sales',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('invoice_number', models.CharField(default=store.models.generate_invoice_number, max_length=50)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('discount', models.FloatField()),
                ('vat_applied', models.FloatField()),
                ('total', models.FloatField()),
                ('employee', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AlterField(
            model_name='product',
            name='quantity_available',
            field=models.FloatField(),
        ),
        migrations.CreateModel(
            name='SalesProductDetails',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('quantity', models.FloatField()),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='store.Product')),
                ('sale', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='store.Sales')),
            ],
        ),
    ]
