24 lines
484 B
Python
24 lines
484 B
Python
|
import abc
|
||
|
|
||
|
|
||
|
class AbstractRepository(abc.ABC):
|
||
|
@abc.abstractmethod
|
||
|
def add(self, element):
|
||
|
raise NotImplementedError
|
||
|
|
||
|
@abc.abstractmethod
|
||
|
def update(self, element):
|
||
|
raise NotImplementedError
|
||
|
|
||
|
@abc.abstractmethod
|
||
|
def list(self):
|
||
|
raise NotImplementedError
|
||
|
|
||
|
@abc.abstractmethod
|
||
|
def get(self, reference):
|
||
|
raise NotImplementedError
|
||
|
|
||
|
@abc.abstractmethod
|
||
|
def delete(self, reference):
|
||
|
raise NotImplementedError
|