fix meal api and force update api

This commit is contained in:
bobbyvish
2024-04-04 16:27:43 +05:30
parent 9e66760fae
commit 8878dc89ac
5 changed files with 53 additions and 9 deletions

View File

@@ -0,0 +1,25 @@
# Generated by Django 5.0.2 on 2024-04-04 10:10
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('module_iam', '0007_iamprincipalresourcelink_and_more'),
]
operations = [
migrations.AddField(
model_name='appversion',
name='device_type',
field=models.CharField(choices=[('apple', 'apple'), ('android', 'android')], default=1, max_length=10),
preserve_default=False,
),
migrations.AlterField(
model_name='appversion',
name='version',
field=models.CharField(max_length=10, validators=[django.core.validators.RegexValidator('^\\d+\\.\\d+$')]),
),
]

View File

@@ -448,7 +448,12 @@ class IAmPrincipalBiometric(BaseModel):
class AppVersion(models.Model):
version = models.CharField(max_length=10, validators=[RegexValidator(r'^\d+\.\d+\.\d+$')])
DEVICE_CHOICES = [
('apple', 'apple'),
('android', 'android'),
]
device_type = models.CharField(max_length=10, choices=DEVICE_CHOICES)
version = models.CharField(max_length=10, validators=[RegexValidator(r'^\d+\.\d+$')])
force_upgrade = models.BooleanField(default=False, help_text='Indicates whether a force upgrade is needed for this app version.')
recommend_upgrade = models.BooleanField(default=False, help_text='Indicates whether a recommend upgrade is needed for this app version.')