# Generated by Django 3.1.1 on 2020-09-08 08:01

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Category',
            fields=[
                ('cat_id', models.AutoField(primary_key=True, serialize=False)),
                ('cat_name', models.CharField(max_length=32)),
            ],
        ),
        migrations.CreateModel(
            name='Customer',
            fields=[
                ('c_id', models.AutoField(primary_key=True, serialize=False)),
                ('fname', models.CharField(max_length=32)),
                ('lname', models.CharField(max_length=32)),
                ('contact', models.CharField(max_length=10, unique=True)),
                ('email', models.EmailField(max_length=254, unique=True)),
                ('dob', models.DateField()),
            ],
        ),
        migrations.CreateModel(
            name='Supplier',
            fields=[
                ('sid', models.AutoField(primary_key=True, serialize=False)),
                ('sname', models.CharField(max_length=32)),
                ('company', models.CharField(max_length=32)),
                ('contact', models.CharField(max_length=10)),
                ('email', models.EmailField(max_length=254, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('pid', models.AutoField(primary_key=True, serialize=False)),
                ('pname', models.CharField(max_length=32)),
                ('pdescription', models.CharField(max_length=32)),
                ('price', models.IntegerField()),
                ('Supplier', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='Ecomm_users.supplier')),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Ecomm_users.category')),
            ],
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('order_id', models.AutoField(primary_key=True, serialize=False)),
                ('quantity', models.IntegerField()),
                ('date', models.DateField()),
                ('customer_id', models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, to='Ecomm_users.category')),
                ('product_id', models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, to='Ecomm_users.product')),
            ],
        ),
    ]
