# Generated by Django 5.2.7 on 2025-10-05 16:46

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


class Migration(migrations.Migration):

    dependencies = [
        ('recruitment', '0014_source_jobposting_source'),
    ]

    operations = [
        migrations.CreateModel(
            name='HiringAgency',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200, unique=True, verbose_name='Agency Name')),
                ('contact_person', models.CharField(blank=True, max_length=150, verbose_name='Contact Person')),
                ('email', models.EmailField(blank=True, max_length=254)),
                ('phone', models.CharField(blank=True, max_length=20)),
                ('website', models.URLField(blank=True)),
                ('notes', models.TextField(blank=True, help_text='Internal notes about the agency')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
            options={
                'verbose_name': 'Hiring Agency',
                'verbose_name_plural': 'Hiring Agencies',
                'ordering': ['name'],
            },
        ),
        migrations.AddField(
            model_name='candidate',
            name='submitted_by_agency',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='submitted_candidates', to='recruitment.hiringagency', verbose_name='Submitted by Agency'),
        ),
        migrations.AddField(
            model_name='jobposting',
            name='hiring_agency',
            field=models.ForeignKey(blank=True, help_text='External agency responsible for sourcing candidates for this role', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='jobs', to='recruitment.hiringagency', verbose_name='Hiring Agency'),
        ),
    ]
