# -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2017-11-26 15:35
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')),
                ('nodocumento', models.CharField(max_length=11)),
                ('tipdocumento', models.CharField(max_length=10)),
                ('direccion', models.CharField(max_length=500)),
                ('contacto', models.CharField(max_length=50)),
                ('nombre', models.CharField(max_length=300)),
            ],
        ),
        migrations.CreateModel(
            name='Detalle',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('noorden', models.IntegerField(default=0)),
                ('unidadmedida', models.CharField(max_length=50)),
                ('cantidad', models.IntegerField(default=0)),
                ('precio', models.IntegerField(default=0)),
                ('producto', models.CharField(max_length=200)),
                ('igv', models.IntegerField(default=0)),
            ],
        ),
        migrations.CreateModel(
            name='Direccion',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombreCalle', models.CharField(max_length=200)),
                ('distrito', models.CharField(max_length=50)),
                ('ciudad', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Documento',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('tipdocumento', models.IntegerField(default=0)),
                ('fechaemision', models.DateTimeField()),
                ('tipmoneda', models.CharField(max_length=50)),
                ('total', models.FloatField()),
                ('idCliente', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='pruebaHackaton.Cliente')),
            ],
        ),
        migrations.CreateModel(
            name='Person',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('first_name', models.CharField(max_length=30)),
                ('last_name', models.CharField(max_length=30)),
            ],
        ),
        migrations.CreateModel(
            name='TotalesView',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
        ),
        migrations.CreateModel(
            name='Usuario',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('username', models.CharField(max_length=30)),
                ('password', models.CharField(max_length=30)),
                ('ruc', models.CharField(max_length=30)),
                ('nombreComercial', models.CharField(max_length=500, null='true')),
            ],
        ),
        migrations.AddField(
            model_name='documento',
            name='idUsuario',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='pruebaHackaton.Usuario'),
        ),
        migrations.AddField(
            model_name='direccion',
            name='idUsuario',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='pruebaHackaton.Usuario'),
        ),
        migrations.AddField(
            model_name='detalle',
            name='iddocumento',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='pruebaHackaton.Documento'),
        ),
    ]
