# Generated by Django 3.0.7 on 2020-06-13 01:19

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Celula',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(max_length=30)),
                ('celula_pai', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='API.Celula')),
            ],
        ),
        migrations.CreateModel(
            name='Endereco',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('estado', models.CharField(max_length=30)),
                ('cidade', models.CharField(max_length=30)),
                ('bairro', models.CharField(max_length=30)),
                ('endereco', models.CharField(max_length=60)),
                ('numero', models.CharField(max_length=8)),
                ('complemento', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Igreja',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(max_length=30)),
                ('endereco', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='API.Endereco')),
            ],
        ),
        migrations.CreateModel(
            name='Regiao',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(max_length=30)),
            ],
        ),
        migrations.CreateModel(
            name='Supervisor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('igreja', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='API.Igreja')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Relatorio',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('tema', models.CharField(max_length=50)),
                ('data', models.DateField(auto_now=True)),
                ('adultos', models.IntegerField()),
                ('jovens', models.IntegerField()),
                ('adolecentes', models.IntegerField()),
                ('criancas', models.IntegerField()),
                ('visitantes', models.IntegerField()),
                ('homens', models.IntegerField()),
                ('mulheres', models.IntegerField()),
                ('aceitacoes', models.IntegerField()),
                ('recociliacoes', models.IntegerField()),
                ('batismo', models.IntegerField()),
                ('oferta', models.FloatField()),
                ('observacoes', models.TextField()),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='API.Celula')),
            ],
        ),
        migrations.CreateModel(
            name='Pastor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('igreja', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='API.Igreja')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='participante',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('celula', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='API.Celula')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Lider',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('celula', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='API.Celula')),
                ('igreja', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='API.Igreja')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='igreja',
            name='pastor_titular',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='igreja_titular', to='API.Pastor'),
        ),
        migrations.AddField(
            model_name='igreja',
            name='regiao',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='API.Regiao'),
        ),
        migrations.AddField(
            model_name='celula',
            name='endereco',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='API.Endereco'),
        ),
        migrations.AddField(
            model_name='celula',
            name='igreja',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='API.Igreja'),
        ),
        migrations.CreateModel(
            name='Analista',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('regiao', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='API.Regiao')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
