A9: operations console, three pause commands, admin and player reports (WEB-30..32, WEB-40..44, WEB-55, AUD-48)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3d1e820564
commit
eab141f467
24 files changed
+928
-11
No files matched your search
@@ -0,0 +1,41 @@
|
||||
# Generated by Django 5.2.19 on 2026-11-16 13:55
|
||||
|
||||
import django.db.models.deletion
|
||||
import django.utils.timezone
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('lottery', '0002_audit_append_only_triggers'),
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='lotteryconfig',
|
||||
options={'permissions': [('view_console', 'Can open the operations console'), ('pause_after_round', 'Can pause the lottery after the round in progress'), ('suspend_new_bets', 'Can suspend new bets'), ('suspend_withdrawals', 'Can suspend withdrawals')]},
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='lotteryconfig',
|
||||
name='worker_seen_at',
|
||||
field=models.DateTimeField(blank=True, null=True),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Report',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('text', models.TextField(max_length=1000)),
|
||||
('status', models.CharField(choices=[('open', 'Aperta'), ('read', 'Letta'), ('resolved', 'Risolta')], default='open', max_length=16)),
|
||||
('created_at', models.DateTimeField(default=django.utils.timezone.now)),
|
||||
('status_changed_at', models.DateTimeField(blank=True, null=True)),
|
||||
('user', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='reports', to=settings.AUTH_USER_MODEL)),
|
||||
],
|
||||
options={
|
||||
'indexes': [models.Index(fields=['user', '-created_at'], name='lottery_rep_user_id_2851c0_idx'), models.Index(fields=['status'], name='lottery_rep_status_badbe2_idx')],
|
||||
'constraints': [models.CheckConstraint(condition=models.Q(('status__in', ['open', 'read', 'resolved'])), name='lottery_report_status_valid')],
|
||||
},
|
||||
),
|
||||
]
|
||||
Reference in new issue
Block a user