# -*- coding: utf-8 -*-
# Generated by Django 1.9.2 on 2016-02-19 19:18
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='Access',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Job',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('quantity', models.IntegerField(default=1)),
                ('time', models.DateTimeField(auto_now_add=True)),
                ('granted', models.BooleanField(default=False)),
                ('accepted', models.BooleanField(default=False)),
                ('assigned', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='assigned_to', to=settings.AUTH_USER_MODEL)),
                ('by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='job_by', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='MyUser',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('location', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='Role',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('role', models.IntegerField(choices=[('1', 'Admin'), ('2', 'Emplyoee'), ('3', 'Errand Boy')])),
                ('access', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='errand.Access')),
            ],
        ),
        migrations.CreateModel(
            name='Service',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
                ('cost', models.IntegerField(default=0)),
            ],
        ),
        migrations.AddField(
            model_name='myuser',
            name='role',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='errand.Role'),
        ),
        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='job',
            name='service',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='errand.Service'),
        ),
    ]
