# Generated by Django 3.1.2 on 2020-10-23 06:32

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('products', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='CartList',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('count', models.IntegerField()),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='products.product')),
                ('series', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='products.productseries')),
            ],
            options={
                'db_table': 'carts',
            },
        ),
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('account', models.CharField(max_length=32)),
                ('password', models.CharField(max_length=64, null=True)),
                ('name', models.CharField(max_length=32, null=True)),
                ('email', models.EmailField(max_length=64)),
                ('phone_number', models.CharField(max_length=32, null=True)),
                ('address', models.CharField(max_length=128, null=True)),
                ('gender', models.CharField(max_length=32, null=True)),
                ('birth', models.CharField(max_length=32, null=True)),
                ('google_id', models.CharField(max_length=32, null=True)),
                ('cart_list', models.ManyToManyField(through='user.CartList', to='products.Product')),
            ],
            options={
                'db_table': 'users',
            },
        ),
        migrations.AddField(
            model_name='cartlist',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='user.user'),
        ),
    ]
