# Generated by Django 5.1.15 on 2026-04-13 12:26

import django.db.models.deletion
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='JobOffer',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=200, verbose_name='Intitulé du poste')),
                ('slug', models.SlugField(max_length=220, unique=True)),
                ('department', models.CharField(choices=[('tech', 'Technologie'), ('agro', 'Agronomie'), ('data', 'Data & IA'), ('ops', 'Opérations'), ('sales', 'Commercial'), ('admin', 'Administration')], max_length=20, verbose_name='Département')),
                ('contract_type', models.CharField(choices=[('CDI', 'CDI'), ('CDD', 'CDD'), ('stage', 'Stage'), ('freelance', 'Freelance')], max_length=20, verbose_name='Type de contrat')),
                ('location', models.CharField(default="Abidjan, Côte d'Ivoire", max_length=150, verbose_name='Lieu')),
                ('is_remote', models.BooleanField(default=False, verbose_name='Télétravail possible')),
                ('description', models.TextField(verbose_name='Description du poste')),
                ('requirements', models.TextField(verbose_name='Compétences requises')),
                ('nice_to_have', models.TextField(blank=True, verbose_name='Compétences souhaitées')),
                ('salary_range', models.CharField(blank=True, max_length=100, verbose_name='Fourchette salariale')),
                ('status', models.CharField(choices=[('draft', 'Brouillon'), ('published', 'Publié'), ('closed', 'Fermé')], db_index=True, default='draft', max_length=20, verbose_name='Statut')),
                ('application_deadline', models.DateField(blank=True, null=True, verbose_name='Date limite de candidature')),
                ('published_at', models.DateTimeField(blank=True, null=True, verbose_name='Publié le')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
            options={
                'verbose_name': "Offre d'emploi",
                'verbose_name_plural': "Offres d'emploi",
                'ordering': ['-published_at', '-created_at'],
            },
        ),
        migrations.CreateModel(
            name='JobApplication',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('first_name', models.CharField(max_length=100, verbose_name='Prénom')),
                ('last_name', models.CharField(max_length=100, verbose_name='Nom de famille')),
                ('email', models.EmailField(max_length=254, verbose_name='Email')),
                ('phone', models.CharField(blank=True, max_length=30, verbose_name='Téléphone')),
                ('linkedin_url', models.URLField(blank=True, verbose_name='LinkedIn')),
                ('cover_letter', models.TextField(verbose_name='Lettre de motivation')),
                ('cv_file', models.FileField(upload_to='careers/cvs/%Y/%m/', verbose_name='CV')),
                ('portfolio_url', models.URLField(blank=True, verbose_name='Portfolio / GitHub')),
                ('status', models.CharField(choices=[('new', 'Nouvelle'), ('reviewing', "En cours d'examen"), ('shortlist', 'Présélectionné(e)'), ('interview', 'Entretien planifié'), ('rejected', 'Rejeté(e)'), ('hired', 'Recruté(e)')], db_index=True, default='new', max_length=20, verbose_name='Statut')),
                ('admin_notes', models.TextField(blank=True, verbose_name='Notes internes')),
                ('applied_at', models.DateTimeField(auto_now_add=True, verbose_name='Candidaté le')),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('job', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='applications', to='careers.joboffer', verbose_name='Offre')),
            ],
            options={
                'verbose_name': 'Candidature',
                'verbose_name_plural': 'Candidatures',
                'ordering': ['-applied_at'],
                'unique_together': {('job', 'email')},
            },
        ),
    ]
