From 3c53040dbc14d233cc7e4a136b97847d2f67f42f Mon Sep 17 00:00:00 2001 From: roboc Date: Thu, 14 Sep 2023 17:27:25 +0100 Subject: [PATCH] add types --- server/src/core.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/server/src/core.py b/server/src/core.py index d6e3065..498ca51 100644 --- a/server/src/core.py +++ b/server/src/core.py @@ -1,10 +1,12 @@ import typing from typing import Protocol +from server.src.domain.models import Group + T = typing.TypeVar("T") -class BlobDataRepo(Protocol[T]): +class RepoBase(Protocol[T]): def create(self, data: T) -> None: ... @@ -13,4 +15,11 @@ def get_all(self) -> list[T]: ... def get_by_id(self, _id: str) -> T: - ... \ No newline at end of file + ... + + def delete_by_id(self, _id: str) -> None: + ... + + +class GroupRepo(RepoBase[Group]): + ...