# -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2016-06-03 19:50
from __future__ import unicode_literals

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='Call',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('status', models.CharField(choices=[('A', 'Accepted'), ('R', 'Rejected')], max_length=1)),
                ('date_decided', models.DateTimeField(default=django.utils.timezone.now)),
                ('is_accepted', models.BooleanField()),
                ('is_completed', models.BooleanField(default=False)),
                ('proof', models.ImageField(blank=True, null=True, upload_to='proofs')),
                ('executor', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='calls', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Task',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_created', models.DateTimeField(default=django.utils.timezone.now)),
                ('date_deadline', models.DateTimeField(blank=True, default=None, null=True)),
                ('bounty', models.PositiveIntegerField()),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='authored_tasks', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='call',
            name='task',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='calls', to='core.Task'),
        ),
    ]
