# Generated by Django 5.2.10 on 2026-03-06 14:37

import django.db.models.deletion
import django_resaas.models.documento
import django_resaas.models.entidade
import django_resaas.models.tipo_entidade
import django_resaas.models.user
import uuid
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0012_alter_user_first_name_max_length'),
        ('contenttypes', '0002_remove_content_type_name'),
    ]

    operations = [
        migrations.CreateModel(
            name='FrontEnd',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(max_length=100)),
                ('fek', models.CharField(max_length=255, unique=True)),
                ('fep', models.CharField(max_length=255)),
                ('access', models.CharField(choices=[('read', 'Read'), ('write', 'Write'), ('readwrite', 'Read & Write'), ('super', 'Super')], default='read', max_length=20)),
                ('estado', models.IntegerField(choices=[(0, 'Inativo'), (1, 'Ativo')], default=1)),
            ],
            options={
                'permissions': (),
            },
        ),
        migrations.CreateModel(
            name='TipoDocumento',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('nome', models.CharField(max_length=200)),
                ('detalhes', models.CharField(max_length=200)),
            ],
        ),
        migrations.CreateModel(
            name='User',
            fields=[
                ('deleted_at', models.DateTimeField(blank=True, null=True)),
                ('estado', models.IntegerField(choices=[(0, 'Inativo'), (1, 'Ativo')], default=0, null=True)),
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('perfil', models.ImageField(blank=True, default='user.png', null=True, upload_to=django_resaas.models.user.profile_image_path)),
                ('username', models.CharField(max_length=255)),
                ('first_name', models.CharField(blank=True, max_length=255, null=True)),
                ('last_name', models.CharField(blank=True, max_length=255, null=True)),
                ('mobile', models.CharField(blank=True, default=None, max_length=55, null=True, unique=True)),
                ('is_verified_mobile', models.BooleanField(default=False)),
                ('counter', models.IntegerField(default=0)),
                ('email', models.EmailField(blank=True, default=None, max_length=255, null=True, unique=True)),
                ('is_verified_email', models.BooleanField(default=False)),
                ('is_active', models.BooleanField(default=True)),
                ('is_staff', models.BooleanField(default=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('auth_provider', models.CharField(choices=[('email', 'email'), ('facebook', 'facebook'), ('google', 'google'), ('twitter', 'twitter'), ('mobile', 'maobile')], default='email', max_length=255)),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_created', to=settings.AUTH_USER_MODEL)),
                ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.group', verbose_name='groups')),
                ('updated_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_updated', to=settings.AUTH_USER_MODEL)),
                ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.permission', verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'User',
                'verbose_name_plural': 'Users',
                'permissions': (),
            },
        ),
        migrations.CreateModel(
            name='Endereco',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('deleted_at', models.DateTimeField(blank=True, null=True)),
                ('estado', models.IntegerField(choices=[(0, 'Inativo'), (1, 'Ativo')], default=0, null=True)),
                ('latitude', models.DecimalField(blank=True, decimal_places=6, max_digits=9, null=True)),
                ('longitude', models.DecimalField(blank=True, decimal_places=6, max_digits=9, null=True)),
                ('rua', models.CharField(blank=True, max_length=255, null=True)),
                ('numero', models.CharField(blank=True, max_length=50, null=True)),
                ('bairro', models.CharField(blank=True, max_length=100, null=True)),
                ('cidade', models.CharField(blank=True, max_length=100, null=True)),
                ('provincia', models.CharField(blank=True, max_length=100, null=True)),
                ('pais', models.CharField(default='Moçambique', max_length=100)),
                ('codigo_postal', models.CharField(blank=True, max_length=20, null=True)),
                ('complemento', models.TextField(blank=True, null=True)),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_created', to=settings.AUTH_USER_MODEL)),
                ('updated_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_updated', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Endereço',
                'verbose_name_plural': 'Endereços',
                'permissions': (),
            },
        ),
        migrations.CreateModel(
            name='Entidade',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('deleted_at', models.DateTimeField(blank=True, null=True)),
                ('estado', models.IntegerField(choices=[(0, 'Inativo'), (1, 'Ativo')], default=0, null=True)),
                ('nome', models.CharField(default='-', max_length=100, null=True)),
                ('logo', models.FileField(blank=True, default='logo.png', upload_to=django_resaas.models.entidade.logo_path)),
                ('display_logo', models.BooleanField(blank=True, default=True, null=True)),
                ('display_bar', models.BooleanField(blank=True, default=True, null=True)),
                ('display_qr', models.BooleanField(blank=True, default=True, null=True)),
                ('rodape', models.CharField(max_length=2000, null=True)),
                ('disc_space', models.FloatField(default=1048576.0, null=True)),
                ('disc_used_space', models.FloatField(default=0.0, null=True)),
                ('disc_free_space', models.FloatField(default=1048576.0, null=True)),
                ('admins', models.ManyToManyField(to=settings.AUTH_USER_MODEL)),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_created', to=settings.AUTH_USER_MODEL)),
                ('updated_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_updated', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'permissions': (),
            },
        ),
        migrations.CreateModel(
            name='EntidadeModelo',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('deleted_at', models.DateTimeField(blank=True, null=True)),
                ('estado', models.IntegerField(choices=[(0, 'Inativo'), (1, 'Ativo')], default=0, null=True)),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_created', to=settings.AUTH_USER_MODEL)),
                ('entidade', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='django_resaas.entidade')),
                ('modelo', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.contenttype')),
                ('updated_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_updated', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'permissions': (),
            },
        ),
        migrations.CreateModel(
            name='EntidadeUser',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('deleted_at', models.DateTimeField(blank=True, null=True)),
                ('estado', models.IntegerField(choices=[(0, 'Inativo'), (1, 'Ativo')], default=0, null=True)),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_created', to=settings.AUTH_USER_MODEL)),
                ('entidade', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='django_resaas.entidade')),
                ('updated_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_updated', to=settings.AUTH_USER_MODEL)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'permissions': (),
            },
        ),
        migrations.CreateModel(
            name='Ficheiro',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('deleted_at', models.DateTimeField(blank=True, null=True)),
                ('ficheiro', models.FileField(blank=True, null=True, upload_to='ficheiros')),
                ('size', models.FloatField()),
                ('modelo', models.CharField(help_text='Nome do modelo que originou o ficheiro', max_length=100, null=True)),
                ('estado', models.IntegerField(choices=[(0, 'Inactivo'), (1, 'Activo')], default=1, null=True)),
                ('funcionalidade', models.CharField(choices=[('File', 'File'), ('Perfil', 'Perfil'), ('Logo', 'Logo'), ('Foto', 'Foto'), ('CapaSite', 'CapaSite')], default='File', max_length=100, null=True)),
                ('chamador', models.CharField(blank=True, max_length=100, null=True)),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_created', to=settings.AUTH_USER_MODEL)),
                ('updated_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_updated', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'permissions': (),
            },
        ),
        migrations.CreateModel(
            name='Idioma',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('deleted_at', models.DateTimeField(blank=True, null=True)),
                ('estado', models.IntegerField(choices=[(0, 'Inativo'), (1, 'Ativo')], default=0, null=True)),
                ('nome', models.CharField(max_length=100)),
                ('code', models.CharField(max_length=10, unique=True)),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_created', to=settings.AUTH_USER_MODEL)),
                ('updated_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_updated', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'permissions': (),
            },
        ),
        migrations.AddField(
            model_name='user',
            name='language',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='django_resaas.idioma'),
        ),
        migrations.CreateModel(
            name='ModeloExtra',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('deleted_at', models.DateTimeField(blank=True, null=True)),
                ('estado', models.IntegerField(choices=[(0, 'Inativo'), (1, 'Ativo')], default=0, null=True)),
                ('modelo', models.CharField(max_length=100, null=True)),
                ('icon', models.CharField(max_length=100, null=True)),
                ('method', models.CharField(max_length=50, null=True)),
                ('permission', models.CharField(max_length=100, null=True)),
                ('details', models.BooleanField(default=False)),
                ('url', models.CharField(max_length=300, null=True)),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_created', to=settings.AUTH_USER_MODEL)),
                ('updated_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_updated', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'permissions': (),
            },
        ),
        migrations.CreateModel(
            name='Modulo',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('deleted_at', models.DateTimeField(blank=True, null=True)),
                ('estado', models.IntegerField(choices=[(0, 'Inativo'), (1, 'Ativo')], default=0, null=True)),
                ('nome', models.CharField(max_length=100, null=True)),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_created', to=settings.AUTH_USER_MODEL)),
                ('updated_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_updated', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'permissions': (),
            },
        ),
        migrations.CreateModel(
            name='EntidadeModulo',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('deleted_at', models.DateTimeField(blank=True, null=True)),
                ('estado', models.IntegerField(choices=[(0, 'Inativo'), (1, 'Ativo')], default=0, null=True)),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_created', to=settings.AUTH_USER_MODEL)),
                ('entidade', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='django_resaas.entidade')),
                ('updated_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_updated', to=settings.AUTH_USER_MODEL)),
                ('modulo', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='django_resaas.modulo')),
            ],
            options={
                'permissions': (),
            },
        ),
        migrations.CreateModel(
            name='Sucursal',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('deleted_at', models.DateTimeField(blank=True, null=True)),
                ('estado', models.IntegerField(choices=[(0, 'Inativo'), (1, 'Ativo')], default=0, null=True)),
                ('nome', models.CharField(max_length=100, null=True)),
                ('rodape', models.CharField(default='.', max_length=600, null=True)),
                ('icon', models.CharField(default='.', max_length=100, null=True)),
                ('label', models.CharField(default='.', max_length=100, null=True)),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_created', to=settings.AUTH_USER_MODEL)),
                ('endereco', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='django_resaas.endereco')),
                ('entidade', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='django_resaas.entidade')),
                ('updated_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_updated', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'permissions': (),
            },
        ),
        migrations.CreateModel(
            name='SucursalUser',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('deleted_at', models.DateTimeField(blank=True, null=True)),
                ('estado', models.IntegerField(choices=[(0, 'Inativo'), (1, 'Ativo')], default=0, null=True)),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_created', to=settings.AUTH_USER_MODEL)),
                ('sucursal', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='django_resaas.sucursal')),
                ('updated_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_updated', to=settings.AUTH_USER_MODEL)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'permissions': (),
            },
        ),
        migrations.CreateModel(
            name='SucursalUserGroup',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('deleted_at', models.DateTimeField(blank=True, null=True)),
                ('estado', models.IntegerField(choices=[(0, 'Inativo'), (1, 'Ativo')], default=0, null=True)),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_created', to=settings.AUTH_USER_MODEL)),
                ('group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='auth.group')),
                ('sucursal', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='django_resaas.sucursal')),
                ('updated_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_updated', to=settings.AUTH_USER_MODEL)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'permissions': (),
            },
        ),
        migrations.CreateModel(
            name='TipoEntidade',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('deleted_at', models.DateTimeField(blank=True, null=True)),
                ('estado', models.IntegerField(choices=[(0, 'Inativo'), (1, 'Ativo')], default=0, null=True)),
                ('nome', models.CharField(max_length=100, null=True)),
                ('icon', models.FileField(blank=True, default='logo.png', upload_to=django_resaas.models.tipo_entidade.icon_path)),
                ('license', models.TextField(default='license')),
                ('label', models.CharField(max_length=100, null=True)),
                ('ordem', models.IntegerField(default=2)),
                ('crair_entidade', models.BooleanField(default=True, null=True)),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_created', to=settings.AUTH_USER_MODEL)),
                ('updated_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_updated', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'permissions': (),
            },
        ),
        migrations.AddField(
            model_name='entidade',
            name='tipo_entidade',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='django_resaas.tipoentidade'),
        ),
        migrations.CreateModel(
            name='TipoEntidadeGroup',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('deleted_at', models.DateTimeField(blank=True, null=True)),
                ('estado', models.IntegerField(choices=[(0, 'Inativo'), (1, 'Ativo')], default=0, null=True)),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_created', to=settings.AUTH_USER_MODEL)),
                ('group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='auth.group')),
                ('tipo_entidade', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='django_resaas.tipoentidade')),
                ('updated_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_updated', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'permissions': (),
            },
        ),
        migrations.CreateModel(
            name='TipoEntidadeModelo',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('deleted_at', models.DateTimeField(blank=True, null=True)),
                ('estado', models.IntegerField(choices=[(0, 'Inativo'), (1, 'Ativo')], default=0, null=True)),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_created', to=settings.AUTH_USER_MODEL)),
                ('modelo', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.contenttype')),
                ('tipo_entidade', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='django_resaas.tipoentidade')),
                ('updated_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_updated', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'permissions': (),
            },
        ),
        migrations.CreateModel(
            name='TipoEntidadeModulo',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('deleted_at', models.DateTimeField(blank=True, null=True)),
                ('estado', models.IntegerField(choices=[(0, 'Inativo'), (1, 'Ativo')], default=0, null=True)),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_created', to=settings.AUTH_USER_MODEL)),
                ('modulo', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='django_resaas.modulo')),
                ('tipo_entidade', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='django_resaas.tipoentidade')),
                ('updated_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_updated', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'permissions': (),
            },
        ),
        migrations.CreateModel(
            name='Traducao',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('deleted_at', models.DateTimeField(blank=True, null=True)),
                ('estado', models.IntegerField(choices=[(0, 'Inativo'), (1, 'Ativo')], default=0, null=True)),
                ('chave', models.TextField(blank=True, null=True)),
                ('traducao', models.TextField(blank=True, null=True)),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_created', to=settings.AUTH_USER_MODEL)),
                ('idioma', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='django_resaas.idioma')),
                ('updated_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_updated', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'permissions': (),
            },
        ),
        migrations.CreateModel(
            name='UserLogin',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('deleted_at', models.DateTimeField(blank=True, null=True)),
                ('estado', models.IntegerField(choices=[(0, 'Inativo'), (1, 'Ativo')], default=0, null=True)),
                ('dispositivo', models.TextField(null=True)),
                ('mobile', models.CharField(max_length=100, null=True)),
                ('info', models.TextField(null=True)),
                ('local_lat', models.CharField(max_length=100, null=True)),
                ('local_lon', models.CharField(max_length=100, null=True)),
                ('local_nome', models.CharField(max_length=100, null=True)),
                ('is_blocked', models.BooleanField(default=False)),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_created', to=settings.AUTH_USER_MODEL)),
                ('updated_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_updated', to=settings.AUTH_USER_MODEL)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'permissions': (),
            },
        ),
        migrations.CreateModel(
            name='EntidadeGroup',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('deleted_at', models.DateTimeField(blank=True, null=True)),
                ('estado', models.IntegerField(choices=[(0, 'Inativo'), (1, 'Ativo')], default=0, null=True)),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_created', to=settings.AUTH_USER_MODEL)),
                ('entidade', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='django_resaas.entidade')),
                ('group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='auth.group')),
                ('updated_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_updated', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'permissions': (),
                'unique_together': {('entidade', 'group')},
            },
        ),
        migrations.CreateModel(
            name='Pessoa',
            fields=[
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('deleted_at', models.DateTimeField(blank=True, null=True)),
                ('estado', models.IntegerField(choices=[(0, 'Inativo'), (1, 'Ativo')], default=0, null=True)),
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('nome', models.CharField(max_length=100, null=True)),
                ('apelido', models.CharField(max_length=100, null=True)),
                ('nome_completo', models.CharField(blank=True, max_length=200, null=True)),
                ('genero', models.CharField(blank=True, choices=[('M', 'Masculino'), ('F', 'Feminino'), ('O', 'Outro')], max_length=1, null=True)),
                ('data_nascimento', models.DateField(blank=True, null=True)),
                ('nacionalidade', models.CharField(blank=True, max_length=100, null=True)),
                ('email', models.EmailField(blank=True, max_length=254, null=True, unique=True)),
                ('telefone', models.CharField(blank=True, max_length=20, null=True)),
                ('telefone_alternativo', models.CharField(blank=True, max_length=20, null=True)),
                ('observacoes', models.TextField(blank=True, null=True)),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_created', to=settings.AUTH_USER_MODEL)),
                ('endereco', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='pessoas', to='django_resaas.endereco')),
                ('updated_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_updated', to=settings.AUTH_USER_MODEL)),
                ('user', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='pessoa', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Pessoa',
                'verbose_name_plural': 'Pessoas',
                'ordering': ['nome'],
                'indexes': [models.Index(fields=['nome'], name='django_resa_nome_75d7c2_idx'), models.Index(fields=['email'], name='django_resa_email_47cf4d_idx')],
            },
        ),
        migrations.CreateModel(
            name='SucursalGroup',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('deleted_at', models.DateTimeField(blank=True, null=True)),
                ('estado', models.IntegerField(choices=[(0, 'Inativo'), (1, 'Ativo')], default=0, null=True)),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_created', to=settings.AUTH_USER_MODEL)),
                ('group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='auth.group')),
                ('sucursal', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='django_resaas.sucursal')),
                ('updated_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_updated', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'permissions': (),
                'unique_together': {('sucursal', 'group')},
            },
        ),
        migrations.CreateModel(
            name='Documento',
            fields=[
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('deleted_at', models.DateTimeField(blank=True, null=True)),
                ('estado', models.IntegerField(choices=[(0, 'Inativo'), (1, 'Ativo')], default=0, null=True)),
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('numero', models.CharField(max_length=100)),
                ('data_emissao', models.DateField(blank=True, null=True)),
                ('data_validade', models.DateField(blank=True, null=True)),
                ('arquivo', models.FileField(blank=True, null=True, upload_to=django_resaas.models.documento.documento_path)),
                ('object_id', models.UUIDField()),
                ('content_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.contenttype')),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_created', to=settings.AUTH_USER_MODEL)),
                ('updated_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_updated', to=settings.AUTH_USER_MODEL)),
                ('tipo', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='django_resaas.tipodocumento')),
            ],
            options={
                'unique_together': {('tipo', 'numero')},
            },
        ),
    ]
