# -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2017-06-13 19:48
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='CatTransaction',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('root_id', models.IntegerField()),
                ('comment_id', models.IntegerField()),
                ('canceled', models.BooleanField(default=False)),
                ('dt', models.DateTimeField(auto_now_add=True)),
                ('new_cat', models.IntegerField()),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='CommentTransaction',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('root_id', models.IntegerField()),
                ('comment_id', models.IntegerField()),
                ('canceled', models.BooleanField(default=False)),
                ('dt', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='LikeTransaction',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('root_id', models.IntegerField()),
                ('comment_id', models.IntegerField()),
                ('canceled', models.BooleanField(default=False)),
                ('dt', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='Wallet',
            fields=[
                ('cookie_id', models.CharField(max_length=64, primary_key=True, serialize=False)),
                ('max_balance', models.IntegerField(default=10000)),
                ('current_balance', models.IntegerField(default=0)),
                ('last_add', models.DateTimeField(default=datetime.datetime.now)),
                ('last_sub', models.DateTimeField(default=datetime.datetime.now)),
            ],
        ),
        migrations.AddField(
            model_name='liketransaction',
            name='from_wallet',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='outgoing_transactions', to='karma.Wallet'),
        ),
        migrations.AddField(
            model_name='liketransaction',
            name='to_wallet',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='karma.Wallet'),
        ),
        migrations.AddField(
            model_name='commenttransaction',
            name='to_wallet',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='karma.Wallet'),
        ),
        migrations.AddField(
            model_name='cattransaction',
            name='to_wallet',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='karma.Wallet'),
        ),
        migrations.AlterUniqueTogether(
            name='liketransaction',
            unique_together=set([('from_wallet', 'comment_id')]),
        ),
        migrations.AlterUniqueTogether(
            name='commenttransaction',
            unique_together=set([('root_id', 'comment_id')]),
        ),
    ]
