# Generated by Django 2.1.5 on 2019-01-20 04:01

from django.conf import settings
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import uuid


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0009_alter_user_last_name_max_length'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Driver',
            fields=[
                ('first_name', models.CharField(max_length=100)),
                ('last_name', models.CharField(max_length=100)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to=settings.AUTH_USER_MODEL)),
                ('type', models.CharField(blank=True, choices=[('sd', 'sedan'), ('sv', 'SUV'), ('vn', 'van'), ('lx', 'Luxury')], default='sd', help_text='vehicle type', max_length=2)),
                ('plate_number', models.CharField(max_length=20)),
                ('max_passenger', models.IntegerField(validators=[django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(6)])),
                ('special_car_info', models.TextField(blank=True, max_length=1000, null=True, verbose_name='special_car_info')),
            ],
            options={
                'ordering': ['last_name', 'first_name'],
            },
        ),
        migrations.CreateModel(
            name='Request',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, help_text='Unique ID for this particular request', primary_key=True, serialize=False)),
                ('create_date', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Creation Date')),
                ('destination', models.CharField(max_length=200)),
                ('arrival_time', models.DateTimeField(blank=True, null=True)),
                ('passenger_num', models.IntegerField(default=1, validators=[django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(6)])),
                ('share_or_not', models.BooleanField(default=False)),
                ('type', models.CharField(blank=True, choices=[('sd', 'sedan'), ('sv', 'SUV'), ('vn', 'van'), ('lx', 'Luxury')], help_text='vehicle type', max_length=2, null=True)),
                ('special_car_info', models.TextField(blank=True, max_length=1000, null=True, verbose_name='special_car_info')),
                ('remarks', models.TextField(blank=True, max_length=1000, null=True, verbose_name='remarks')),
                ('status', models.CharField(blank=True, choices=[('rq', 'Requested'), ('cf', 'Confirmed'), ('op', 'Open'), ('cp', 'Complete')], default='rq', help_text='Request Status', max_length=2)),
                ('owner', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['create_date', 'owner'],
            },
        ),
        migrations.AddField(
            model_name='driver',
            name='request',
            field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='orders.Request'),
        ),
    ]
