# Generated by Django 3.2 on 2021-06-08 18:16

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Artista',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombre', models.CharField(max_length=30)),
                ('descripcion', models.CharField(max_length=100)),
            ],
            options={
                'verbose_name': 'artista',
            },
        ),
        migrations.CreateModel(
            name='Categoria',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('descripcion', models.CharField(max_length=100)),
            ],
            options={
                'verbose_name': 'categoria',
            },
        ),
        migrations.CreateModel(
            name='Cliente',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('rut', models.IntegerField()),
                ('dv', models.CharField(max_length=1)),
                ('nombre', models.CharField(max_length=20)),
                ('apellido_paterno', models.CharField(max_length=20)),
                ('apellido_materno', models.CharField(max_length=20)),
                ('telefono', models.CharField(max_length=30)),
                ('email', models.EmailField(max_length=50)),
            ],
            options={
                'verbose_name': 'cliente',
            },
        ),
        migrations.CreateModel(
            name='Comuna',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombre', models.TextField(max_length=30)),
            ],
            options={
                'verbose_name': 'comuna',
            },
        ),
        migrations.CreateModel(
            name='Empleado',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('rut', models.IntegerField()),
                ('dv', models.CharField(max_length=1)),
                ('nombre', models.CharField(max_length=20)),
                ('apellido_paterno', models.CharField(max_length=20)),
                ('apellido_materno', models.CharField(max_length=20)),
                ('contacto', models.CharField(max_length=30)),
                ('email', models.EmailField(max_length=50)),
            ],
            options={
                'verbose_name': 'empleado',
            },
        ),
        migrations.CreateModel(
            name='Marca',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombre', models.CharField(max_length=30)),
                ('descripcion', models.CharField(max_length=100)),
            ],
            options={
                'verbose_name': 'marca',
            },
        ),
        migrations.CreateModel(
            name='Pais',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombre', models.CharField(max_length=30)),
            ],
            options={
                'verbose_name': 'pais',
            },
        ),
        migrations.CreateModel(
            name='Venta',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombre', models.CharField(max_length=30)),
                ('descripcion', models.CharField(max_length=100)),
                ('cliente', models.ForeignKey(default=0, on_delete=django.db.models.deletion.CASCADE, to='src.cliente')),
                ('empleado', models.ForeignKey(default=0, on_delete=django.db.models.deletion.CASCADE, to='src.empleado')),
            ],
            options={
                'verbose_name': 'venta',
            },
        ),
        migrations.CreateModel(
            name='Tipo_producto',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('descripcion', models.CharField(max_length=100)),
                ('categoria', models.ForeignKey(default=0, on_delete=django.db.models.deletion.CASCADE, to='src.categoria')),
            ],
            options={
                'verbose_name': 'tipo_producto',
            },
        ),
        migrations.CreateModel(
            name='Sucursal',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('direccion', models.TextField(default=0)),
                ('comuna', models.ForeignKey(default=0, on_delete=django.db.models.deletion.CASCADE, to='src.comuna')),
            ],
            options={
                'verbose_name': 'sucursal',
            },
        ),
        migrations.CreateModel(
            name='Region',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombre', models.CharField(max_length=30)),
                ('pais', models.ForeignKey(default=0, on_delete=django.db.models.deletion.CASCADE, to='src.pais')),
            ],
            options={
                'verbose_name': 'region',
            },
        ),
        migrations.CreateModel(
            name='Producto',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombre', models.CharField(max_length=30)),
                ('descripcion', models.CharField(max_length=100)),
                ('precio', models.IntegerField()),
                ('imagen', models.ImageField(blank=True, default=None, null=True, upload_to='instrumentos')),
                ('marca', models.ForeignKey(default=0, on_delete=django.db.models.deletion.CASCADE, to='src.marca')),
                ('tipo_producto', models.ForeignKey(default=0, on_delete=django.db.models.deletion.CASCADE, to='src.tipo_producto')),
            ],
            options={
                'verbose_name': 'producto',
            },
        ),
        migrations.CreateModel(
            name='Detalle_venta',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('cantidad', models.CharField(max_length=30)),
                ('producto', models.ForeignKey(default=0, on_delete=django.db.models.deletion.CASCADE, to='src.producto')),
                ('venta', models.ForeignKey(default=0, on_delete=django.db.models.deletion.CASCADE, to='src.venta')),
            ],
            options={
                'verbose_name': 'detalle_venta',
            },
        ),
        migrations.AddField(
            model_name='comuna',
            name='region',
            field=models.ForeignKey(default=0, on_delete=django.db.models.deletion.CASCADE, to='src.region'),
        ),
    ]
