# Generated by Django 3.0.5 on 2020-04-21 12:41

from django.db import migrations, models
import django.db.models.deletion
import django_mysql.models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Station',
            fields=[
                ('stationId', models.CharField(max_length=32, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=32)),
            ],
        ),
        migrations.CreateModel(
            name='Train',
            fields=[
                ('trainNo', models.IntegerField(primary_key=True, serialize=False)),
                ('route', django_mysql.models.ListCharField(models.CharField(max_length=20), max_length=336, size=16)),
                ('trainName', models.CharField(max_length=32)),
                ('totalACSeats', models.IntegerField()),
                ('totalSittingSeats', models.IntegerField()),
                ('totalSleeperSeats', models.IntegerField()),
                ('acfare', models.IntegerField()),
                ('sittingfare', models.IntegerField()),
                ('sleeperfare', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='TT',
            fields=[
                ('userId', models.CharField(max_length=32, primary_key=True, serialize=False)),
                ('firstName', models.CharField(max_length=32)),
                ('lastName', models.CharField(max_length=32)),
                ('aadharNo', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='User',
            fields=[
                ('userId', models.CharField(max_length=32, primary_key=True, serialize=False)),
                ('firstName', models.CharField(max_length=32)),
                ('lastName', models.CharField(max_length=32)),
                ('aadharNo', models.IntegerField()),
                ('dateofbirth', models.DateField(null=True)),
                ('email', models.EmailField(blank=True, max_length=32, null=True)),
                ('telephone', models.CharField(max_length=16)),
                ('country', models.CharField(blank=True, max_length=32, null=True)),
                ('password', models.CharField(blank=True, max_length=32, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='TrainStatus',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('traindate', models.DateField()),
                ('bookedACSeats', models.IntegerField()),
                ('bookedSittingSeats', models.IntegerField()),
                ('bookedSleeperSeats', models.IntegerField()),
                ('trainNo', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='user.Train')),
            ],
        ),
        migrations.CreateModel(
            name='Ticket',
            fields=[
                ('ticketId', models.IntegerField(primary_key=True, serialize=False)),
                ('status', models.CharField(max_length=32)),
                ('noOfPassenger', models.IntegerField()),
                ('bookedUser', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='user.User')),
            ],
        ),
        migrations.CreateModel(
            name='Passenger',
            fields=[
                ('passengerId', models.IntegerField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=32)),
                ('pnrNo', models.IntegerField()),
                ('age', models.IntegerField()),
                ('seatNo', models.CharField(max_length=32)),
                ('reservationStatus', models.CharField(max_length=32)),
                ('gender', models.CharField(max_length=32)),
                ('bookedBy', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='user.User')),
                ('ticketId', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='user.Ticket')),
                ('traindetails', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='user.TrainStatus')),
            
            ],
        ),
    ]
