# -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2016-01-30 05:50
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        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(blank=True, default=b'', max_length=250, verbose_name=b'name')),
                ('slug', models.SlugField(blank=True, max_length=100, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('rate', models.PositiveIntegerField(verbose_name=b'rate')),
                ('text', models.CharField(blank=True, max_length=300, null=True, verbose_name=b'text')),
            ],
        ),
        migrations.CreateModel(
            name='MyUser',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('display_name', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='SearchQuery',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('text', models.CharField(blank=True, max_length=300, null=True, verbose_name=b'text')),
            ],
        ),
        migrations.CreateModel(
            name='Skill',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Task',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=50)),
                ('text', models.TextField(default=b'', verbose_name=b'Text')),
                ('upload_date', models.DateTimeField(verbose_name=b'Upload Date')),
                ('status', models.CharField(choices=[(b'N', b'New'), (b'A', b'Assigned'), (b'D', b'Done')], default=b'N', max_length=1, verbose_name=b'status')),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='catalogue.Category')),
                ('employee', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='task_employee', to='catalogue.MyUser')),
                ('employer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='task_employer', to='catalogue.MyUser')),
            ],
        ),
        migrations.CreateModel(
            name='TaskRequest',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('employee', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='catalogue.MyUser')),
                ('task', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='catalogue.Task')),
            ],
        ),
        migrations.AddField(
            model_name='myuser',
            name='skills',
            field=models.ManyToManyField(blank=True, to='catalogue.Skill'),
        ),
        migrations.AddField(
            model_name='myuser',
            name='user',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='comment',
            name='employee',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='comment_employee', to='catalogue.MyUser', verbose_name=b'employee'),
        ),
        migrations.AddField(
            model_name='comment',
            name='employer',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='comment_employer', to='catalogue.MyUser', verbose_name=b'employer'),
        ),
    ]
