# Generated by Django 2.1.4 on 2018-12-22 14:49

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Address',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=64)),
                ('line_1', models.CharField(max_length=128)),
                ('line_2', models.CharField(blank=True, max_length=128)),
                ('city', models.CharField(max_length=64)),
                ('postcode', models.CharField(max_length=10)),
            ],
        ),
        migrations.CreateModel(
            name='Country',
            fields=[
                ('iso', models.CharField(max_length=2, primary_key=True, serialize=False)),
                ('name_official', models.CharField(max_length=128)),
                ('name', models.CharField(max_length=128)),
                ('sort_priority', models.PositiveIntegerField(default=0)),
            ],
            options={
                'verbose_name_plural': 'Countries',
                'ordering': ('-sort_priority', 'name'),
            },
        ),
        migrations.CreateModel(
            name='ShippingRate',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(help_text='Unique name to refer to this shipping rate by', max_length=32, unique=True)),
                ('rate', models.DecimalField(decimal_places=2, max_digits=12)),
                ('carrier', models.CharField(max_length=64)),
                ('description', models.CharField(max_length=128)),
                ('countries', models.ManyToManyField(to='shipping.Country')),
            ],
        ),
        migrations.AddField(
            model_name='address',
            name='country',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='shipping.Country'),
        ),
    ]
