# Generated by Django 2.2.8 on 2020-01-21 20:26

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


class Migration(migrations.Migration):

    dependencies = [
        ('products', '0010_auto_20200117_2310'),
    ]

    operations = [
        migrations.CreateModel(
            name='clients',
            fields=[
                ('rut', models.CharField(max_length=14, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=15)),
                ('last_name', models.CharField(max_length=15)),
                ('phone', models.CharField(max_length=14)),
            ],
        ),
        migrations.CreateModel(
            name='details',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='products.products')),
            ],
        ),
        migrations.CreateModel(
            name='user',
            fields=[
                ('rut', models.CharField(max_length=14, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=15)),
                ('last_name', models.CharField(max_length=15)),
                ('type', models.IntegerField(choices=[(1, 'admin'), (2, 'vendedor'), (3, 'propietario')])),
            ],
        ),
        migrations.CreateModel(
            name='sales',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('buyer_name', models.CharField(max_length=35)),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('taxes', models.FloatField(max_length=10)),
                ('total', models.FloatField(max_length=15)),
                ('client', models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, to='products.clients')),
                ('detail', models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, to='products.details')),
                ('seller', models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, to='products.user')),
            ],
        ),
    ]
