Files
ACORE/apps/hiring/migrations/0008_vacancy.py
T
lokses ac0418083b hiring: вакансии и найм, HR-портал
Модель вакансий, флоу рекрутинга и панели HR-портала (заявки/вакансии).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-09-09 18:03:32 +03:00

48 lines
3.5 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Generated by Django 6.0.3 on 2026-09-08 19:23
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):
dependencies = [
('core', '0017_rename_databases_section'),
('hiring', '0007_rotate_seed_intern_passwords'),
('locations', '0013_pharmacy_edit_permission'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='Vacancy',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('uuid', models.UUIDField(default=uuid.uuid4, editable=False, unique=True)),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('title', models.CharField(max_length=200, verbose_name='Название')),
('user_location_type', models.CharField(choices=[('pharmacy', 'Аптека'), ('warehouse', 'Склад'), ('office', 'Офис')], default='pharmacy', max_length=20, verbose_name='Тип локации')),
('priority', models.CharField(choices=[('urgent', 'Срочно'), ('medium', 'Средний'), ('normal', 'Обычный')], default='normal', max_length=16, verbose_name='Приоритет')),
('status', models.CharField(choices=[('open', 'Открыта'), ('closed', 'Закрыта'), ('filled', 'Закрыта наймом')], default='open', max_length=16, verbose_name='Статус')),
('opened_at', models.DateField(default=django.utils.timezone.localdate, verbose_name='Открыта с')),
('description', models.TextField(blank=True, verbose_name='Описание')),
('candidates_count', models.PositiveIntegerField(default=0, verbose_name='Кандидатов')),
('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='vacancies_created', to=settings.AUTH_USER_MODEL, verbose_name='Создал')),
('department', models.ForeignKey(blank=True, limit_choices_to={'directory_type__code': 'department', 'is_active': True}, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='vacancies_department', to='core.directory', verbose_name='Отдел')),
('location', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='location_vacancies', to='locations.location', verbose_name='Локация')),
('pharmacy', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='pharmacy_vacancies', to='locations.pharmacy', verbose_name='Аптека')),
('post', models.ForeignKey(blank=True, limit_choices_to={'directory_type__code': 'post', 'is_active': True}, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='vacancies', to='core.directory', verbose_name='Должность')),
],
options={
'verbose_name': 'Вакансия',
'verbose_name_plural': 'Вакансии',
'ordering': ['-opened_at', '-created_at'],
'indexes': [models.Index(fields=['status', 'priority'], name='hiring_vaca_status_3522a0_idx')],
},
),
]