# Generated by Django 2.0.2 on 2018-02-14 04:31

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Attachment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=10)),
                ('file', models.FileField(default=None, upload_to='')),
            ],
        ),
        migrations.CreateModel(
            name='Person',
            fields=[
                ('birth_date', models.DateField(default=django.utils.timezone.now)),
                ('identity_code', models.CharField(max_length=10, primary_key=True, serialize=False)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Phase',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('next_phase_acc', models.IntegerField(default=0)),
                ('next_phase_rej', models.IntegerField(default=0)),
                ('start_time', models.DateField(default=django.utils.timezone.now)),
                ('finish_time', models.DateField(default=django.utils.timezone.now)),
                ('is_verified', models.BooleanField(default=False)),
                ('is_finish', models.BooleanField(default=False)),
            ],
        ),
        migrations.CreateModel(
            name='PhaseType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
        ),
        migrations.CreateModel(
            name='Position',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=10)),
                ('person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='S1.Person')),
            ],
        ),
        migrations.CreateModel(
            name='Process',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('start_time', models.TimeField(default=django.utils.timezone.now)),
                ('finish_time', models.TimeField(default=django.utils.timezone.now)),
            ],
        ),
        migrations.CreateModel(
            name='ProcessType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(default='', max_length=10, unique=True)),
                ('start_phase', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='S1.Phase')),
            ],
        ),
        migrations.CreateModel(
            name='Student',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('identity_code', models.CharField(default='', max_length=10)),
                ('birth_date', models.DateField(default=django.utils.timezone.now)),
                ('level', models.CharField(default='', max_length=10)),
                ('student_number', models.CharField(default='', max_length=10)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Transaction',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('issue_tracking_number', models.IntegerField(default=0)),
                ('date', models.DateField(default=django.utils.timezone.now)),
                ('amount', models.IntegerField(default=0)),
                ('account_id', models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='process',
            name='process_type',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='S1.ProcessType'),
        ),
        migrations.AddField(
            model_name='process',
            name='student_owner',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='S1.Student'),
        ),
        migrations.AddField(
            model_name='phasetype',
            name='accountant_position',
            field=models.ManyToManyField(to='S1.Position'),
        ),
        migrations.AddField(
            model_name='phasetype',
            name='attachments',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='S1.Attachment'),
        ),
        migrations.AddField(
            model_name='phasetype',
            name='transaction',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='S1.Transaction'),
        ),
        migrations.AddField(
            model_name='phase',
            name='phase_type',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='S1.PhaseType'),
        ),
    ]
