60 lines
3.4 KiB
Python
60 lines
3.4 KiB
Python
# Generated by Django 5.2.7 on 2026-06-09 22:57
|
|
|
|
import django.db.models.deletion
|
|
import django.utils.timezone
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
initial = True
|
|
|
|
dependencies = [
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='JobSource',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('name', models.CharField(max_length=160)),
|
|
('family', models.CharField(choices=[('portal', 'National portal'), ('agency', 'Interim agency'), ('company', 'Company careers')], max_length=24)),
|
|
('url', models.URLField(unique=True)),
|
|
('status', models.CharField(choices=[('planned', 'Planned'), ('active', 'Active'), ('paused', 'Paused'), ('error', 'Needs attention')], default='planned', max_length=24)),
|
|
('owner', models.CharField(blank=True, max_length=120)),
|
|
('notes', models.TextField(blank=True)),
|
|
('last_checked_at', models.DateTimeField(blank=True, null=True)),
|
|
('created_at', models.DateTimeField(auto_now_add=True)),
|
|
('updated_at', models.DateTimeField(auto_now=True)),
|
|
],
|
|
options={
|
|
'ordering': ['family', 'name'],
|
|
'indexes': [models.Index(fields=['family', 'status'], name='core_jobsou_family_d61233_idx'), models.Index(fields=['name'], name='core_jobsou_name_a1bfb5_idx')],
|
|
},
|
|
),
|
|
migrations.CreateModel(
|
|
name='JobPosting',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('title', models.CharField(max_length=220)),
|
|
('company', models.CharField(max_length=180)),
|
|
('location', models.CharField(default='Dijon, Bourgogne-Franche-Comté', max_length=160)),
|
|
('contract_type', models.CharField(choices=[('cdi', 'CDI'), ('cdd', 'CDD'), ('interim', 'Interim'), ('apprenticeship', 'Apprenticeship'), ('freelance', 'Freelance'), ('other', 'Other')], default='cdi', max_length=24)),
|
|
('remote', models.BooleanField(default=False)),
|
|
('salary', models.CharField(blank=True, max_length=120)),
|
|
('apply_url', models.URLField(blank=True)),
|
|
('published_at', models.DateField(default=django.utils.timezone.localdate)),
|
|
('description', models.TextField()),
|
|
('is_active', models.BooleanField(default=True)),
|
|
('duplicate_score', models.DecimalField(decimal_places=2, default=0, max_digits=5)),
|
|
('created_at', models.DateTimeField(auto_now_add=True)),
|
|
('updated_at', models.DateTimeField(auto_now=True)),
|
|
('source', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='jobs', to='core.jobsource')),
|
|
],
|
|
options={
|
|
'ordering': ['-published_at', '-created_at'],
|
|
'indexes': [models.Index(fields=['is_active', 'published_at'], name='core_jobpos_is_acti_ee6ffc_idx'), models.Index(fields=['company', 'title'], name='core_jobpos_company_49594a_idx'), models.Index(fields=['contract_type'], name='core_jobpos_contrac_b2fa07_idx')],
|
|
},
|
|
),
|
|
]
|