From 28b47db53d74d7d1e9036da959da2b9223782344 Mon Sep 17 00:00:00 2001 From: bart-maykin Date: Wed, 11 Oct 2023 12:28:57 +0200 Subject: [PATCH] :card_file_box: [#63] added model Betrokkene and added foreignkeys relations --- .../components/klantinteracties/models/partijen.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/openklant/components/klantinteracties/models/partijen.py b/src/openklant/components/klantinteracties/models/partijen.py index 1da71b64..ac261937 100644 --- a/src/openklant/components/klantinteracties/models/partijen.py +++ b/src/openklant/components/klantinteracties/models/partijen.py @@ -7,6 +7,7 @@ from vng_api_common.descriptors import GegevensGroepType from .constants import SoortPartij +from .klantcontacten import Betrokkene class Partij(models.Model): @@ -19,6 +20,14 @@ class Partij(models.Model): "Unieke (technische) identificatiecode van de betrokkene bij klantcontact." ), ) + betrokkene = models.ForeignKey( + Betrokkene, + on_delete=models.CASCADE, + verbose_name=_("Betrokkene bij klantcontact"), + related_name="partijen", + help_text=_("'Betrokkene bij klantcontact' was 'Partij'"), + null=True, + ) nummer = models.PositiveIntegerField( _("Nummer"), help_text=_(