# Generated by Django 2.2.4 on 2019-08-23 13:04

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, unique=True, verbose_name='Name')),
            ],
            options={
                'verbose_name': 'Category',
                'verbose_name_plural': 'Categories',
            },
        ),
        migrations.CreateModel(
            name='Supplier',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200, verbose_name='Name')),
                ('nif', models.CharField(blank=True, max_length=50, null=True, verbose_name='NIF Number')),
                ('keywords', models.CharField(blank=True, max_length=200, null=True, verbose_name='Keywords')),
                ('contact', models.CharField(blank=True, max_length=200, null=True, verbose_name='Contact person')),
                ('phone', models.CharField(blank=True, max_length=200, null=True, verbose_name='Phone Number')),
                ('email', models.CharField(blank=True, max_length=200, null=True, verbose_name='Email')),
                ('discounts', models.CharField(blank=True, max_length=200, null=True, verbose_name='Discounts')),
                ('category', models.ManyToManyField(blank=True, to='suppliers.Category')),
                ('country', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='common.Country')),
            ],
            options={
                'verbose_name': 'Supplier',
                'verbose_name_plural': 'Suppliers',
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='Tophistory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('top', models.CharField(max_length=100, verbose_name='TOP')),
                ('date', models.DateField(blank=True, null=True, verbose_name='Date')),
                ('createdby', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('supplier', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='suppliers.Supplier')),
            ],
            options={
                'verbose_name': 'TOP History',
                'verbose_name_plural': 'Top Histories',
            },
        ),
    ]
