# Generated by Django 2.2.4 on 2019-08-08 13:55

import django.contrib.gis.db.models.fields
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Country',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=250, verbose_name='name')),
            ],
            options={
                'verbose_name': 'country',
                'verbose_name_plural': 'countries',
            },
        ),
        migrations.CreateModel(
            name='Region',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=250, verbose_name='name')),
                ('code', models.CharField(max_length=250, verbose_name='code')),
                ('country', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='location.Country', verbose_name='country')),
                ('parent_region', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.CASCADE, to='location.Region', verbose_name='parent region')),
            ],
            options={
                'verbose_name': 'region',
                'verbose_name_plural': 'regions',
            },
        ),
        migrations.CreateModel(
            name='City',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=250, verbose_name='name')),
                ('code', models.CharField(max_length=250, verbose_name='code')),
                ('postal_code', models.CharField(default='', help_text='Ex.: 350018', max_length=10, verbose_name='postal code')),
                ('is_island', models.BooleanField(default=False, verbose_name='is island')),
                ('country', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='location.Country', verbose_name='country')),
                ('region', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='location.Region', verbose_name='parent region')),
            ],
            options={
                'verbose_name': 'city',
                'verbose_name_plural': 'cities',
            },
        ),
        migrations.CreateModel(
            name='Address',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('street_name_1', models.CharField(blank=True, default='', max_length=500, verbose_name='street name 1')),
                ('street_name_2', models.CharField(blank=True, default='', max_length=500, verbose_name='street name 2')),
                ('number', models.IntegerField(verbose_name='number')),
                ('postal_code', models.CharField(blank=True, default='', help_text='Ex.: 350018', max_length=10, verbose_name='postal code')),
                ('coordinates', django.contrib.gis.db.models.fields.PointField(blank=True, default=None, null=True, srid=4326, verbose_name='Coordinates')),
                ('city', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='location.City', verbose_name='city')),
            ],
            options={
                'verbose_name': 'Address',
                'verbose_name_plural': 'Address',
            },
        ),
    ]
