# Generated by Django 3.0.6 on 2021-02-08 22:29

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


class Migration(migrations.Migration):

    dependencies = [
        ('locais', '0003_auto_20210207_1441'),
    ]

    operations = [
        migrations.RemoveField(
            model_name='local',
            name='cep',
        ),
        migrations.RemoveField(
            model_name='local',
            name='complemento',
        ),
        migrations.RemoveField(
            model_name='local',
            name='endereco',
        ),
        migrations.RemoveField(
            model_name='local',
            name='estado',
        ),
        migrations.RemoveField(
            model_name='local',
            name='localizacao',
        ),
        migrations.RemoveField(
            model_name='local',
            name='municipio',
        ),
        migrations.RemoveField(
            model_name='local',
            name='numero',
        ),
        migrations.RemoveField(
            model_name='local',
            name='pais',
        ),
        migrations.AlterField(
            model_name='local',
            name='ativo',
            field=models.BooleanField(default=True),
        ),
        migrations.CreateModel(
            name='LocalEndereco',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('localizacao', django.contrib.gis.db.models.fields.PointField(blank=True, null=True, srid=4326)),
                ('endereco', models.CharField(max_length=1000)),
                ('numero', models.CharField(blank=True, max_length=7, null=True)),
                ('complemento', models.CharField(blank=True, max_length=200, null=True)),
                ('bairro', models.CharField(blank=True, max_length=1000, null=True)),
                ('municipio', models.CharField(blank=True, max_length=1000, null=True)),
                ('estado', models.CharField(blank=True, max_length=1000, null=True)),
                ('pais', models.CharField(blank=True, max_length=1000, null=True)),
                ('cep', models.CharField(blank=True, max_length=9, null=True)),
                ('ativo', models.BooleanField(default=True)),
                ('dataCriacao', models.DateTimeField(auto_now_add=True)),
                ('dataAtualizacao', models.DateTimeField(auto_now=True)),
                ('dataPublicacao', models.DateTimeField(auto_now=True)),
                ('slug', django_extensions.db.fields.AutoSlugField(blank=True, editable=False, null=True, populate_from=['id'])),
                ('local', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='estabelecimento', to='locais.Local')),
            ],
            options={
                'verbose_name': 'Endereço',
                'verbose_name_plural': 'Endereços',
                'db_table': 'endereco',
                'managed': True,
            },
        ),
    ]
