# Generated by Django 2.1.1 on 2018-09-23 21:34

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='Bicicleta',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('descripcion', models.TextField(default='')),
                ('factura', models.ImageField(blank=True, upload_to='facturas/', verbose_name='Factura')),
                ('foto', models.ImageField(blank=True, upload_to='fotos/', verbose_name='Foto')),
            ],
        ),
        migrations.CreateModel(
            name='Color',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombre', models.CharField(max_length=255, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='Estilo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombre', models.CharField(max_length=255, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='Marca',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombre', models.CharField(max_length=255, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='Region',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombre', models.CharField(max_length=255, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='Usuario',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombre', models.CharField(max_length=255)),
                ('apellido', models.CharField(max_length=255)),
                ('rut', models.CharField(max_length=30, unique=True)),
                ('telefono', models.CharField(max_length=100)),
                ('direccion', models.CharField(max_length=255)),
                ('region', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='backend.Region')),
                ('usuario', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='userapp', to=settings.AUTH_USER_MODEL, verbose_name='Usuario')),
            ],
        ),
        migrations.AddField(
            model_name='bicicleta',
            name='color_primario',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='color_primario', to='backend.Color'),
        ),
        migrations.AddField(
            model_name='bicicleta',
            name='color_secundario',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='color_secundario', to='backend.Color'),
        ),
        migrations.AddField(
            model_name='bicicleta',
            name='estilo',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.Estilo'),
        ),
        migrations.AddField(
            model_name='bicicleta',
            name='marca',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.Marca'),
        ),
    ]
