mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2024-11-26 23:27:08 +00:00
109 lines
6.2 KiB
Python
109 lines
6.2 KiB
Python
# Generated by Django 3.0.11 on 2020-12-30 12:02
|
|
|
|
import address.models
|
|
import datetime
|
|
from django.conf import settings
|
|
from django.db import migrations, models
|
|
import django.db.models.deletion
|
|
import phonenumber_field.modelfields
|
|
import registration.models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
initial = True
|
|
|
|
dependencies = [
|
|
('contenttypes', '0002_remove_content_type_name'),
|
|
('address', '0003_auto_20200830_1851'),
|
|
('participation', '0001_initial'),
|
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='Registration',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('give_contact_to_animath', models.BooleanField(default=False, verbose_name='Grant Animath to contact me in the future about other actions')),
|
|
('email_confirmed', models.BooleanField(default=False, verbose_name='email confirmed')),
|
|
('polymorphic_ctype', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='polymorphic_registration.registration_set+', to='contenttypes.ContentType')),
|
|
('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='user')),
|
|
],
|
|
options={
|
|
'verbose_name': 'registration',
|
|
'verbose_name_plural': 'registrations',
|
|
},
|
|
),
|
|
migrations.CreateModel(
|
|
name='ParticipantRegistration',
|
|
fields=[
|
|
('registration_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='registration.Registration')),
|
|
('birth_date', models.DateField(default=datetime.date.today, verbose_name='birth date')),
|
|
('phone_number', phonenumber_field.modelfields.PhoneNumberField(blank=True, max_length=128, region=None, verbose_name='phone number')),
|
|
('photo_authorization', models.FileField(blank=True, default='', upload_to=registration.models.get_random_photo_filename, verbose_name='photo authorization')),
|
|
('health_sheet', models.FileField(blank=True, default='', upload_to=registration.models.get_random_health_filename, verbose_name='health sheet')),
|
|
('address', address.models.AddressField(default=None, null=True, on_delete=django.db.models.deletion.SET_NULL, to='address.Address', verbose_name='address')),
|
|
('team', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='participants', to='participation.Team', verbose_name='team')),
|
|
],
|
|
options={
|
|
'abstract': False,
|
|
'base_manager_name': 'objects',
|
|
},
|
|
bases=('registration.registration',),
|
|
),
|
|
migrations.CreateModel(
|
|
name='VolunteerRegistration',
|
|
fields=[
|
|
('registration_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='registration.Registration')),
|
|
('professional_activity', models.TextField(verbose_name='professional activity')),
|
|
],
|
|
options={
|
|
'abstract': False,
|
|
'base_manager_name': 'objects',
|
|
},
|
|
bases=('registration.registration',),
|
|
),
|
|
migrations.CreateModel(
|
|
name='AdminRegistration',
|
|
fields=[
|
|
('volunteerregistration_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='registration.VolunteerRegistration')),
|
|
('role', models.TextField(verbose_name='role of the administrator')),
|
|
],
|
|
options={
|
|
'verbose_name': 'admin registration',
|
|
'verbose_name_plural': 'admin registrations',
|
|
},
|
|
bases=('registration.volunteerregistration',),
|
|
),
|
|
migrations.CreateModel(
|
|
name='CoachRegistration',
|
|
fields=[
|
|
('participantregistration_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='registration.ParticipantRegistration')),
|
|
('professional_activity', models.TextField(verbose_name='professional activity')),
|
|
],
|
|
options={
|
|
'verbose_name': 'coach registration',
|
|
'verbose_name_plural': 'coach registrations',
|
|
},
|
|
bases=('registration.participantregistration',),
|
|
),
|
|
migrations.CreateModel(
|
|
name='StudentRegistration',
|
|
fields=[
|
|
('participantregistration_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='registration.ParticipantRegistration')),
|
|
('student_class', models.IntegerField(choices=[(12, '12th grade'), (11, '11th grade'), (10, '10th grade or lower')], verbose_name='student class')),
|
|
('school', models.CharField(max_length=255, verbose_name='school')),
|
|
('responsible_name', models.CharField(default='', max_length=255, verbose_name='responsible name')),
|
|
('responsible_phone', phonenumber_field.modelfields.PhoneNumberField(blank=True, max_length=128, region=None, verbose_name='responsible phone number')),
|
|
('responsible_email', models.EmailField(default='', max_length=254, verbose_name='responsible email address')),
|
|
('parental_authorization', models.FileField(blank=True, default='', upload_to=registration.models.get_random_parental_filename, verbose_name='parental authorization')),
|
|
],
|
|
options={
|
|
'verbose_name': 'student registration',
|
|
'verbose_name_plural': 'student registrations',
|
|
},
|
|
bases=('registration.participantregistration',),
|
|
),
|
|
]
|