feat(external-data): add information security registry entries endpoint

This commit is contained in:
2026-04-14 11:00:24 +02:00
parent f0c4f501a6
commit 148c4862d7
9 changed files with 168 additions and 4 deletions

View File

@@ -110,3 +110,41 @@ class ArbitrationCase(UUIDPrimaryKeyMixin, TimestampMixin, models.Model):
def __str__(self) -> str:
return f"{self.case_number} ({self.organization_id})"
class InformationSecurityRegistryEntry(UUIDPrimaryKeyMixin, TimestampMixin, models.Model):
class PresenceStatus(models.TextChoices):
PRESENT = "present", _("В реестре")
ABSENT = "absent", _("Не в реестре")
organization = models.ForeignKey(
Organization,
on_delete=models.CASCADE,
related_name="information_security_registry_entries",
verbose_name=_("организация"),
)
registry_name = models.CharField(
_("название реестра"), max_length=255, db_index=True
)
presence_status = models.CharField(
_("статус присутствия"),
max_length=16,
choices=PresenceStatus.choices,
db_index=True,
)
entry_number = models.CharField(
_("регистрационный номер"),
max_length=64,
blank=True,
default="",
)
issued_at = models.DateField(_("дата выдачи"), null=True, blank=True)
expires_at = models.DateField(_("дата окончания"), null=True, blank=True)
class Meta:
verbose_name = _("запись реестра безопасности")
verbose_name_plural = _("записи реестра безопасности")
ordering = ["registry_name", "-issued_at"]
def __str__(self) -> str:
return f"{self.registry_name} ({self.organization_id})"