# Generated by Django 4.2.4 on 2024-05-04 05:30

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='destination',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('from_destination', models.CharField(choices=[('GIKI', 'GIKI'), ('Peshawar', 'Peshawar'), ('Abbotabad', 'Abbotabad'), ('Pindi', 'Pindi'), ('Islamabad', 'Islamabad'), ('Lahore', 'Lahore')], max_length=20)),
                ('to_destination', models.CharField(choices=[('GIKI', 'GIKI'), ('Peshawar', 'Peshawar'), ('Abbotabad', 'Abbotabad'), ('Pindi', 'Pindi'), ('Islamabad', 'Islamabad'), ('Lahore', 'Lahore')], max_length=20)),
                ('bus_No', models.IntegerField()),
                ('date', models.DateField()),
                ('time', models.TimeField()),
                ('bus_location', models.CharField(max_length=100)),
                ('tickets', models.IntegerField(default=30)),
            ],
        ),
        migrations.CreateModel(
            name='driver',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('driver_name', models.CharField(max_length=30)),
                ('driver_number', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='ticket',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('dest_pk', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='system.destination')),
                ('user_pk', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='destination',
            name='bus_driver',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='system.driver'),
        ),
    ]
