# Generated by Django 3.1.4 on 2020-12-16 11:53

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Gender',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('gender', models.CharField(max_length=10)),
            ],
            options={
                'db_table': 'genders',
            },
        ),
        migrations.CreateModel(
            name='Grade',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('grade', models.CharField(max_length=10)),
            ],
            options={
                'db_table': 'grades',
            },
        ),
        migrations.CreateModel(
            name='TermsAndCondition',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('privacy_policy_agreement', models.BooleanField(default=False)),
                ('sns_marketing_agreement', models.BooleanField(default=False)),
                ('email_marketing_agreement', models.BooleanField(default=False)),
            ],
            options={
                'db_table': 'terms_and_conditions',
            },
        ),
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('account', models.CharField(max_length=45)),
                ('password', models.CharField(max_length=2000)),
                ('name', models.CharField(max_length=45)),
                ('email', models.EmailField(max_length=254)),
                ('phone_number', models.CharField(max_length=45)),
                ('birth_date', models.DateField(null=True)),
                ('recommender', models.CharField(max_length=45, null=True)),
                ('event_name', models.CharField(max_length=100, null=True)),
                ('mileage', models.DecimalField(decimal_places=2, max_digits=10)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('gender', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='user.gender')),
                ('grade', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='user.grade')),
                ('terms_and_condition', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='user.termsandcondition')),
            ],
            options={
                'db_table': 'users',
            },
        ),
        migrations.CreateModel(
            name='Address',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
                ('is_active', models.BooleanField(default=False)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='user.user')),
            ],
            options={
                'db_table': 'addresses',
            },
        ),
    ]
