fix(parsers): align vacancy sources and procurement counters
All checks were successful
CI/CD Pipeline / Quality Gate (push) Successful in 29s
CI/CD Pipeline / Build and Push Images (push) Successful in 10s
CI/CD Pipeline / Internal Notify (push) Successful in 0s
CI/CD Pipeline / Deploy Dev in Dokploy (push) Successful in 1s

This commit is contained in:
2026-05-14 14:45:58 +02:00
parent 89607356b7
commit 6d1ec2e55c
12 changed files with 340 additions and 57 deletions

View File

@@ -8,6 +8,8 @@ from apps.core.mixins import TimestampMixin
from django.db import models
from django.utils.translation import gettext_lazy as _
VACANCY_RECORD_SOURCES = ("trudvsem", "hh", "superjob")
class ParserLoadLog(TimestampMixin, models.Model):
"""
@@ -115,6 +117,13 @@ class ParserBatchSequence(TimestampMixin, models.Model):
return f"{self.source}: next batch {self.next_batch_id}"
GENERIC_RECORD_SOURCE_CHOICES = [
*ParserLoadLog.Source.choices,
("hh", _("Вакансии HeadHunter")),
("superjob", _("Вакансии SuperJob")),
]
class IndustrialCertificateRecord(TimestampMixin, models.Model):
"""
Сертификат промышленного производства РФ.
@@ -369,7 +378,7 @@ class GenericParserRecord(TimestampMixin, models.Model):
source = models.CharField(
_("источник"),
max_length=50,
choices=ParserLoadLog.Source.choices,
choices=GENERIC_RECORD_SOURCE_CHOICES,
db_index=True,
help_text=_("Источник данных"),
)