# Generated by Django 5.0.1 on 2024-01-12 09:51 import django.contrib.auth.models import django.contrib.auth.validators import django.contrib.gis.db.models.fields import django.db.models.deletion import django.utils.timezone import uuid from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0012_alter_user_first_name_max_length'), ] operations = [ migrations.CreateModel( name='Address', fields=[ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('street_address', models.CharField(help_text='Building number and street name of the address.', max_length=100)), ('postcode', models.PositiveIntegerField(help_text='Post code for the address.')), ('locality', models.CharField(help_text='The city and more precise locality info (as required) for the address.', max_length=100)), ('geolocation', django.contrib.gis.db.models.fields.PointField(blank=True, null=True, srid=4326)), ], ), migrations.CreateModel( name='Link', fields=[ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('link_type', models.CharField(choices=[('Website', 'Website'), ('Facebook', 'Facebook'), ('Twitter', 'Twitter'), ('Instagram', 'Instagram'), ('Autres', 'Autres')], help_text='Type of website (Instagram, FB, etc.)', max_length=30)), ('link_url', models.CharField(blank=True, help_text='URL to the website', max_length=100, null=True)), ], ), migrations.CreateModel( name='User', fields=[ ('password', models.CharField(max_length=128, verbose_name='password')), ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')), ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')), ('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[django.contrib.auth.validators.UnicodeUsernameValidator()], verbose_name='username')), ('first_name', models.CharField(blank=True, max_length=150, verbose_name='first name')), ('last_name', models.CharField(blank=True, max_length=150, verbose_name='last name')), ('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')), ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')), ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')), ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')), ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.group', verbose_name='groups')), ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.permission', verbose_name='user permissions')), ], options={ 'verbose_name': 'user', 'verbose_name_plural': 'users', 'abstract': False, }, managers=[ ('objects', django.contrib.auth.models.UserManager()), ], ), migrations.CreateModel( name='School', fields=[ ('UAI_code', models.CharField(max_length=12, primary_key=True, serialize=False)), ('name', models.CharField(help_text='The name of the school or university.', max_length=100)), ('description', models.TextField(help_text='A short description of the school or university.')), ('school_type', models.CharField(choices=[('public', 'public'), ('private', 'private')], help_text='Type of school, public or private.')), ('address', models.OneToOneField(help_text="The school's address and GPS location.", on_delete=django.db.models.deletion.CASCADE, related_name='school', to='private_app.address')), ('school_url', models.OneToOneField(help_text="A url to the school's website.", on_delete=django.db.models.deletion.CASCADE, related_name='school', to='private_app.link')), ], ), migrations.CreateModel( name='StudyProgram', fields=[ ('cod_aff_form', models.IntegerField(help_text='Parcoursup code for the program', primary_key=True, serialize=False)), ('name', models.CharField(help_text='The name of the program of study.', max_length=100)), ('discipline', models.CharField(choices=[('Droit_Sc_Politiques', 'Droit Sc. politiques'), ('Economie_AES', 'Économie, AES'), ('Arts_Lettres_Langues_SHS', 'Arts, lettres, langues, SHS'), ('Sciences_Sante', 'Sciences-santé'), ('STAPS', 'STAPS'), ('Autres', 'autres')], help_text='Choice of the general discipline to which a program belongs.', max_length=130)), ('acceptance_rate', models.FloatField(help_text='The percentage of applicants who are admitted to the program via parcoursup.', null=True)), ('L1_success_rate', models.FloatField(help_text='The percentage of first year students who validate both semesters.', null=True)), ('insertion_rate', models.FloatField(help_text='The percentage of graduates who are employeed a given period of time after graduating.', null=True)), ('insertion_time_period', models.PositiveIntegerField(help_text='The amount of time between graduation and the calculation of the insertion rate.', null=True)), ('description', models.TextField(help_text='The description of the program')), ('school', models.ForeignKey(help_text='FK to the school which offers the program of study.', on_delete=django.db.models.deletion.CASCADE, related_name='study_programs', to='private_app.school')), ('url_parcoursup', models.OneToOneField(help_text="A url to the program's parcoursup page.", on_delete=django.db.models.deletion.CASCADE, related_name='study_program', to='private_app.link')), ], ), migrations.CreateModel( name='Favorite', fields=[ ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), ('note', models.CharField(help_text='A private note written by the user about the program.', max_length=300, null=True)), ('status', models.CharField(choices=[('applied', 'applied'), ('accepted', 'accepted'), ('waitlisted', 'waitlisted'), ('enrolled', 'enrolled')], help_text="The status of the student's application, if they apply.")), ('user', models.ForeignKey(help_text='FK to the user who created the favorite.', on_delete=django.db.models.deletion.CASCADE, related_name='favorites', to=settings.AUTH_USER_MODEL)), ('study_program', models.OneToOneField(help_text='The program saved as a favorite by the user.', on_delete=django.db.models.deletion.CASCADE, related_name='favorite', to='private_app.studyprogram')), ], ), migrations.CreateModel( name='UserProfile', fields=[ ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), ('image_profile', models.ImageField(blank=True, help_text='Upload your photo', null=True, upload_to='images_profile')), ('about_me', models.TextField(help_text='A profile description of the user.', max_length=400)), ('is_public', models.BooleanField(default=False, help_text='True if the user agrees to make their profile public. False by default.')), ('student_at', models.ForeignKey(help_text='FK to a program the student in which the student is or has enrolled.', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='students', to='private_app.studyprogram')), ('url_instagram', models.OneToOneField(help_text="A url to the user's Instagram profile.", on_delete=django.db.models.deletion.CASCADE, related_name='profile_insta', to='private_app.link')), ('url_tiktok', models.OneToOneField(help_text="A url to the user's TikTok profile.", on_delete=django.db.models.deletion.CASCADE, related_name='profile_tiktok', to='private_app.link')), ('user', models.OneToOneField(help_text="The profile's owner.", on_delete=django.db.models.deletion.CASCADE, related_name='profile', to=settings.AUTH_USER_MODEL)), ], ), ]