This repository has been archived on 2023-01-19. You can view files and clone it, but cannot push or open issues or pull requests.
MirrorTea/mirrortea/repository/abstract_db_repository.py

35 lines
719 B
Python

from abc import ABC, abstractmethod
from ..models.matrix_room import MatrixRoom
from ..models.user import User
class AbstractDatabaseRepository(ABC):
@abstractmethod
def create_tables(self) -> None:
"""Init tables in database"""
@abstractmethod
def create_user(self, user: User) -> User:
""""""
@abstractmethod
def get_user_by_id(self) -> User:
""""""
@abstractmethod
def delete_user(self) -> None:
""""""
@abstractmethod
def create_matrix_room(self) -> MatrixRoom:
""""""
@abstractmethod
def get_matrix_room(self) -> MatrixRoom:
""""""
@abstractmethod
def delete_matrix_room(self) -> None:
""""""