# Generated by Django 2.2.5 on 2020-12-02 02:03

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


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('django_discount', '0002_auto_20201201_1425'),
    ]

    operations = [
        migrations.AddField(
            model_name='discount',
            name='user',
            field=models.ForeignKey(blank=True, help_text="When empty discount will be used for everyone and should not be any duplicates. But if User set it can have discount's with different users and duplicate codes. And that specific discount will only be available for that user.", null=True, on_delete=django.db.models.deletion.CASCADE, related_name='discounts', to=settings.AUTH_USER_MODEL, verbose_name='Specific user to use this discount'),
        ),
        migrations.AlterField(
            model_name='discount',
            name='code',
            field=models.CharField(db_index=True, max_length=20, verbose_name='Code'),
        ),
        migrations.AlterField(
            model_name='discount',
            name='is_deleted',
            field=models.BooleanField(db_index=True, default=False, verbose_name='حذف شد'),
        ),
        migrations.AlterField(
            model_name='useddiscount',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='used_discounts', to=settings.AUTH_USER_MODEL, verbose_name='User who used discount code'),
        ),
    ]
