# Generated by Django 3.1.2 on 2022-11-02 21:59

import django.contrib.auth.models
import django.contrib.auth.validators
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('nomencladores', '0001_initial'),
        ('auth', '0012_alter_user_first_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[django.contrib.auth.validators.UnicodeUsernameValidator()], verbose_name='username')),
                ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
                ('first_name', models.CharField(max_length=100)),
                ('last_name', models.CharField(max_length=200)),
                ('email', models.EmailField(max_length=254, unique=True)),
                ('is_staff', models.BooleanField(default=False)),
                ('is_superuser', models.BooleanField(default=False)),
                ('nombre', models.CharField(max_length=100)),
                ('apellidos', models.CharField(max_length=255)),
                ('telefono', models.CharField(blank=True, max_length=250, null=True)),
                ('img_usuario', models.ImageField(blank=True, null=True, upload_to='img_usuarios/')),
                ('entidad', models.CharField(blank=True, max_length=250, null=True)),
                ('fecha_registro', models.DateTimeField(auto_now_add=True)),
                ('fecha_actualizacion', models.DateTimeField(auto_now=True)),
                ('fecha_actualizacion_password', models.DateTimeField(blank=True, null=True)),
                ('fecha_deshabilitacion', models.DateTimeField(blank=True, null=True)),
                ('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')),
                ('municipio', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='nomencladores.municipio')),
                ('pais', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='nomencladores.pais')),
                ('provincia', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='nomencladores.provincia')),
                ('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': 'usuario',
                'verbose_name_plural': 'usuarios',
                'db_table': 'auth_user',
                'ordering': ['id'],
                'permissions': (('enable_usuario', 'Can enable usuario'), ('disable_usuario', 'Can disable usuario'), ('change_contraseña_usuario_actual', 'Can change contraseña usuario actual'), ('change_contraseña', 'Can change contraseña'), ('delete_usuarios_seleccionados', 'Can delete usuarios seleccionados'), ('enable_group', 'Can enable group'), ('disnable_group', 'Can disnable group'), ('view_menu_administracion', 'Can view menu administracion'), ('view_inicio', 'Can view inicio'), ('view_graficos', 'Can view graficos'), ('view_grafico_cantidades', 'Can view grafico cantidades'), ('view_grafico_gravedad', 'Can view grafico gravedad')),
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
    ]
