From beb5049fec6c692a78d5f68a42a48ace1102173c Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Sun, 12 Mar 2023 12:19:13 +0000 Subject: [PATCH] Add migrations --- core/migrations/0018_transaction_trade.py | 53 +++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 core/migrations/0018_transaction_trade.py diff --git a/core/migrations/0018_transaction_trade.py b/core/migrations/0018_transaction_trade.py new file mode 100644 index 0000000..8e0f5d4 --- /dev/null +++ b/core/migrations/0018_transaction_trade.py @@ -0,0 +1,53 @@ +# Generated by Django 4.1.7 on 2023-03-12 12:18 + +import uuid + +import django.db.models.deletion +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('core', '0017_alter_platform_cheat_interval_seconds'), + ] + + operations = [ + migrations.CreateModel( + name='Transaction', + fields=[ + ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), + ('account_id', models.CharField(max_length=255)), + ('recipient', models.CharField(blank=True, max_length=255, null=True)), + ('sender', models.CharField(blank=True, max_length=255, null=True)), + ('amount', models.FloatField()), + ('currency', models.CharField(max_length=16)), + ('note', models.CharField(blank=True, max_length=255, null=True)), + ('reconciled', models.BooleanField(default=False)), + ('aggregator', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.aggregator')), + ], + ), + migrations.CreateModel( + name='Trade', + fields=[ + ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), + ('contact_id', models.CharField(max_length=255)), + ('reference', models.CharField(max_length=255)), + ('buyer', models.CharField(max_length=255)), + ('seller', models.CharField(max_length=255)), + ('amount_fiat', models.FloatField()), + ('currency', models.CharField(max_length=16)), + ('amount_crypto', models.FloatField()), + ('coin', models.CharField(max_length=16)), + ('provider', models.CharField(max_length=255)), + ('type', models.CharField(max_length=255)), + ('ad_id', models.CharField(max_length=255)), + ('status', models.CharField(max_length=255)), + ('reconciled', models.BooleanField(default=False)), + ('released', models.BooleanField(default=False)), + ('release_response', models.JSONField(default=dict)), + ('linked', models.ManyToManyField(to='core.transaction')), + ('platform', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.platform')), + ], + ), + ]