74 lines
2.2 KiB
Python
74 lines
2.2 KiB
Python
# Generated by Django 2.2.19 on 2021-03-29 08:38
|
|
|
|
import django.db.models.deletion
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
("elections", "0013_admin_perm"),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name="Rank",
|
|
fields=[
|
|
(
|
|
"id",
|
|
models.AutoField(
|
|
auto_created=True,
|
|
primary_key=True,
|
|
serialize=False,
|
|
verbose_name="ID",
|
|
),
|
|
),
|
|
(
|
|
"rank",
|
|
models.PositiveSmallIntegerField(verbose_name="rang de l'option"),
|
|
),
|
|
(
|
|
"vote",
|
|
models.OneToOneField(
|
|
on_delete=django.db.models.deletion.CASCADE, to="elections.Vote"
|
|
),
|
|
),
|
|
],
|
|
),
|
|
migrations.CreateModel(
|
|
name="Matrix",
|
|
fields=[
|
|
(
|
|
"id",
|
|
models.AutoField(
|
|
auto_created=True,
|
|
primary_key=True,
|
|
serialize=False,
|
|
verbose_name="ID",
|
|
),
|
|
),
|
|
(
|
|
"amount",
|
|
models.PositiveSmallIntegerField(
|
|
verbose_name="votes supplémentaires"
|
|
),
|
|
),
|
|
(
|
|
"loser",
|
|
models.OneToOneField(
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
related_name="contests_lost",
|
|
to="elections.Option",
|
|
),
|
|
),
|
|
(
|
|
"winner",
|
|
models.OneToOneField(
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
related_name="contests_won",
|
|
to="elections.Option",
|
|
),
|
|
),
|
|
],
|
|
),
|
|
]
|