# Generated by Django 5.2.17 on 2026-10-02 07:20 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('subscription', '0008_paid_quota_ten_a_day'), ] operations = [ migrations.CreateModel( name='HeartsPass', fields=[ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('user_id', models.IntegerField(db_index=True, unique=True)), ('expires_at', models.DateTimeField()), ], ), migrations.AddField( model_name='plan', name='hearts_days', field=models.PositiveSmallIntegerField(default=0, help_text='فقط بسته: چند روز قلبِ نامحدود هدیه.'), ), migrations.AddField( model_name='plan', name='kind', field=models.CharField(choices=[('pack', 'بسته\u200cی سوال'), ('subscription', 'اشتراکِ زمانی')], default='subscription', max_length=15), ), migrations.AddField( model_name='plan', name='on_sale', field=models.BooleanField(default=True, help_text='در صفحه\u200cی خرید نشان داده شود.'), ), migrations.AddField( model_name='plan', name='question_credits', field=models.PositiveIntegerField(default=0, help_text='فقط بسته: چند سوال از دستیار به اعتبارِ خریدار اضافه می\u200cشود.'), ), migrations.CreateModel( name='QuestionCredit', fields=[ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('user_id', models.IntegerField(db_index=True)), ('delta', models.IntegerField()), ('reason', models.CharField(choices=[('purchase', 'خرید'), ('question', 'سوال'), ('grant', 'هدیه\u200cی ادمین')], max_length=10)), ('order_id', models.IntegerField(blank=True, null=True)), ('message_id', models.IntegerField(blank=True, db_index=True, null=True)), ('note', models.CharField(blank=True, max_length=100)), ('created_at', models.DateTimeField(auto_now_add=True)), ], options={ 'ordering': ['-created_at'], 'constraints': [models.UniqueConstraint(condition=models.Q(('reason', 'purchase')), fields=('order_id',), name='uniq_credit_per_paid_order')], }, ), ]