# Generated by Django 2.1.5 on 2019-08-08 19:02

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Car',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('number', models.CharField(max_length=15, verbose_name='номер автомобиля')),
                ('car_mark', models.CharField(max_length=30, verbose_name='марка автомобиля')),
                ('car_model', models.CharField(max_length=50, verbose_name='модель автомобиля')),
            ],
            options={
                'verbose_name': 'автомобиль',
                'verbose_name_plural': 'автомобили',
                'ordering': ['number'],
            },
        ),
        migrations.CreateModel(
            name='Driver',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('number_for_invite', models.UUIDField(default=uuid.uuid4, help_text='реф номер для приглашений')),
                ('user_number_for_invite', models.CharField(max_length=150, verbose_name='реф номер пригласителя')),
                ('invited_link', models.CharField(max_length=100, verbose_name='ссылка на того, кто пригласил')),
                ('name', models.CharField(max_length=50, verbose_name='Имя')),
                ('surname', models.CharField(max_length=50, verbose_name='фамилия')),
                ('lastname', models.CharField(max_length=50, verbose_name='отчество')),
                ('phone', models.CharField(blank=True, max_length=15, null=True, verbose_name='телефон')),
                ('balance', models.CharField(blank=True, max_length=150, verbose_name='баланс')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'пользователь',
                'verbose_name_plural': 'пользователи',
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='UserImage',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image', models.ImageField(upload_to='images/user/')),
                ('driver', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='taxi.Driver', verbose_name='img_driver')),
            ],
            options={
                'verbose_name': 'фото',
                'verbose_name_plural': 'фотографии',
            },
        ),
        migrations.AddField(
            model_name='car',
            name='driver',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='taxi.Driver', verbose_name='car_driver'),
        ),
    ]
