# -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2017-10-25 01:44
from __future__ import unicode_literals

from decimal import Decimal
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import djmoney.models.fields


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('policy', '0006_auto_20171025_0144'),
    ]

    operations = [
        migrations.CreateModel(
            name='Application',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('stage', models.CharField(choices=[('E', 'Early'), ('R', 'Regular'), ('L', 'Late')], max_length=1)),
                ('screening_result', models.CharField(choices=[('A', 'Accepted'), ('R', 'Rejected'), ('P', 'Pending')], default='P', max_length=1)),
                ('disclose_result', models.BooleanField(default=False)),
                ('essay_text', models.TextField(blank=True)),
                ('visa_letter', models.BooleanField(default=False)),
                ('financial_aid', models.BooleanField(default=False)),
                ('previous_participation', models.BooleanField(default=False)),
                ('last_update', models.DateTimeField(auto_now=True)),
                ('essay_topic', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='applications', to='policy.EssayTopic')),
            ],
        ),
        migrations.CreateModel(
            name='Group',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50, unique=True)),
            ],
            options={
                'verbose_name': 'applicant group',
            },
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('preferred_currency', models.CharField(choices=[('KRW', 'KRW'), ('USD', 'USD')], default='KRW', max_length=3)),
                ('paid_amount_currency', djmoney.models.fields.CurrencyField(choices=[('KRW', 'KRW'), ('USD', 'USD')], default='KRW', editable=False, max_length=3)),
                ('paid_amount', djmoney.models.fields.MoneyField(decimal_places=0, default=Decimal('0'), default_currency='KRW', max_digits=7)),
                ('dietary_preferences', models.CharField(blank=True, max_length=100, null=True)),
                ('breakfast_option', models.BooleanField(default=False)),
                ('pre_option', models.BooleanField(default=False, verbose_name='pre-conference banquet')),
                ('post_option', models.BooleanField(default=False, verbose_name='post-conference tour')),
                ('accommodation', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='orders', to='policy.AccommodationOption')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='application',
            name='group',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='applications', to='registration.Group'),
        ),
        migrations.AddField(
            model_name='application',
            name='topic_preference',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='applications', to='policy.ProjectTopic'),
        ),
        migrations.AddField(
            model_name='application',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='applications', to=settings.AUTH_USER_MODEL),
        ),
    ]
