Generateurv2/backend/api/room/migrations/0001_initial.py
2022-05-18 10:15:54 +02:00

45 lines
1.8 KiB
Python

# Generated by Django 4.0 on 2022-04-17 08:29
from django.db import migrations, models
import django.db.models.deletion
import room.models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Room',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=50)),
('id_code', models.CharField(default=room.models.generate_unique_code_room, max_length=50)),
('participants', models.JSONField(default=list)),
('waiters', models.JSONField(default=list)),
('created_at', models.DateTimeField(auto_now_add=True)),
('owner', models.JSONField(default=dict)),
('public_result', models.BooleanField(default=False)),
('private', models.BooleanField(default=True)),
],
),
migrations.CreateModel(
name='Parcours',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=50)),
('id_code', models.CharField(default=room.models.generate_unique_code_parcours, max_length=50)),
('challenger', models.JSONField(default=list)),
('created_at', models.DateTimeField(auto_now_add=True)),
('timer', models.IntegerField(blank=True)),
('exercices', models.JSONField(default=list)),
('success_condition', models.IntegerField(default=10)),
('room', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='room.room')),
],
),
]