# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-03-21 03:30
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 = [
        ('items', '0001_initial'),
        ('inventory_requests', '0001_initial'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Action',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('color', models.CharField(max_length=9, unique=True)),
                ('tag', models.CharField(max_length=100, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='ItemLog',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('item', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='item', to='items.Item')),
            ],
        ),
        migrations.CreateModel(
            name='Log',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('timestamp', models.DateTimeField(auto_now=True)),
                ('comment', models.TextField(blank=True, null=True)),
                ('affected_user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='affected', to=settings.AUTH_USER_MODEL)),
                ('initiating_user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='initiator', to=settings.AUTH_USER_MODEL)),
                ('nature', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='nature', to='inventory_transaction_logger.Action')),
            ],
        ),
        migrations.CreateModel(
            name='RequestCartLog',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('log', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='request_cart_log', to='inventory_transaction_logger.Log')),
                ('request_cart', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='request_cart', to='inventory_requests.RequestCart')),
            ],
        ),
        migrations.AddField(
            model_name='itemlog',
            name='log',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='item_log', to='inventory_transaction_logger.Log'),
        ),
    ]
