fooder-api/fooder/controller/base.py
2026-04-07 16:49:30 +02:00

15 lines
334 B
Python

from fooder.context import Context
from typing import TypeVar, Generic
T = TypeVar("T")
class ControllerBase:
def __init__(self, ctx: Context) -> None:
self.ctx = ctx
class ModelController(Generic[T], ControllerBase):
def __init__(self, ctx: Context, obj: T):
super().__init__(ctx)
self.obj = obj