# Generated by Django 2.0.3 on 2018-04-20 10:54

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Date',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_num', models.PositiveSmallIntegerField()),
                ('date_time', models.DateField()),
            ],
            options={
                'ordering': ['date_time'],
            },
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=100)),
                ('start_time', models.DateField()),
                ('end_time', models.DateField()),
                ('price', models.CharField(max_length=10)),
                ('publish', models.BooleanField(default=False)),
                ('image', models.ImageField(blank=True, upload_to='')),
            ],
            options={
                'ordering': ['-start_time'],
            },
        ),
        migrations.CreateModel(
            name='Schedule',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('place', models.CharField(blank=True, max_length=30, null=True)),
                ('description', models.TextField(blank=True, null=True)),
                ('transport', models.CharField(blank=True, max_length=10, null=True)),
                ('time', models.CharField(blank=True, max_length=10, null=True)),
                ('date', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='travel.Date')),
            ],
            options={
                'ordering': ['pk'],
            },
        ),
        migrations.AddField(
            model_name='date',
            name='product',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='dates', to='travel.Product'),
        ),
        migrations.AlterUniqueTogether(
            name='date',
            unique_together={('product', 'date_time')},
        ),
    ]
