You've already forked Promocode-API
mirror of
https://github.com/devitq/Promocode-API.git
synced 2026-05-22 23:17:10 +00:00
feat: added patch promocode, promocode stat, user signup/signin, user profile get/patch, user feed
also bug fixes and improvements
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# Generated by Django 5.1.5 on 2025-01-21 14:30
|
||||
# Generated by Django 5.1.5 on 2025-01-23 17:54
|
||||
|
||||
import apps.promo.validators
|
||||
import django.core.validators
|
||||
@@ -25,6 +25,7 @@ class Migration(migrations.Migration):
|
||||
('age_from', models.PositiveSmallIntegerField(blank=True, null=True, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(100)])),
|
||||
('age_until', models.PositiveSmallIntegerField(blank=True, null=True, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(100)])),
|
||||
('country', django_countries.fields.CountryField(blank=True, max_length=2, null=True)),
|
||||
('country_raw', models.CharField(blank=True, max_length=2, null=True)),
|
||||
('categories', models.JSONField(blank=True, default=list, null=True, validators=[apps.promo.validators.TargetCategoriesValidator()])),
|
||||
],
|
||||
options={
|
||||
@@ -43,7 +44,7 @@ class Migration(migrations.Migration):
|
||||
('mode', models.CharField(choices=[('COMMON', 'Common'), ('UNIQUE', 'Unique')], max_length=6)),
|
||||
('promo_common', models.CharField(blank=True, max_length=30, null=True, validators=[django.core.validators.MinLengthValidator(5)])),
|
||||
('promo_unique', models.JSONField(blank=True, default=list, null=True, validators=[apps.promo.validators.PromocodeUniqueValidator()])),
|
||||
('promo_unique_activated', models.JSONField(blank=True, default=list, editable=False, null=True)),
|
||||
('promo_unique_activated', models.JSONField(blank=True, default=list, null=True)),
|
||||
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||
('business', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='promocodes', to='business.business')),
|
||||
('target', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='promocodes', to='promo.promocodetarget')),
|
||||
@@ -77,4 +78,15 @@ class Migration(migrations.Migration):
|
||||
'abstract': False,
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='PromocodeLike',
|
||||
fields=[
|
||||
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
|
||||
('promocode', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='likes', to='promo.promocode')),
|
||||
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='liked_promocodes', to='user.user')),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
},
|
||||
),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user