Skip to content

Commit

Permalink
[#11] fix model & spec
Browse files Browse the repository at this point in the history
  • Loading branch information
Floris272 committed Mar 7, 2025
1 parent cd6c607 commit 21912b0
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 4.2.17 on 2025-03-06 15:38
# Generated by Django 4.2.17 on 2025-03-07 13:54

import django.core.validators
from django.db import migrations, models
Expand Down Expand Up @@ -44,7 +44,7 @@ class Migration(migrations.Migration):
on_delete=django.db.models.deletion.CASCADE,
related_name="waardes",
to="producttypen.eigenschap",
verbose_name="producttype",
verbose_name="eigenschap",
),
),
(
Expand All @@ -54,7 +54,7 @@ class Migration(migrations.Migration):
on_delete=django.db.models.deletion.CASCADE,
related_name="eigenschappen",
to="producten.product",
verbose_name="producttype",
verbose_name="product",
),
),
],
Expand Down
4 changes: 2 additions & 2 deletions src/open_producten/producten/models/product_eigenschap.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ class ProductEigenschap(BaseModel):

eigenschap = models.ForeignKey(
Eigenschap,
verbose_name=_("producttype"),
verbose_name=_("eigenschap"),
on_delete=models.CASCADE,
related_name="waardes",
help_text=_("Het eigenschap waarbij deze waarde hoort."),
)

product = models.ForeignKey(
Product,
verbose_name=_("producttype"),
verbose_name=_("product"),
on_delete=models.CASCADE,
related_name="eigenschappen",
help_text=_("Het product waarbij deze eigenschap hoort."),
Expand Down
3 changes: 3 additions & 0 deletions src/producten-openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,9 @@ paths:
eind_datum: '2019-08-24'
bsn: string
status: gereed
eigenschappen:
- naam: PSP-id
waarde: 12983za1
summary: Patch product
UpdateProductStatus:
value:
Expand Down
2 changes: 2 additions & 0 deletions src/producttypen-openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2257,6 +2257,8 @@ paths:
parameters:
- naam: doelgroep
waarde: inwoners
eigenschappen:
- naam: PSP-id
summary: Create producttype
required: true
security:
Expand Down

0 comments on commit 21912b0

Please sign in to comment.