# -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2016-12-02 07:51
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Agencia',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombre', models.CharField(max_length=20)),
                ('codigo', models.CharField(max_length=2)),
                ('direccion', models.CharField(max_length=100)),
            ],
            options={
                'verbose_name_plural': 'Agencias',
                'verbose_name': 'Agencia',
            },
        ),
        migrations.CreateModel(
            name='Ahorro',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('importe', models.IntegerField()),
                ('observacion', models.CharField(blank=True, max_length=150, null=True)),
            ],
            options={
                'verbose_name_plural': 'Ahorros',
                'verbose_name': 'Ahorro',
            },
        ),
        migrations.CreateModel(
            name='Cargo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombre', models.CharField(max_length=30)),
                ('descripcion', models.CharField(blank=True, max_length=100, null=True)),
            ],
            options={
                'verbose_name_plural': 'Cargos',
                'verbose_name': 'Cargo',
            },
        ),
        migrations.CreateModel(
            name='Empleado',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('codigo', models.CharField(max_length=4)),
                ('iniciales', models.CharField(max_length=3)),
                ('ventanilla', models.CharField(max_length=2)),
                ('condicion', models.CharField(max_length=20)),
                ('nivel', models.CharField(max_length=20)),
                ('modificar_interes', models.BooleanField(default=False)),
                ('eliminar_movimiento', models.BooleanField(default=False)),
                ('modificar_socio', models.BooleanField(default=False)),
                ('rubro', models.CharField(max_length=30)),
                ('agencia', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='financiero.Agencia')),
                ('cargo', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='financiero.Cargo')),
            ],
            options={
                'verbose_name_plural': 'Empleados',
                'verbose_name': 'Empleado',
            },
        ),
        migrations.CreateModel(
            name='Entrega',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('fecha', models.DateField(auto_now_add=True)),
                ('fec_primera_cuota', models.DateTimeField()),
            ],
            options={
                'verbose_name_plural': 'Entregas',
                'verbose_name': 'Entrega',
            },
        ),
        migrations.CreateModel(
            name='Ocupacion',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombre', models.CharField(max_length=50)),
            ],
            options={
                'verbose_name_plural': 'Ocupaciones',
                'verbose_name': 'Ocupacion',
            },
        ),
        migrations.CreateModel(
            name='Persona',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombres', models.CharField(max_length=30)),
                ('ap_paterno', models.CharField(max_length=30)),
                ('ap_materno', models.CharField(max_length=30)),
                ('dni', models.CharField(max_length=8)),
                ('celular', models.CharField(max_length=12)),
                ('estado_civil', models.CharField(max_length=20)),
                ('sexo', models.CharField(max_length=1)),
                ('email', models.EmailField(max_length=50)),
                ('fec_nacimiento', models.DateField()),
            ],
            options={
                'verbose_name_plural': 'Personas',
                'verbose_name': 'Persona',
            },
        ),
        migrations.CreateModel(
            name='Prestamo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('numero', models.CharField(max_length=5)),
                ('fecha', models.DateField()),
                ('importe', models.IntegerField()),
                ('cuotas', models.IntegerField()),
                ('tiene_garante', models.BooleanField(default=False)),
                ('tiene_pagare', models.BooleanField(default=False)),
                ('firma_mutua', models.BooleanField(default=False)),
            ],
            options={
                'verbose_name_plural': 'Prestamos',
                'verbose_name': 'Prestamo',
            },
        ),
        migrations.CreateModel(
            name='ServFinanciero',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombre', models.CharField(max_length=50)),
                ('taza', models.DecimalField(decimal_places=2, max_digits=4)),
            ],
            options={
                'verbose_name_plural': 'ServFinancieros',
                'verbose_name': 'ServFinanciero',
            },
        ),
        migrations.CreateModel(
            name='Socio',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('razon_social', models.CharField(max_length=50)),
                ('domicilio', models.CharField(max_length=200)),
                ('referencia', models.CharField(max_length=200)),
                ('medidor', models.CharField(max_length=7)),
                ('tipo_vivienda', models.CharField(max_length=40)),
                ('observacion', models.CharField(blank=True, max_length=200, null=True)),
                ('codigo', models.IntegerField()),
                ('fecha', models.DateField(auto_now_add=True)),
                ('estado', models.BooleanField(default=True)),
                ('ocupacion', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='financiero.Ocupacion')),
                ('persona', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='financiero.Persona')),
            ],
            options={
                'verbose_name_plural': 'Socios',
                'verbose_name': 'Socio',
            },
        ),
        migrations.CreateModel(
            name='TipoAhorro',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombre', models.CharField(max_length=30)),
            ],
            options={
                'verbose_name_plural': 'TipoAhorros',
                'verbose_name': 'TipoAhorro',
            },
        ),
        migrations.CreateModel(
            name='TipoMovimiento',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombre', models.CharField(max_length=70)),
            ],
            options={
                'verbose_name_plural': 'TipoMovimientos',
                'verbose_name': 'TipoMovimiento',
            },
        ),
        migrations.CreateModel(
            name='TipoPrestamo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombre', models.CharField(max_length=70)),
                ('taza', models.DecimalField(decimal_places=2, max_digits=6)),
            ],
            options={
                'verbose_name_plural': 'TipoPrestamos',
                'verbose_name': 'TipoPrestamo',
            },
        ),
        migrations.AddField(
            model_name='prestamo',
            name='socio',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='financiero.Socio'),
        ),
        migrations.AddField(
            model_name='prestamo',
            name='tipo_prestamo',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='financiero.TipoPrestamo'),
        ),
        migrations.AddField(
            model_name='entrega',
            name='prestamo',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='financiero.Prestamo'),
        ),
        migrations.AddField(
            model_name='empleado',
            name='persona',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='financiero.Persona'),
        ),
        migrations.AddField(
            model_name='ahorro',
            name='empleado',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='financiero.Empleado'),
        ),
        migrations.AddField(
            model_name='ahorro',
            name='serv_financiero',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='financiero.ServFinanciero'),
        ),
        migrations.AddField(
            model_name='ahorro',
            name='socio',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='financiero.Socio'),
        ),
        migrations.AddField(
            model_name='ahorro',
            name='tipo_ahorro',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='financiero.TipoAhorro'),
        ),
        migrations.AddField(
            model_name='ahorro',
            name='tipo_movimiento',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='financiero.TipoMovimiento'),
        ),
    ]
