23 lines
687 B
Python
23 lines
687 B
Python
from django.db import models
|
|
from django.utils.translation import gettext_lazy as _
|
|
|
|
from api.core.models.trackable_model import TrackableModel
|
|
from gdpr.anonymizers import AnonymizationTemplate
|
|
|
|
|
|
class ContactMethod(TrackableModel):
|
|
"""
|
|
Model representing a contact method.
|
|
"""
|
|
|
|
name = models.CharField(verbose_name=_("nom"), max_length=100, blank=True)
|
|
anonymization_template = models.CharField(
|
|
max_length=32,
|
|
choices=[(s.value, s.name) for s in AnonymizationTemplate],
|
|
default=AnonymizationTemplate.REDACTED_ID.value,
|
|
)
|
|
|
|
class Meta:
|
|
verbose_name = _("Moyen de contact")
|
|
verbose_name_plural = _("Moyens de contact")
|