From f2e98a97c0b8847becaa31c7431efbd516b92dfb Mon Sep 17 00:00:00 2001 From: Birger Schacht Date: Tue, 12 Nov 2024 16:38:22 +0100 Subject: [PATCH] feat(models): add inventory relation --- apis_instance_nsvis/models.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/apis_instance_nsvis/models.py b/apis_instance_nsvis/models.py index e6774c3..9902529 100644 --- a/apis_instance_nsvis/models.py +++ b/apis_instance_nsvis/models.py @@ -74,6 +74,19 @@ def reverse_name(self) -> str: return "has as member" +class IsInventoriedIn(Relation): + subj_model = Person + obj_model = Institution + + @classmethod + def name(self) -> str: + return "is inventoried in" + + @classmethod + def reverse_name(self) -> str: + return "inventories" + + class LivesIn(Relation): subj_model = Person obj_model = Place