add purchace limitations system for rancher - add incentive plans to rancher entries data

This commit is contained in:
2025-08-26 12:18:10 +03:30
parent b5dfcebafe
commit c0b6b8ddca
12 changed files with 142 additions and 14 deletions

View File

@@ -44,3 +44,15 @@ class MobileTest(BaseModel):
longitude = models.DecimalField(max_digits=22, decimal_places=16)
count = models.IntegerField(default=0)
time = models.DateTimeField(auto_now_add=True)
class SystemConfig(BaseModel):
key = models.CharField(max_length=100, null=True)
value = models.CharField(max_length=100, null=True)
@classmethod
def get(cls, key, default=None):
try:
return cls.objects.get(key=key).value
except cls.DoesNotExist:
return default