22 lines
549 B
Python
22 lines
549 B
Python
from abc import ABC, abstractmethod
|
|
from typing import Optional
|
|
|
|
from core.domain.worker.Worker import Worker
|
|
from core.domain.worker.WorkerLog import WorkerLog
|
|
from core.domain.worker.WorkerLogLevel import WorkerLogLevel
|
|
from core.types.Id import Id
|
|
|
|
|
|
class WorkerLogRepo(ABC):
|
|
@abstractmethod
|
|
def getAll(self) -> list[WorkerLog]:
|
|
pass
|
|
|
|
@abstractmethod
|
|
def get(self, id: Id[WorkerLog]) -> Optional[WorkerLog]:
|
|
pass
|
|
|
|
@abstractmethod
|
|
def post(self, context: str, workerId: Id[Worker], data: str, level: WorkerLogLevel) -> WorkerLog:
|
|
pass
|