# Generated by Django 3.1.7 on 2021-03-02 22:07

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

class Migration(migrations.Migration):

    dependencies = [
        ('purchases', '0008_remove_purchase_discount_amount'),
    ]

    operations = [
        migrations.CreateModel(
            name='Coupon',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False, verbose_name='Coupon id')),
                ('discount_percent', models.PositiveSmallIntegerField(validators=[django.core.validators.MinValueValidator(0, 'error, el porcentaje no puede ser inferior a 0'), django.core.validators.MaxValueValidator(99, 'error, el porcentaje no puede superar 99')])),
            ],
        ),
        migrations.AddField(
            model_name='payment',
            name='coupon',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='purchases.coupon'),
        ),
    ]
