2023-01-10 19:24:06 +00:00
# Generated by Django 3.2.13 on 2023-01-10 19:22
2020-12-28 18:30:51 +00:00
2020-12-31 11:13:42 +00:00
import datetime
2020-12-28 18:30:51 +00:00
from django . conf import settings
2023-01-10 19:24:06 +00:00
import django . core . validators
2020-12-28 18:30:51 +00:00
from django . db import migrations , models
import django . db . models . deletion
2020-12-31 11:13:42 +00:00
import phonenumber_field . modelfields
2020-12-28 18:30:51 +00:00
import registration . models
class Migration ( migrations . Migration ) :
initial = True
dependencies = [
2021-01-21 21:06:58 +00:00
( ' participation ' , ' 0001_initial ' ) ,
2023-01-10 19:24:06 +00:00
( ' contenttypes ' , ' 0002_remove_content_type_name ' ) ,
migrations . swappable_dependency ( settings . AUTH_USER_MODEL ) ,
2020-12-28 18:30:51 +00:00
]
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 ' ) ) ,
2023-01-10 19:24:06 +00:00
( ' polymorphic_ctype ' , models . ForeignKey ( editable = False , null = True , on_delete = django . db . models . deletion . CASCADE , related_name = ' polymorphic_registration.registration_set+ ' , to = ' contenttypes.contenttype ' ) ) ,
2020-12-28 18:30:51 +00:00
( ' 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 = [
2023-01-10 19:24:06 +00:00
( ' 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 ' ) ) ,
2020-12-31 11:13:42 +00:00
( ' birth_date ' , models . DateField ( default = datetime . date . today , verbose_name = ' birth date ' ) ) ,
2021-01-22 18:27:37 +00:00
( ' gender ' , models . CharField ( choices = [ ( ' female ' , ' Female ' ) , ( ' male ' , ' Male ' ) , ( ' other ' , ' Other ' ) ] , default = ' other ' , max_length = 6 , verbose_name = ' gender ' ) ) ,
2023-01-10 19:24:06 +00:00
( ' address ' , models . CharField ( max_length = 255 , verbose_name = ' address ' ) ) ,
( ' zip_code ' , models . PositiveSmallIntegerField ( validators = [ django . core . validators . MinValueValidator ( 1000 ) , django . core . validators . MaxValueValidator ( 99999 ) ] , verbose_name = ' zip code ' ) ) ,
( ' city ' , models . CharField ( max_length = 255 , verbose_name = ' city ' ) ) ,
2020-12-31 11:13:42 +00:00
( ' phone_number ' , phonenumber_field . modelfields . PhoneNumberField ( blank = True , max_length = 128 , region = None , verbose_name = ' phone number ' ) ) ,
2023-01-10 19:24:06 +00:00
( ' health_issues ' , models . TextField ( blank = True , help_text = ' You can indicate here your allergies or anything that is important to know for organizers ' , verbose_name = ' health issues ' ) ) ,
2020-12-28 18:30:51 +00:00
( ' photo_authorization ' , models . FileField ( blank = True , default = ' ' , upload_to = registration . models . get_random_photo_filename , verbose_name = ' photo authorization ' ) ) ,
2023-01-10 19:24:06 +00:00
( ' 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 ' ) ) ,
2020-12-28 18:30:51 +00:00
] ,
options = {
' abstract ' : False ,
' base_manager_name ' : ' objects ' ,
} ,
bases = ( ' registration.registration ' , ) ,
) ,
migrations . CreateModel (
name = ' VolunteerRegistration ' ,
fields = [
2023-01-10 19:24:06 +00:00
( ' 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 ' ) ) ,
2020-12-28 18:30:51 +00:00
( ' professional_activity ' , models . TextField ( verbose_name = ' professional activity ' ) ) ,
] ,
options = {
' abstract ' : False ,
' base_manager_name ' : ' objects ' ,
} ,
bases = ( ' registration.registration ' , ) ,
) ,
2020-12-31 11:13:42 +00:00
migrations . CreateModel (
name = ' AdminRegistration ' ,
fields = [
2023-01-10 19:24:06 +00:00
( ' 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 ' ) ) ,
2020-12-31 11:13:42 +00:00
( ' role ' , models . TextField ( verbose_name = ' role of the administrator ' ) ) ,
] ,
options = {
' verbose_name ' : ' admin registration ' ,
' verbose_name_plural ' : ' admin registrations ' ,
} ,
bases = ( ' registration.volunteerregistration ' , ) ,
) ,
2020-12-28 18:30:51 +00:00
migrations . CreateModel (
name = ' CoachRegistration ' ,
fields = [
2023-01-10 19:24:06 +00:00
( ' 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 ' ) ) ,
2020-12-28 18:30:51 +00:00
( ' 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 = [
2023-01-10 19:24:06 +00:00
( ' 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 ' ) ) ,
2020-12-28 18:30:51 +00:00
( ' 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 ' ) ) ,
2020-12-31 11:13:42 +00:00
( ' 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 ' ) ) ,
2020-12-28 18:30:51 +00:00
( ' parental_authorization ' , models . FileField ( blank = True , default = ' ' , upload_to = registration . models . get_random_parental_filename , verbose_name = ' parental authorization ' ) ) ,
2021-01-21 21:06:58 +00:00
( ' health_sheet ' , models . FileField ( blank = True , default = ' ' , upload_to = registration . models . get_random_health_filename , verbose_name = ' health sheet ' ) ) ,
2020-12-28 18:30:51 +00:00
] ,
options = {
' verbose_name ' : ' student registration ' ,
' verbose_name_plural ' : ' student registrations ' ,
} ,
bases = ( ' registration.participantregistration ' , ) ,
) ,
2021-01-21 21:06:58 +00:00
migrations . CreateModel (
name = ' Payment ' ,
fields = [
( ' id ' , models . AutoField ( auto_created = True , primary_key = True , serialize = False , verbose_name = ' ID ' ) ) ,
2023-01-10 19:24:06 +00:00
( ' type ' , models . CharField ( blank = True , choices = [ ( ' ' , ' No payment ' ) , ( ' helloasso ' , ' Hello Asso ' ) , ( ' scholarship ' , ' Scholarship ' ) , ( ' bank_transfer ' , ' Bank transfer ' ) , ( ' other ' , ' Other (please indicate) ' ) , ( ' free ' , ' The tournament is free ' ) ] , default = ' ' , max_length = 16 , verbose_name = ' type ' ) ) ,
2024-02-18 21:36:01 +00:00
( ' scholarship_file ' , models . FileField ( blank = True , default = ' ' , help_text = ' only if you have a scholarship. ' , upload_to = registration . models . get_receipt_filename , verbose_name = ' scholarship file ' ) ) ,
2021-01-21 21:06:58 +00:00
( ' additional_information ' , models . TextField ( blank = True , default = ' ' , help_text = ' To help us to find your payment. ' , verbose_name = ' additional information ' ) ) ,
( ' valid ' , models . BooleanField ( default = False , null = True , verbose_name = ' valid ' ) ) ,
2023-01-10 19:24:06 +00:00
( ' registration ' , models . OneToOneField ( on_delete = django . db . models . deletion . CASCADE , related_name = ' payment ' , to = ' registration.participantregistration ' , verbose_name = ' registration ' ) ) ,
2021-01-21 21:06:58 +00:00
] ,
options = {
' verbose_name ' : ' payment ' ,
' verbose_name_plural ' : ' payments ' ,
} ,
) ,
2020-12-28 18:30:51 +00:00
]