# Generated by Django 3.1.4 on 2020-12-26 18:04

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('contenttypes', '0002_remove_content_type_name'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Wallet',
            fields=[
                ('id', models.UUIDField(primary_key=True, serialize=False)),
                ('name', models.CharField(default='Default wallet', max_length=100)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='wallets', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Transaction',
            fields=[
                ('id', models.UUIDField(primary_key=True, serialize=False)),
                ('from_id', models.PositiveIntegerField()),
                ('from_amount', models.FloatField()),
                ('to_id', models.PositiveIntegerField()),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('from_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='from_transactions', to='contenttypes.contenttype')),
                ('to_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='to_transactions', to='contenttypes.contenttype')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='transactions', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Asset',
            fields=[
                ('id', models.UUIDField(primary_key=True, serialize=False)),
                ('asset_id', models.PositiveIntegerField()),
                ('asset_amount', models.FloatField()),
                ('asset_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.contenttype')),
                ('wallet', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='assets', to='wallet.wallet')),
            ],
        ),
    ]
