From 584566537c938eccc0e1bd4c02bba420f2165108 Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 3 Oct 2024 23:32:34 +0200 Subject: [PATCH] added mpsks clients added the first implentation for the client it self still a lot to do #498 --- sipa/model/pycroft/user.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/sipa/model/pycroft/user.py b/sipa/model/pycroft/user.py index f7e59686..7ba64942 100644 --- a/sipa/model/pycroft/user.py +++ b/sipa/model/pycroft/user.py @@ -1,6 +1,7 @@ from __future__ import annotations import logging from datetime import date +from typing import List from pydantic import ValidationError @@ -319,6 +320,10 @@ def membership_end_date(self) -> ActiveProperty[date | None, date | None]: capabilities=Capabilities.edit_if(self.is_member), ) + @poperty + def mpsks_clients(self) -> List[MPSK_Client]: + return + @property def is_member(self) -> bool: return self.has_property('member') @@ -422,3 +427,17 @@ def last_update(self): @property def history(self): return self._transactions + +class MPSK_Client: + + def __init__(self, name="", mac=""): + self._name = name + self._mac = mac + + @property + def name(self): + return self._name + + @property + def mac(self): + return self._mac