# Generated by Django 3.2.13 on 2022-05-19 13:50

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


class Migration(migrations.Migration):

    dependencies = [
        ('django_omise', '0002_card_fingerprint'),
    ]

    operations = [
        migrations.CreateModel(
            name='Refund',
            fields=[
                ('id', models.CharField(max_length=255, primary_key=True, serialize=False)),
                ('livemode', models.BooleanField()),
                ('data', models.JSONField(blank=True, default=dict)),
                ('date_created', models.DateTimeField(auto_now_add=True)),
                ('date_updated', models.DateTimeField(auto_now=True)),
                ('uid', models.UUIDField(default=uuid.uuid4, editable=False, unique=True)),
                ('amount', models.IntegerField(help_text='Refund amount in smallest unit of charge currency.')),
                ('currency', models.CharField(choices=[('USD', 'United States Dollar'), ('THB', 'Thai Baht'), ('SGD', 'Singapore Dollar'), ('JPY', 'Japanese Yen'), ('GBP', 'Pound Sterling'), ('EUR', 'Euro'), ('CNY', 'Chinese Yuan'), ('AUD', 'Australian Dollar')], max_length=3)),
                ('funding_amount', models.IntegerField(blank=True, help_text='For multi-currency charges, amount after exchange into account funding currency.', null=True)),
                ('funding_currency', models.CharField(choices=[('USD', 'United States Dollar'), ('THB', 'Thai Baht'), ('SGD', 'Singapore Dollar'), ('JPY', 'Japanese Yen'), ('GBP', 'Pound Sterling'), ('EUR', 'Euro'), ('CNY', 'Chinese Yuan'), ('AUD', 'Australian Dollar')], max_length=3)),
                ('metadata', models.JSONField(blank=True, default=dict, help_text='Custom metadata for this refund.')),
                ('voided', models.BooleanField()),
                ('charge', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='refunds', to='django_omise.charge')),
            ],
            options={
                'ordering': ['-date_created'],
                'abstract': False,
            },
        ),
    ]
