# Generated by Django 3.0 on 2021-09-10 23:02

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Estate',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, help_text='fill in this field if the type of estate is rural', max_length=100, null=True, verbose_name='name')),
                ('address', models.CharField(blank=True, help_text='fill in this field if the type of estate is urban', max_length=100, null=True, verbose_name='name')),
                ('type', models.CharField(choices=[('RURAL', 'RURAL'), ('URBAN', 'URBAN')], default='RURAL', max_length=20, verbose_name='type')),
                ('cadastral_id', models.CharField(max_length=20, unique=True, verbose_name='catastral itentification')),
            ],
            options={
                'verbose_name': 'Estate',
                'verbose_name_plural': 'Estates',
            },
        ),
        migrations.CreateModel(
            name='UsersEstates',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('estate', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='estates.Estate', verbose_name='Estate')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='users.User', verbose_name='User')),
            ],
            options={
                'verbose_name': 'Estates of user',
                'verbose_name_plural': 'Estates of users',
            },
        ),
    ]
