mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2024-11-27 12:53:02 +00:00
1d81213773
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
151 lines
9.8 KiB
Python
151 lines
9.8 KiB
Python
# Generated by Django 3.2.13 on 2023-01-10 19:22
|
|
|
|
import datetime
|
|
import django.core.validators
|
|
from django.db import migrations, models
|
|
import django.utils.timezone
|
|
import participation.models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
initial = True
|
|
|
|
dependencies = [
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='Note',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('defender_writing', models.PositiveSmallIntegerField(choices=[(0, 0), (1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6), (7, 7), (8, 8), (9, 9), (10, 10), (11, 11), (12, 12), (13, 13), (14, 14), (15, 15), (16, 16), (17, 17), (18, 18), (19, 19), (20, 20)], default=0, verbose_name='defender writing note')),
|
|
('defender_oral', models.PositiveSmallIntegerField(choices=[(0, 0), (1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6), (7, 7), (8, 8), (9, 9), (10, 10), (11, 11), (12, 12), (13, 13), (14, 14), (15, 15), (16, 16)], default=0, verbose_name='defender oral note')),
|
|
('opponent_writing', models.PositiveSmallIntegerField(choices=[(0, 0), (1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6), (7, 7), (8, 8), (9, 9)], default=0, verbose_name='opponent writing note')),
|
|
('opponent_oral', models.PositiveSmallIntegerField(choices=[(0, 0), (1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6), (7, 7), (8, 8), (9, 9), (10, 10)], default=0, verbose_name='opponent oral note')),
|
|
('reporter_writing', models.PositiveSmallIntegerField(choices=[(0, 0), (1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6), (7, 7), (8, 8), (9, 9)], default=0, verbose_name='reporter writing note')),
|
|
('reporter_oral', models.PositiveSmallIntegerField(choices=[(0, 0), (1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6), (7, 7), (8, 8), (9, 9), (10, 10)], default=0, verbose_name='reporter oral note')),
|
|
],
|
|
options={
|
|
'verbose_name': 'note',
|
|
'verbose_name_plural': 'notes',
|
|
},
|
|
),
|
|
migrations.CreateModel(
|
|
name='Participation',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('valid', models.BooleanField(default=None, help_text='The participation got the validation of the organizers.', null=True, verbose_name='valid')),
|
|
('final', models.BooleanField(default=False, help_text='The team is selected for the final tournament.', verbose_name='selected for final')),
|
|
],
|
|
options={
|
|
'verbose_name': 'participation',
|
|
'verbose_name_plural': 'participations',
|
|
},
|
|
),
|
|
migrations.CreateModel(
|
|
name='Passage',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('solution_number', models.PositiveSmallIntegerField(choices=[(1, 'Problem #1'), (2, 'Problem #2'), (3, 'Problem #3'), (4, 'Problem #4'), (5, 'Problem #5'), (6, 'Problem #6'), (7, 'Problem #7'), (8, 'Problem #8')], verbose_name='defended solution')),
|
|
('defender_penalties', models.PositiveSmallIntegerField(default=0, help_text='Number of penalties for the defender. The defender will loose a 0.5 coefficient per penalty.', verbose_name='penalties')),
|
|
],
|
|
options={
|
|
'verbose_name': 'passage',
|
|
'verbose_name_plural': 'passages',
|
|
},
|
|
),
|
|
migrations.CreateModel(
|
|
name='Pool',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('round', models.PositiveSmallIntegerField(choices=[(1, 'Round 1'), (2, 'Round 2')], verbose_name='round')),
|
|
('bbb_url', models.CharField(blank=True, default='', help_text='The link of the BBB visio for this pool.', max_length=255, verbose_name='BigBlueButton URL')),
|
|
('results_available', models.BooleanField(default=False, help_text='Check this case when results become accessible to teams. They stay accessible to you. Only averages are given.', verbose_name='results available')),
|
|
],
|
|
options={
|
|
'verbose_name': 'pool',
|
|
'verbose_name_plural': 'pools',
|
|
},
|
|
),
|
|
migrations.CreateModel(
|
|
name='Solution',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('problem', models.PositiveSmallIntegerField(choices=[(1, 'Problem #1'), (2, 'Problem #2'), (3, 'Problem #3'), (4, 'Problem #4'), (5, 'Problem #5'), (6, 'Problem #6'), (7, 'Problem #7'), (8, 'Problem #8')], verbose_name='problem')),
|
|
('final_solution', models.BooleanField(default=False, verbose_name='solution for the final tournament')),
|
|
('file', models.FileField(unique=True, upload_to=participation.models.get_solution_filename, verbose_name='file')),
|
|
],
|
|
options={
|
|
'verbose_name': 'solution',
|
|
'verbose_name_plural': 'solutions',
|
|
'ordering': ('participation__team__trigram', 'final_solution', 'problem'),
|
|
},
|
|
),
|
|
migrations.CreateModel(
|
|
name='Synthesis',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('type', models.PositiveSmallIntegerField(choices=[(1, 'opponent'), (2, 'reporter')])),
|
|
('file', models.FileField(unique=True, upload_to=participation.models.get_synthesis_filename, verbose_name='file')),
|
|
],
|
|
options={
|
|
'verbose_name': 'synthesis',
|
|
'verbose_name_plural': 'syntheses',
|
|
'ordering': ('passage__pool__round', 'type'),
|
|
},
|
|
),
|
|
migrations.CreateModel(
|
|
name='Team',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('name', models.CharField(max_length=255, unique=True, verbose_name='name')),
|
|
('trigram', models.CharField(help_text='The trigram must be composed of three uppercase letters.', max_length=3, unique=True, validators=[django.core.validators.RegexValidator('[A-Z]{3}')], verbose_name='trigram')),
|
|
('access_code', models.CharField(help_text='The access code let other people to join the team.', max_length=6, verbose_name='access code')),
|
|
('motivation_letter', models.FileField(blank=True, default='', upload_to=participation.models.get_motivation_letter_filename, verbose_name='motivation letter')),
|
|
],
|
|
options={
|
|
'verbose_name': 'team',
|
|
'verbose_name_plural': 'teams',
|
|
},
|
|
),
|
|
migrations.CreateModel(
|
|
name='Tournament',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('name', models.CharField(max_length=255, unique=True, verbose_name='name')),
|
|
('date_start', models.DateField(default=datetime.date.today, verbose_name='start')),
|
|
('date_end', models.DateField(default=datetime.date.today, verbose_name='end')),
|
|
('place', models.CharField(max_length=255, verbose_name='place')),
|
|
('max_teams', models.PositiveSmallIntegerField(default=9, verbose_name='max team count')),
|
|
('price', models.PositiveSmallIntegerField(default=21, verbose_name='price')),
|
|
('remote', models.BooleanField(default=False, verbose_name='remote')),
|
|
('inscription_limit', models.DateTimeField(default=django.utils.timezone.now, verbose_name='limit date for registrations')),
|
|
('solution_limit', models.DateTimeField(default=django.utils.timezone.now, verbose_name='limit date to upload solutions')),
|
|
('solutions_draw', models.DateTimeField(default=django.utils.timezone.now, verbose_name='random draw for solutions')),
|
|
('syntheses_first_phase_limit', models.DateTimeField(default=django.utils.timezone.now, verbose_name='limit date to upload the syntheses for the first phase')),
|
|
('solutions_available_second_phase', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date when the solutions for the second round become available')),
|
|
('syntheses_second_phase_limit', models.DateTimeField(default=django.utils.timezone.now, verbose_name='limit date to upload the syntheses for the second phase')),
|
|
('description', models.TextField(blank=True, verbose_name='description')),
|
|
('final', models.BooleanField(default=False, verbose_name='final')),
|
|
],
|
|
options={
|
|
'verbose_name': 'tournament',
|
|
'verbose_name_plural': 'tournaments',
|
|
},
|
|
),
|
|
migrations.CreateModel(
|
|
name='Tweak',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('diff', models.IntegerField(help_text='Score to add/remove on the final score', verbose_name='difference')),
|
|
('participation', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='tweaks', to='participation.participation', verbose_name='participation')),
|
|
('pool', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='participation.pool', verbose_name='passage')),
|
|
],
|
|
options={
|
|
'verbose_name': 'tweak',
|
|
'verbose_name_plural': 'tweaks',
|
|
},
|
|
),
|
|
]
|