# Generated by Django 3.1.1 on 2020-12-22 10:57

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


class Migration(migrations.Migration):

    dependencies = [
        ("msmapp", "0001_initial"),
    ]

    operations = [
        migrations.CreateModel(
            name="categories",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("name", models.CharField(max_length=50, null=True)),
            ],
        ),
        migrations.CreateModel(
            name="subcategories",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("name", models.CharField(max_length=50, null=True)),
            ],
        ),
        migrations.AlterField(
            model_name="register",
            name="dob",
            field=models.CharField(max_length=10),
        ),
        migrations.AlterField(
            model_name="register",
            name="eadd",
            field=models.EmailField(max_length=254),
        ),
        migrations.AlterField(
            model_name="register",
            name="fname",
            field=models.CharField(max_length=100),
        ),
        migrations.AlterField(
            model_name="register",
            name="lname",
            field=models.CharField(max_length=100),
        ),
        migrations.CreateModel(
            name="products",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("product_name", models.CharField(max_length=100)),
                ("price", models.IntegerField(default=0)),
                ("desc", models.CharField(max_length=100)),
                ("pub_date", models.DateField()),
                ("image", models.ImageField(null=True, upload_to="media/")),
                (
                    "category",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="msmapp.categories",
                    ),
                ),
                (
                    "subcategory",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="msmapp.subcategories",
                    ),
                ),
            ],
        ),
    ]
