# Generated by Django 2.0.9 on 2018-10-22 00:31

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='Bus',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('serial', models.CharField(max_length=150, verbose_name='serial')),
            ],
            options={
                'verbose_name': 'bus',
                'verbose_name_plural': 'buses',
            },
        ),
        migrations.CreateModel(
            name='Driver',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('first_name', models.CharField(max_length=30, verbose_name='first name')),
                ('last_name', models.CharField(max_length=150, verbose_name='last name')),
                ('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')),
                ('is_active', models.BooleanField(default=True, verbose_name='is active?')),
            ],
            options={
                'verbose_name': 'driver',
                'verbose_name_plural': 'drivers',
            },
        ),
        migrations.CreateModel(
            name='Location',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=150, verbose_name='name')),
            ],
            options={
                'verbose_name': 'location',
                'verbose_name_plural': 'locations',
            },
        ),
        migrations.CreateModel(
            name='Seat',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('number', models.IntegerField(verbose_name='number')),
            ],
            options={
                'verbose_name': 'seat',
                'verbose_name_plural': 'seats',
            },
        ),
        migrations.CreateModel(
            name='SeatBus',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('bus', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='travel.Bus', verbose_name='bus')),
                ('seat', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='travel.Seat', verbose_name='seat')),
            ],
        ),
        migrations.CreateModel(
            name='SeatUbication',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ubication', models.CharField(max_length=150, verbose_name='ubication')),
            ],
            options={
                'verbose_name': 'seat ubication',
                'verbose_name_plural': 'seat ubications',
            },
        ),
        migrations.CreateModel(
            name='Ticket',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('passenger', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='passenger')),
                ('seat', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='travel.SeatBus', verbose_name='seat')),
            ],
            options={
                'verbose_name': 'trip',
                'verbose_name_plural': 'trips',
            },
        ),
        migrations.CreateModel(
            name='Trip',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('departure', models.DateTimeField(verbose_name='departure')),
                ('driver', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='travel.Driver', verbose_name='driver')),
                ('from_location', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='from_location', to='travel.Location', verbose_name='from')),
                ('to_location', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='to_location', to='travel.Location', verbose_name='to')),
            ],
            options={
                'verbose_name': 'trip',
                'verbose_name_plural': 'trips',
            },
        ),
        migrations.AddField(
            model_name='ticket',
            name='trip',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='travel.Trip', verbose_name='trip'),
        ),
        migrations.AddField(
            model_name='seat',
            name='seat_ubication',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='travel.SeatUbication', verbose_name='seat ubication'),
        ),
        migrations.AddField(
            model_name='bus',
            name='seats',
            field=models.ManyToManyField(blank=True, null=True, through='travel.SeatBus', to='travel.Seat'),
        ),
    ]

# Generated by Django 2.0.9 on 2018-10-22 00:31

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='Bus',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('serial', models.CharField(max_length=150, verbose_name='serial')),
            ],
            options={
                'verbose_name': 'bus',
                'verbose_name_plural': 'buses',
            },
        ),
        migrations.CreateModel(
            name='Driver',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('first_name', models.CharField(max_length=30, verbose_name='first name')),
                ('last_name', models.CharField(max_length=150, verbose_name='last name')),
                ('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')),
                ('is_active', models.BooleanField(default=True, verbose_name='is active?')),
            ],
            options={
                'verbose_name': 'driver',
                'verbose_name_plural': 'drivers',
            },
        ),
        migrations.CreateModel(
            name='Location',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=150, verbose_name='name')),
            ],
            options={
                'verbose_name': 'location',
                'verbose_name_plural': 'locations',
            },
        ),
        migrations.CreateModel(
            name='Seat',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('number', models.IntegerField(verbose_name='number')),
            ],
            options={
                'verbose_name': 'seat',
                'verbose_name_plural': 'seats',
            },
        ),
        migrations.CreateModel(
            name='SeatBus',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('bus', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='travel.Bus', verbose_name='bus')),
                ('seat', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='travel.Seat', verbose_name='seat')),
            ],
        ),
        migrations.CreateModel(
            name='SeatUbication',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ubication', models.CharField(max_length=150, verbose_name='ubication')),
            ],
            options={
                'verbose_name': 'seat ubication',
                'verbose_name_plural': 'seat ubications',
            },
        ),
        migrations.CreateModel(
            name='Ticket',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('passenger', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='passenger')),
                ('seat', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='travel.SeatBus', verbose_name='seat')),
            ],
            options={
                'verbose_name': 'trip',
                'verbose_name_plural': 'trips',
            },
        ),
        migrations.CreateModel(
            name='Trip',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('departure', models.DateTimeField(verbose_name='departure')),
                ('driver', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='travel.Driver', verbose_name='driver')),
                ('from_location', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='from_location', to='travel.Location', verbose_name='from')),
                ('to_location', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='to_location', to='travel.Location', verbose_name='to')),
            ],
            options={
                'verbose_name': 'trip',
                'verbose_name_plural': 'trips',
            },
        ),
        migrations.AddField(
            model_name='ticket',
            name='trip',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='travel.Trip', verbose_name='trip'),
        ),
        migrations.AddField(
            model_name='seat',
            name='seat_ubication',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='travel.SeatUbication', verbose_name='seat ubication'),
        ),
        migrations.AddField(
            model_name='bus',
            name='seats',
            field=models.ManyToManyField(blank=True, null=True, through='travel.SeatBus', to='travel.Seat'),
        ),
    ]

# Generated by Django 2.0.9 on 2018-10-22 00:31