38545-vm/core/migrations/0001_initial.py
2026-02-18 01:25:04 +00:00

50 lines
2.0 KiB
Python

# Generated by Django 5.2.7 on 2026-02-18 01:18
import django.db.models.deletion
import uuid
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='AdminAccess',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('private_key', models.CharField(default=uuid.uuid4, max_length=255, unique=True)),
('created_at', models.DateTimeField(auto_now_add=True)),
],
),
migrations.CreateModel(
name='Lottery',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(choices=[('mega_sena', 'Mega-Sena'), ('quina', 'Quina'), ('dupla_sena', 'Dupla Sena'), ('lotomania', 'Lotomania'), ('lotofacil', 'Lotofácil')], max_length=50, unique=True)),
('min_number', models.IntegerField(default=1)),
('max_number', models.IntegerField()),
('numbers_to_draw', models.IntegerField()),
('annulled_numbers', models.TextField(blank=True, default='')),
],
),
migrations.CreateModel(
name='DrawResult',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('draw_number', models.IntegerField()),
('draw_date', models.DateField()),
('numbers', models.CharField(max_length=255)),
('lottery', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='draws', to='core.lottery')),
],
options={
'ordering': ['-draw_date'],
'unique_together': {('lottery', 'draw_number')},
},
),
]