# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-01-10 04:19
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Station',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=70)),
            ],
        ),
        migrations.CreateModel(
            name='Train',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=70)),
                ('number', models.IntegerField()),
                ('offday', models.CharField(max_length=10)),
            ],
        ),
        migrations.CreateModel(
            name='Trip',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('start_time', models.TimeField()),
                ('arrival_time', models.TimeField()),
                ('arrival_station', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='ar_station', to='traindb.Station')),
                ('start_station', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='st_station', to='traindb.Station')),
            ],
        ),
        migrations.AddField(
            model_name='train',
            name='trip',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='traindb.Trip'),
        ),
    ]
