# Generated by Django 3.2.6 on 2021-08-04 20:44

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Country',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200, verbose_name='名称')),
                ('created', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
            ],
            options={
                'verbose_name': '国家',
                'verbose_name_plural': '国家',
                'ordering': ['-created'],
            },
        ),
        migrations.CreateModel(
            name='Province',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200, verbose_name='名称')),
                ('created', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('country', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='provinces', to='address.country', verbose_name='国家')),
            ],
            options={
                'verbose_name': '国家',
                'verbose_name_plural': '国家',
                'ordering': ['-created'],
            },
        ),
        migrations.CreateModel(
            name='County',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200, verbose_name='名称')),
                ('created', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('city', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='counties', to='address.province', verbose_name='县')),
            ],
            options={
                'verbose_name': '国家',
                'verbose_name_plural': '国家',
                'ordering': ['-created'],
            },
        ),
        migrations.CreateModel(
            name='City',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200, verbose_name='名称')),
                ('created', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('province', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='cities', to='address.province', verbose_name='省/州')),
            ],
            options={
                'verbose_name': '国家',
                'verbose_name_plural': '国家',
                'ordering': ['-created'],
            },
        ),
        migrations.CreateModel(
            name='Address',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('country', models.CharField(max_length=200, verbose_name='用户国家')),
                ('province', models.CharField(max_length=200, verbose_name='用户省')),
                ('city', models.CharField(max_length=200, verbose_name='用户市')),
                ('county', models.CharField(max_length=200, verbose_name='用户县')),
                ('address', models.CharField(max_length=200, verbose_name='用户地址')),
                ('company', models.DateTimeField(auto_now_add=True, verbose_name='用户公司')),
                ('email', models.EmailField(max_length=254)),
                ('created', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('customer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='customer_addresses', to='customer.customer', verbose_name='用户')),
            ],
            options={
                'verbose_name': '送货地址',
                'verbose_name_plural': '送货地址',
                'ordering': ['-created'],
            },
        ),
    ]
