# Generated by Django 2.2.4 on 2019-08-25 19:41

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Company',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('razon_social', models.CharField(max_length=255)),
                ('commercial_address', models.CharField(max_length=255)),
                ('iibb', models.CharField(max_length=25)),
                ('iva_condition', models.CharField(max_length=75)),
                ('cuit', models.CharField(max_length=13)),
                ('activity_start_date', models.DateField()),
            ],
        ),
        migrations.CreateModel(
            name='Parameters',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('surcharge', models.DecimalField(decimal_places=2, default=0, max_digits=10)),
            ],
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('title', models.CharField(max_length=255)),
                ('product_code', models.CharField(max_length=13)),
                ('wholesaler_code', models.CharField(max_length=13)),
                ('iibb', models.CharField(max_length=25)),
                ('iva', models.DecimalField(decimal_places=2, default=0, max_digits=10)),
                ('list_price', models.DecimalField(decimal_places=2, default=0, max_digits=10)),
                ('surcharge', models.DecimalField(blank=True, decimal_places=2, default=0, max_digits=10)),
                ('picture', models.ImageField(upload_to=None)),
                ('company_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='base.Company')),
            ],
        ),
        migrations.CreateModel(
            name='Presupuesto',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateField()),
                ('quantity', models.IntegerField()),
                ('price', models.DecimalField(decimal_places=2, default=0, max_digits=10)),
                ('iva', models.DecimalField(decimal_places=2, default=0, max_digits=10)),
                ('discounts', models.DecimalField(decimal_places=2, default=0, max_digits=10)),
                ('product_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='base.Product')),
            ],
        ),
        migrations.CreateModel(
            name='Employee',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('company_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='base.Company')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Client',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name_bussinessname', models.CharField(max_length=255)),
                ('commercial_address', models.CharField(max_length=255)),
                ('cuit', models.CharField(max_length=13)),
                ('iva_condition', models.CharField(max_length=75)),
                ('sale_condition', models.CharField(choices=[('CTD', 'contado'), ('CCT', 'Cuenta corriente')], default='CTD', max_length=3)),
                ('company_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='base.Company')),
            ],
        ),
    ]
