# Generated by Django 3.0.3 on 2020-03-14 06:54

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


class Migration(migrations.Migration):

    dependencies = [
        ('shop', '0002_auto_20200225_0400'),
        ('customer', '0003_auto_20200313_0738'),
        ('eadmin', '0008_auto_20200314_0518'),
    ]

    operations = [
        migrations.CreateModel(
            name='SalesReport',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('quantity', models.IntegerField(default=1, help_text='Units will be automatically computed', validators=[django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(100)], verbose_name='Quantity')),
                ('year', models.IntegerField(default=2020, editable=False, verbose_name='year')),
                ('month', models.CharField(default=3, editable=False, max_length=20, verbose_name='month')),
                ('customer_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='customer.Customer')),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='eadmin.Products', to_field='name')),
                ('shop_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='shop.Shop', to_field='shop_id')),
            ],
            options={
                'unique_together': {('shop_id', 'customer_id', 'product', 'month')},
            },
        ),
    ]
