# -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2015-12-10 14:09
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='Cliente',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ruc', models.CharField(max_length=10, verbose_name='Ruc')),
            ],
            options={
                'verbose_name': 'cliente',
                'verbose_name_plural': 'clientes',
            },
        ),
        migrations.CreateModel(
            name='Empresa',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombre_real', models.CharField(max_length=100, verbose_name='Nombre Real')),
                ('nombre_comercial', models.CharField(max_length=100, verbose_name='Nombre Comercial')),
            ],
            options={
                'ordering': ['nombre_real'],
                'verbose_name': 'empresa',
                'verbose_name_plural': 'empresas',
            },
        ),
        migrations.CreateModel(
            name='Persona',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('cedula', models.CharField(max_length=10, unique=True, verbose_name='C\xe9dula')),
                ('nombre1', models.CharField(max_length=50, verbose_name='Nombre')),
                ('nombre2', models.CharField(blank=True, max_length=50, verbose_name='Segundo Nombre')),
                ('apellido1', models.CharField(max_length=50, verbose_name='Primer Apellido')),
                ('apellido2', models.CharField(blank=True, max_length=50, verbose_name='Segundo Apellido')),
                ('fecha_nacimiento', models.DateField(blank=True, null=True, verbose_name='Fecha Nacimiento')),
                ('empresa', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='entidades.Empresa')),
            ],
            options={
                'ordering': ['apellido1', 'apellido2', 'nombre1'],
                'verbose_name': 'persona',
                'verbose_name_plural': 'personas',
            },
        ),
        migrations.CreateModel(
            name='EmpresaCliente',
            fields=[
                ('cliente_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='entidades.Cliente')),
                ('empresa', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='entidades.Empresa')),
            ],
            options={
                'verbose_name': 'cliente empresa',
                'verbose_name_plural': 'clientes empresas',
            },
            bases=('entidades.cliente',),
        ),
        migrations.CreateModel(
            name='PersonaCliente',
            fields=[
                ('cliente_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='entidades.Cliente')),
                ('persona', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='entidades.Persona')),
            ],
            options={
                'verbose_name': 'cliente persona',
                'verbose_name_plural': 'clientes personas',
            },
            bases=('entidades.cliente',),
        ),
    ]
