# Generated by Django 5.2.14 on 2026-07-07 03:01

import apps.core.storage.paths
import django.db.models.deletion
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ("rims_grants", "0052_applicationcollaborator_applicationpartner_and_more"),
    ]

    operations = [
        migrations.CreateModel(
            name="ApplicantCommunityService",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("activity", models.CharField(max_length=150)),
                ("group_name", models.CharField(max_length=150, verbose_name="Association / club")),
                ("start_year", models.PositiveSmallIntegerField(blank=True, null=True)),
                ("end_year", models.PositiveSmallIntegerField(blank=True, null=True)),
                (
                    "application",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="community_service",
                        to="rims_grants.application",
                    ),
                ),
            ],
            options={
                "ordering": ["-start_year"],
            },
        ),
        migrations.CreateModel(
            name="ApplicantEmployment",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("organisation", models.CharField(max_length=255)),
                ("job_title", models.CharField(blank=True, max_length=255)),
                ("organisation_address", models.TextField(blank=True)),
                ("professional_responsibilities", models.TextField(blank=True)),
                ("employed_from", models.DateField(blank=True, null=True)),
                ("employed_to", models.DateField(blank=True, null=True)),
                (
                    "average_monthly_salary",
                    models.DecimalField(blank=True, decimal_places=2, max_digits=12, null=True),
                ),
                ("reason_for_leaving", models.CharField(blank=True, max_length=255)),
                (
                    "application",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="employment_history",
                        to="rims_grants.application",
                    ),
                ),
            ],
            options={
                "ordering": ["-employed_from"],
            },
        ),
        migrations.CreateModel(
            name="ApplicantFundingSource",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("already_funded", models.BooleanField(default=False)),
                ("source_of_funding", models.CharField(blank=True, max_length=255)),
                (
                    "amount_already_provided",
                    models.DecimalField(blank=True, decimal_places=2, max_digits=12, null=True),
                ),
                ("funding_type", models.CharField(blank=True, max_length=64)),
                (
                    "application",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="additional_funding_sources",
                        to="rims_grants.application",
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="ApplicantGroupMembership",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("name", models.CharField(max_length=150)),
                ("role", models.CharField(blank=True, max_length=150)),
                (
                    "application",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="group_memberships",
                        to="rims_grants.application",
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="ApplicantIncomeSource",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("source", models.CharField(max_length=200)),
                (
                    "amount_range",
                    models.CharField(
                        blank=True, help_text="Annual amount range, e.g. 'USD 0-500'", max_length=64
                    ),
                ),
                (
                    "application",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="household_income_sources",
                        to="rims_grants.application",
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="ApplicantLeadershipPosition",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("position", models.CharField(max_length=150)),
                ("group_name", models.CharField(max_length=150, verbose_name="Club / association")),
                ("start_year", models.PositiveSmallIntegerField(blank=True, null=True)),
                ("end_year", models.PositiveSmallIntegerField(blank=True, null=True)),
                (
                    "certificate",
                    models.FileField(
                        blank=True, null=True, upload_to=apps.core.storage.paths.upload_to_grants
                    ),
                ),
                (
                    "application",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="leadership_positions",
                        to="rims_grants.application",
                    ),
                ),
            ],
            options={
                "ordering": ["-start_year"],
            },
        ),
        migrations.CreateModel(
            name="ApplicantParent",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("full_name", models.CharField(max_length=200)),
                (
                    "relationship",
                    models.CharField(
                        choices=[
                            ("father", "Father"),
                            ("mother", "Mother"),
                            ("guardian", "Guardian"),
                        ],
                        max_length=16,
                    ),
                ),
                (
                    "status",
                    models.CharField(
                        blank=True,
                        choices=[("alive", "Alive"), ("deceased", "Deceased")],
                        max_length=16,
                    ),
                ),
                ("date_of_death", models.DateField(blank=True, null=True)),
                (
                    "death_certificate",
                    models.FileField(
                        blank=True, null=True, upload_to=apps.core.storage.paths.upload_to_grants
                    ),
                ),
                ("is_disabled", models.BooleanField(blank=True, null=True)),
                ("disability_description", models.TextField(blank=True)),
                ("occupation", models.CharField(blank=True, max_length=150)),
                ("organisation", models.CharField(blank=True, max_length=200)),
                (
                    "gross_annual_income",
                    models.CharField(
                        blank=True, help_text="Income range, e.g. 'USD 0-500'", max_length=64
                    ),
                ),
                ("email", models.EmailField(blank=True, max_length=254)),
                ("phone", models.CharField(blank=True, max_length=32)),
                (
                    "application",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="parents",
                        to="rims_grants.application",
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="ApplicantPriorEducation",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                (
                    "qualification",
                    models.CharField(
                        blank=True, help_text="e.g. 'O-Level', 'A-Level', 'Diploma'", max_length=150
                    ),
                ),
                ("institution", models.CharField(blank=True, max_length=255)),
                ("location", models.CharField(blank=True, max_length=255)),
                (
                    "country",
                    models.CharField(blank=True, help_text="ISO 3166-1 alpha-3", max_length=3),
                ),
                (
                    "school_ownership",
                    models.CharField(
                        blank=True, help_text="e.g. government, private, religious", max_length=64
                    ),
                ),
                ("major", models.CharField(blank=True, max_length=150)),
                ("date_from", models.DateField(blank=True, null=True)),
                ("date_to", models.DateField(blank=True, null=True)),
                ("year_of_admission", models.PositiveSmallIntegerField(blank=True, null=True)),
                ("year_of_completion", models.PositiveSmallIntegerField(blank=True, null=True)),
                ("total_score", models.CharField(blank=True, max_length=32)),
                (
                    "average_cost_of_fees_per_year",
                    models.DecimalField(blank=True, decimal_places=2, max_digits=12, null=True),
                ),
                (
                    "file",
                    models.FileField(
                        blank=True, null=True, upload_to=apps.core.storage.paths.upload_to_grants
                    ),
                ),
                (
                    "application",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="prior_education",
                        to="rims_grants.application",
                    ),
                ),
            ],
            options={
                "ordering": ["-year_of_completion"],
            },
        ),
        migrations.CreateModel(
            name="ApplicantPublication",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                (
                    "category",
                    models.CharField(
                        blank=True,
                        choices=[
                            ("research", "Research project"),
                            ("publication", "Journal / conference publication"),
                            ("policy_brief", "Policy brief"),
                            ("technical_report", "Technical report"),
                        ],
                        max_length=24,
                    ),
                ),
                ("title", models.CharField(max_length=500)),
                ("description", models.TextField(blank=True)),
                (
                    "file",
                    models.FileField(
                        blank=True, null=True, upload_to=apps.core.storage.paths.upload_to_grants
                    ),
                ),
                (
                    "application",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="publications",
                        to="rims_grants.application",
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="ApplicantReference",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("referee_name", models.CharField(max_length=255)),
                ("referee_address", models.TextField(blank=True)),
                ("contact_details", models.TextField(blank=True)),
                (
                    "file",
                    models.FileField(
                        blank=True, null=True, upload_to=apps.core.storage.paths.upload_to_grants
                    ),
                ),
                (
                    "application",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="reference_letters",
                        to="rims_grants.application",
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="ApplicantTranscript",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("file", models.FileField(upload_to=apps.core.storage.paths.upload_to_grants)),
                (
                    "application",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="transcripts",
                        to="rims_grants.application",
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="ApplicantVolunteering",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("involvement", models.CharField(max_length=200)),
                (
                    "application",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="current_volunteering",
                        to="rims_grants.application",
                    ),
                ),
            ],
        ),
    ]
