# Generated by Django 2.0 on 2019-04-10 15:35

import tritium.apps.model_base
from django.db import migrations, models
import django.db.models.deletion
import uuid


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('networks', '__first__'),
    ]

    operations = [
        migrations.CreateModel(
            name='Contract',
            fields=[
                ('id', models.CharField(default=tritium.apps.model_base.cutePk, editable=False, max_length=8, primary_key=True, serialize=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('nickname', models.CharField(blank=True, max_length=255, null=True)),
                ('address', models.CharField(max_length=255)),
                ('abi', models.TextField(blank=True, null=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Interface',
            fields=[
                ('id', models.CharField(default=tritium.apps.model_base.cutePk, editable=False, max_length=8, primary_key=True, serialize=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('nickname', models.CharField(blank=True, max_length=255, null=True)),
                ('abi', models.TextField(blank=True, null=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='PriceLookup',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('asset', models.CharField(max_length=16)),
                ('currency', models.CharField(default='USD', max_length=4)),
                ('price', models.DecimalField(decimal_places=10, max_digits=20)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.AddField(
            model_name='contract',
            name='interfaces',
            field=models.ManyToManyField(to='contracts.Interface'),
        ),
        migrations.AddField(
            model_name='contract',
            name='network',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='networks.Network'),
        ),
    ]
