To_DO: ERROR AFTER LOGGING IN

This commit is contained in:
florianuhlig
2025-10-03 15:03:18 +02:00
parent 70c85cb8be
commit 1554723ed4
27 changed files with 1484 additions and 273 deletions

40
database/interface.py Normal file
View File

@@ -0,0 +1,40 @@
from abc import ABC, abstractmethod
from typing import Optional, List, Dict, Any
class DatabaseInterface(ABC):
@abstractmethod
def connect(self) -> None:
pass
@abstractmethod
def disconnect(self) -> None:
pass
@abstractmethod
def create_user_table(self) -> None:
pass
@abstractmethod
def create_user(self, username: str, email: str, password_hash: str) -> bool:
pass
@abstractmethod
def get_user_by_email(self, email: str) -> Optional[Dict[str, Any]]:
pass
@abstractmethod
def get_user_by_username(self, username: str) -> Optional[Dict[str, Any]]:
pass
@abstractmethod
def get_password_hash_by_email(self, email: str) -> Optional[str]:
pass
@abstractmethod
def update_user_password(self, email: str, new_password_hash: str) -> bool:
pass
@abstractmethod
def delete_user(self, email: str) -> bool:
pass