# Generated by Django 3.2 on 2022-10-23 19:33

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Categorias',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('descripcion', models.CharField(max_length=20)),
            ],
        ),
        migrations.CreateModel(
            name='Est_civil',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('descripcion', models.CharField(max_length=15)),
            ],
        ),
        migrations.CreateModel(
            name='Eventos',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('descripcion', models.CharField(max_length=20)),
            ],
        ),
        migrations.CreateModel(
            name='Localidades',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombre', models.CharField(max_length=60)),
                ('cp_localidad', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='Parentescos',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('descripcion', models.CharField(max_length=10)),
            ],
        ),
        migrations.CreateModel(
            name='Provincias',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombre', models.CharField(max_length=31)),
            ],
        ),
        migrations.CreateModel(
            name='Tipo_doc',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('descripcion', models.CharField(max_length=10)),
            ],
        ),
        migrations.CreateModel(
            name='Personal',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('foto', models.ImageField(default='default.jpg', upload_to='fotos_pers', verbose_name='Foto Personal')),
                ('apellidos', models.CharField(max_length=30, verbose_name='Apellidos')),
                ('nombres', models.CharField(max_length=40, verbose_name='Nombres')),
                ('documento', models.CharField(max_length=8, validators=[personal.validators.validate_dni], verbose_name='Num. Documento')),
                ('cuil', models.CharField(max_length=11, validators=[personal.validators.validate_cuil], verbose_name='CUIL')),
                ('fecha_nacimiento', models.DateField(validators=[personal.validators.validate_fecha_nacimiento], verbose_name='Fecha de Nacimiento')),
                ('fecha_ingreso', models.DateField(validators=[personal.validators.validate_fecha_ingreso], verbose_name='Fecha de Ingreso')),
                ('fecha_egreso', models.DateField(blank=True, null=True, verbose_name='Fecha de Egreso')),
                ('domicilio', models.CharField(max_length=50, verbose_name='Domicilio')),
                ('tel', models.CharField(max_length=15, verbose_name='Teléfono')),
                ('email', models.EmailField(blank=True, max_length=254, null=True, verbose_name='Email')),
                ('saldo_licencia', models.SmallIntegerField(default=14, verbose_name='Saldo de Licencia')),
                ('licencia_curso', models.SmallIntegerField(default=2022, verbose_name='Licencia en Curso')),
                ('fecha_regreso', models.DateField(blank=True, null=True, verbose_name='Fecha de Regreso')),
                ('id_categoria', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='personal.categorias', verbose_name='Categoria')),
                ('id_documento', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='personal.tipo_doc', verbose_name='Tipo Documento')),
                ('id_est_civil', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='personal.est_civil', verbose_name='Estado Civil')),
                ('id_localidad', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='personal.localidades', verbose_name='Localidad')),
                ('id_provincia', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='personal.provincias', verbose_name='Provincia')),
            ],
            options={
                'verbose_name': 'personal',
                'verbose_name_plural': 'Personal',
            },
        ),
        migrations.AddField(
            model_name='localidades',
            name='id_provincia',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='personal.provincias'),
        ),
    ]
