-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
05d202d
commit e9d7669
Showing
4 changed files
with
177 additions
and
1 deletion.
There are no files selected for viewing
100 changes: 100 additions & 0 deletions
100
src/openklant/components/klantinteracties/migrations/0006_internetaak.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
# Generated by Django 3.2.18 on 2023-10-12 16:07 | ||
|
||
import django.core.validators | ||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
import uuid | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("klantinteracties", "0005_actor"), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name="InterneTaak", | ||
fields=[ | ||
( | ||
"id", | ||
models.UUIDField( | ||
default=uuid.uuid4, | ||
help_text="Unieke (technische) identificatiecode van de interne taak.", | ||
primary_key=True, | ||
serialize=False, | ||
unique=True, | ||
), | ||
), | ||
( | ||
"nummer", | ||
models.CharField( | ||
help_text="Uniek identificerend nummer dat tijdens communicatie tussen mensen kan worden gebruikt om de specifieke interne taak aan te duiden.", | ||
max_length=10, | ||
validators=[django.core.validators.validate_integer], | ||
verbose_name="Nummer", | ||
), | ||
), | ||
( | ||
"gevraagde_handeling", | ||
models.CharField( | ||
help_text="Handeling die moet worden uitgevoerd om de taak af te ronden.", | ||
max_length=200, | ||
verbose_name="Gevraagde handeling", | ||
), | ||
), | ||
( | ||
"toelichting", | ||
models.CharField( | ||
help_text="Toelichting die, aanvullend bij de inhoud van het klantcontact dat aanleiding gaf tot de taak en de gevraagde handeling, bijdraagt aan het kunnen afhandelen van de taak.", | ||
max_length=400, | ||
verbose_name="Toelichting", | ||
), | ||
), | ||
( | ||
"status", | ||
models.CharField( | ||
choices=[ | ||
("te_verwerken", "Het verzoek is afgehandeld."), | ||
("verwerkt", "Het verzoek id buiten behandeling gesteld."), | ||
], | ||
help_text="Aanduiding van de vordering bij afhandeling van de interne taak.", | ||
max_length=12, | ||
verbose_name="Status", | ||
), | ||
), | ||
( | ||
"toegewezen_op", | ||
models.DateTimeField( | ||
help_text="Datum en tijdstip waarop de interne taak aan een actor werd toegewezen.", | ||
verbose_name="Toegewezen op", | ||
), | ||
), | ||
( | ||
"actor", | ||
models.ForeignKey( | ||
help_text="De actor aan wie de interne taak werd toegewezen.", | ||
null=True, | ||
on_delete=django.db.models.deletion.CASCADE, | ||
related_name="interne_taak", | ||
to="klantinteracties.actor", | ||
verbose_name="Actor", | ||
), | ||
), | ||
( | ||
"klantcontact", | ||
models.ForeignKey( | ||
help_text="Het klantcontact dat aanleiding gaf tot het ontstaan van een interne taak.", | ||
null=True, | ||
on_delete=django.db.models.deletion.CASCADE, | ||
related_name="interne_taak", | ||
to="klantinteracties.klantcontact", | ||
verbose_name="Klantcontact", | ||
), | ||
), | ||
], | ||
options={ | ||
"verbose_name": "interne taak", | ||
"verbose_name_plural": "interne taken", | ||
}, | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
from .actoren import * # noqa | ||
from .digitaal_adres import * # noqa | ||
from .internetaken import * # noqa | ||
from .klantcontacten import * # noqa | ||
from .partijen import * # noqa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
76 changes: 76 additions & 0 deletions
76
src/openklant/components/klantinteracties/models/internetaken.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
import uuid | ||
|
||
from django.core.validators import validate_integer | ||
from django.db import models | ||
from django.utils.translation import gettext_lazy as _ | ||
|
||
from .actoren import Actor | ||
from .constants import Taakstatus | ||
from .klantcontacten import Klantcontact | ||
|
||
|
||
class InterneTaak(models.Model): | ||
id = models.UUIDField( | ||
primary_key=True, | ||
unique=True, | ||
default=uuid.uuid4, | ||
help_text=_("Unieke (technische) identificatiecode van de interne taak."), | ||
) | ||
actor = models.ForeignKey( | ||
Actor, | ||
on_delete=models.CASCADE, | ||
verbose_name=_("Actor"), | ||
related_name="interne_taak", | ||
help_text=_("De actor aan wie de interne taak werd toegewezen."), | ||
null=True, | ||
) | ||
klantcontact = models.ForeignKey( | ||
Klantcontact, | ||
on_delete=models.CASCADE, | ||
verbose_name=_("Klantcontact"), | ||
related_name="interne_taak", | ||
help_text=_( | ||
"Het klantcontact dat aanleiding gaf tot het ontstaan van een interne taak." | ||
), | ||
null=True, | ||
) | ||
nummer = models.CharField( | ||
_("Nummer"), | ||
help_text=_( | ||
"Uniek identificerend nummer dat tijdens communicatie tussen mensen kan " | ||
"worden gebruikt om de specifieke interne taak aan te duiden." | ||
), | ||
validators=[validate_integer], | ||
max_length=10, | ||
) | ||
gevraagde_handeling = models.CharField( | ||
_("Gevraagde handeling"), | ||
help_text=_("Handeling die moet worden uitgevoerd om de taak af te ronden."), | ||
max_length=200, | ||
) | ||
toelichting = models.CharField( | ||
_("Toelichting"), | ||
help_text=_( | ||
"Toelichting die, aanvullend bij de inhoud van het klantcontact dat " | ||
"aanleiding gaf tot de taak en de gevraagde handeling, " | ||
"bijdraagt aan het kunnen afhandelen van de taak." | ||
), | ||
max_length=400, | ||
) | ||
status = models.CharField( | ||
_("Status"), | ||
help_text=_("Aanduiding van de vordering bij afhandeling van de interne taak."), | ||
choices=Taakstatus.choices, | ||
max_length=12, | ||
) | ||
toegewezen_op = models.DateTimeField( | ||
_("Toegewezen op"), | ||
help_text=_( | ||
"Datum en tijdstip waarop de interne taak aan een actor werd toegewezen." | ||
), | ||
blank=False, | ||
) | ||
|
||
class Meta: | ||
verbose_name = _("interne taak") | ||
verbose_name_plural = _("interne taken") |