# -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2015-12-19 08:03
from __future__ import unicode_literals

import autoslug.fields
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('nfn_user', '0002_auto_20151214_1400'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=30, verbose_name='Name')),
                ('slug', autoslug.fields.AutoSlugField(editable=False, populate_from='name')),
                ('description', models.CharField(max_length=100, verbose_name='Description')),
                ('hex_code', models.CharField(max_length=7, verbose_name='Color Code')),
            ],
        ),
        migrations.CreateModel(
            name='Contest',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=30)),
                ('slug', autoslug.fields.AutoSlugField(editable=False, populate_from='title', unique_with=['owner__company_name'])),
                ('description', models.CharField(max_length=100)),
                ('details', models.TextField()),
                ('image', models.ImageField(blank=True, null=True, upload_to='contests')),
                ('award', models.CharField(max_length=50)),
                ('date_started', models.DateField(verbose_name='Start Date')),
                ('date_deadline', models.DateField(verbose_name='Deadline')),
                ('is_approved', models.BooleanField(default=True, verbose_name='Approved')),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='nfn_contests.Category')),
                ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='nfn_user.C_Owner')),
            ],
        ),
        migrations.CreateModel(
            name='Submission',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('a_names', models.CharField(max_length=200, verbose_name='Applicant Name(s)')),
                ('a_details', models.TextField(verbose_name='Applicant Details')),
                ('s_details', models.TextField(verbose_name='Submission Details')),
                ('s_file', models.FileField(blank=True, null=True, upload_to='submissions', verbose_name='Submission File')),
                ('feedback', models.TextField(blank=True, null=True, verbose_name="Contest Owner's Feedback")),
                ('is_winner', models.BooleanField(default=False, verbose_name='Winner!')),
                ('date_posted', models.DateTimeField(auto_now_add=True, verbose_name='Submission Date')),
                ('applicant', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('contest', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='nfn_contests.Contest')),
            ],
        ),
    ]
