# -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2018-05-31 04:29
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='BaseModel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, unique=True)),
                ('date', models.DateField()),
            ],
        ),
        migrations.CreateModel(
            name='Colors',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=30, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='Credits',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateField()),
                ('debit_date', models.DateField()),
                ('fee', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='Kakeibos',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateField()),
                ('fee', models.IntegerField()),
                ('way', models.CharField(max_length=20)),
                ('tag', models.CharField(blank=True, max_length=100, null=True)),
                ('memo', models.CharField(blank=True, max_length=100, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='SharedKakeibos',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateField()),
                ('fee', models.IntegerField()),
                ('way', models.CharField(max_length=20)),
                ('memo', models.CharField(blank=True, max_length=100, null=True)),
                ('paid_by', models.CharField(max_length=20)),
                ('is_settled', models.BooleanField()),
            ],
        ),
        migrations.CreateModel(
            name='UsageResourceRelations',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
        ),
        migrations.CreateModel(
            name='Cards',
            fields=[
                ('basemodel_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='kakeibo.BaseModel')),
                ('color', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='kakeibo.Colors')),
            ],
            bases=('kakeibo.basemodel',),
        ),
        migrations.CreateModel(
            name='CreditItems',
            fields=[
                ('basemodel_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='kakeibo.BaseModel')),
                ('color', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='kakeibo.Colors')),
            ],
            bases=('kakeibo.basemodel',),
        ),
        migrations.CreateModel(
            name='Resources',
            fields=[
                ('basemodel_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='kakeibo.BaseModel')),
                ('initial_val', models.IntegerField()),
                ('color', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='kakeibo.Colors')),
            ],
            bases=('kakeibo.basemodel',),
        ),
        migrations.CreateModel(
            name='Usages',
            fields=[
                ('basemodel_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='kakeibo.BaseModel')),
                ('is_expense', models.BooleanField()),
                ('color', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='kakeibo.Colors')),
            ],
            bases=('kakeibo.basemodel',),
        ),
        migrations.AddField(
            model_name='usageresourcerelations',
            name='resource',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='kakeibo.Resources'),
        ),
        migrations.AddField(
            model_name='usageresourcerelations',
            name='usage',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='kakeibo.Usages'),
        ),
        migrations.AddField(
            model_name='sharedkakeibos',
            name='move_from',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='kakeibo.Resources'),
        ),
        migrations.AddField(
            model_name='sharedkakeibos',
            name='usage',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='kakeibo.Usages'),
        ),
        migrations.AddField(
            model_name='kakeibos',
            name='move_from',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='move_from', to='kakeibo.Resources'),
        ),
        migrations.AddField(
            model_name='kakeibos',
            name='move_to',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='move_to', to='kakeibo.Resources'),
        ),
        migrations.AddField(
            model_name='kakeibos',
            name='usage',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='kakeibo.Usages'),
        ),
        migrations.AddField(
            model_name='credits',
            name='card',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='credits', to='kakeibo.Cards'),
        ),
        migrations.AddField(
            model_name='credits',
            name='credit_item',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='kakeibo.CreditItems'),
        ),
        migrations.AddField(
            model_name='credititems',
            name='usage',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='kakeibo.Usages'),
        ),
    ]
