Make cheat interval dropdown
This commit is contained in:
parent
ae3d514db1
commit
5f0c555aa3
|
@ -0,0 +1,18 @@
|
||||||
|
# Generated by Django 4.1.7 on 2023-03-11 17:27
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('core', '0015_platform_base_usd_platform_withdrawal_trigger'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='platform',
|
||||||
|
name='cheat_interval_seconds',
|
||||||
|
field=models.IntegerField(choices=[(60, 'Every minute'), (300, 'Every 5 minutes'), (600, 'Every 10 minutes'), (3600, 'Every hour'), (14400, 'Every 4 hours'), (86400, 'Every day')], default=3600),
|
||||||
|
),
|
||||||
|
]
|
|
@ -12,6 +12,15 @@ SERVICE_CHOICES = (("nordigen", "Nordigen"),)
|
||||||
|
|
||||||
PLATFORM_SERVICE_CHOICES = (("agora", "Agora"),)
|
PLATFORM_SERVICE_CHOICES = (("agora", "Agora"),)
|
||||||
|
|
||||||
|
INTERVAL_CHOICES = (
|
||||||
|
(60, "Every minute"),
|
||||||
|
(60 * 5, "Every 5 minutes"),
|
||||||
|
(60 * 10, "Every 10 minutes"),
|
||||||
|
(60 * 60, "Every hour"),
|
||||||
|
(60 * 60 * 4, "Every 4 hours"),
|
||||||
|
(86400, "Every day"),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class User(AbstractUser):
|
class User(AbstractUser):
|
||||||
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
|
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
|
||||||
|
@ -109,7 +118,7 @@ class Platform(models.Model):
|
||||||
send = models.BooleanField(default=True)
|
send = models.BooleanField(default=True)
|
||||||
cheat = models.BooleanField(default=False)
|
cheat = models.BooleanField(default=False)
|
||||||
dummy = models.BooleanField(default=False)
|
dummy = models.BooleanField(default=False)
|
||||||
cheat_interval_seconds = models.IntegerField(default=600)
|
cheat_interval_seconds = models.IntegerField(default=3600, choices=INTERVAL_CHOICES)
|
||||||
|
|
||||||
margin = models.FloatField(default=1.20)
|
margin = models.FloatField(default=1.20)
|
||||||
max_margin = models.FloatField(default=1.30)
|
max_margin = models.FloatField(default=1.30)
|
||||||
|
|
Loading…
Reference in New Issue