# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-12-27 07:43
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='CoinType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=180, verbose_name='\u540d\u79f0\u7c7b\u578b')),
                ('coin', models.IntegerField(verbose_name='\u6570\u91cf')),
                ('info', models.CharField(blank=True, max_length=180, null=True, verbose_name='\u8bf4\u660e')),
            ],
            options={
                'ordering': ['id'],
                'db_table': 'bee_django_coin_type',
            },
        ),
        migrations.CreateModel(
            name='UserCoinRecord',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('coin', models.IntegerField(verbose_name='\u6570\u91cf')),
                ('reason', models.CharField(blank=True, max_length=180, null=True, verbose_name='\u539f\u56e0')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('coin_type', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='bee_django_coin.CoinType')),
                ('created_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='created_by_user', to=settings.AUTH_USER_MODEL)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='coin_user', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-created_at'],
                'db_table': 'bee_django_coin_record',
            },
        ),
    ]
