# Generated by Django 3.2.10 on 2021-12-15 02:49

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Purchase',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('purchase_uuid', models.UUIDField(default=uuid.uuid4, unique=True)),
                ('code', models.CharField(max_length=10)),
                ('value', models.DecimalField(decimal_places=2, max_digits=10)),
                ('purchase_date', models.DateField()),
                ('status', models.CharField(choices=[('validating', 'Validating'), ('approved', 'Approved'), ('reproved', 'Reproved')], default='validating', max_length=10)),
                ('reseller_cpf', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='purchases', to=settings.AUTH_USER_MODEL, to_field='cpf')),
            ],
        ),
    ]

# Generated by Django 3.2.10 on 2021-12-15 02:49

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Purchase',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('purchase_uuid', models.UUIDField(default=uuid.uuid4, unique=True)),
                ('code', models.CharField(max_length=10)),
                ('value', models.DecimalField(decimal_places=2, max_digits=10)),
                ('purchase_date', models.DateField()),
                ('status', models.CharField(choices=[('validating', 'Validating'), ('approved', 'Approved'), ('reproved', 'Reproved')], default='validating', max_length=10)),
                ('reseller_cpf', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='purchases', to=settings.AUTH_USER_MODEL, to_field='cpf')),
            ],
        ),
    ]

# Generated by Django 3.2.10 on 2021-12-15 02:49