# -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2019-01-17 16:53
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):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('simple_click', '0003_userprofile_account_balance'),
    ]

    operations = [
        migrations.CreateModel(
            name='Bet',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('bet_number', models.IntegerField(default=0)),
                ('bet_amount', models.FloatField(default=0.0)),
                ('result_status', models.IntegerField(choices=[(1, 'Win'), (2, 'Loss'), (3, 'Pending')], default=3)),
                ('win_amount', models.FloatField(default=0.0)),
            ],
        ),
        migrations.CreateModel(
            name='Game',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=120)),
                ('game_type', models.IntegerField(default=0)),
            ],
        ),
        migrations.CreateModel(
            name='Market',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('market_name', models.TextField()),
                ('market_type', models.IntegerField(choices=[(1, 'Open'), (1, 'Close')], default=1)),
                ('market_time', models.TimeField()),
                ('created', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='PaymentHistory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('payment_type', models.IntegerField(choices=[(1, 'Deposit'), (2, 'Withdraw'), (3, 'Win'), (4, 'Play')], default=0)),
                ('transaction_type', models.IntegerField(choices=[(1, 'Debit'), (2, 'Credit')], default=0)),
                ('transaction_amount', models.FloatField(default=0.0)),
                ('balance_amount', models.FloatField(default=0.0)),
                ('transaction_date', models.DateTimeField(auto_now_add=True)),
                ('bet', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='simple_click.Bet')),
            ],
        ),
        migrations.CreateModel(
            name='Player',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('status', models.IntegerField(choices=[(1, 'Pending'), (2, 'Approved')], default=1)),
                ('game', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='simple_click.Game')),
                ('market', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='simple_click.Market')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='paymenthistory',
            name='player',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='simple_click.Player'),
        ),
        migrations.AddField(
            model_name='paymenthistory',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='bet',
            name='player',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='simple_click.Player'),
        ),
    ]
