#127_config_in_wi #327

Merged
edraft merged 16 commits from #127_config_in_wi into 1.1.0 2023-08-14 19:08:22 +02:00
2 changed files with 50 additions and 0 deletions
Showing only changes of commit fc3bf73986 - Show all commits

View File

@ -1,6 +1,8 @@
from abc import ABC, abstractmethod
from bot_data.model.technician_config import TechnicianConfig
from bot_data.model.technician_id_config import TechnicianIdConfig
from bot_data.model.technician_ping_url_config import TechnicianPingUrlConfig
class TechnicianConfigRepositoryABC(ABC):
@ -23,3 +25,27 @@ class TechnicianConfigRepositoryABC(ABC):
@abstractmethod
def delete_technician_config(self, technician_config: TechnicianConfig):
pass
@abstractmethod
def add_technician_id_config(self, technician_id: TechnicianIdConfig):
pass
@abstractmethod
def update_technician_id_config(self, technician_id: TechnicianIdConfig):
pass
@abstractmethod
def delete_technician_id_config(self, technician_id: TechnicianIdConfig):
pass
@abstractmethod
def add_technician_ping_url_config(self, technician_ping_url: TechnicianPingUrlConfig):
pass
@abstractmethod
def update_technician_ping_url_config(self, technician_ping_url: TechnicianPingUrlConfig):
pass
@abstractmethod
def delete_technician_ping_url_config(self, technician_ping_url: TechnicianPingUrlConfig):
pass

View File

@ -65,3 +65,27 @@ class TechnicianConfigRepositoryService(TechnicianConfigRepositoryABC):
def delete_technician_config(self, technician_config: TechnicianConfig):
self._logger.trace(__name__, f"Send SQL command: {technician_config.delete_string}")
self._context.cursor.execute(technician_config.delete_string)
def add_technician_id_config(self, technician_id: TechnicianIdConfig):
self._logger.trace(__name__, f"Send SQL command: {technician_id.insert_string}")
self._context.cursor.execute(technician_id.insert_string)
def update_technician_id_config(self, technician_id: TechnicianIdConfig):
self._logger.trace(__name__, f"Send SQL command: {technician_id.udpate_string}")
self._context.cursor.execute(technician_id.udpate_string)
def delete_technician_id_config(self, technician_id: TechnicianIdConfig):
self._logger.trace(__name__, f"Send SQL command: {technician_id.delete_string}")
self._context.cursor.execute(technician_id.delete_string)
def add_technician_ping_url_config(self, technician_ping_url: TechnicianPingUrlConfig):
self._logger.trace(__name__, f"Send SQL command: {technician_ping_url.insert_string}")
self._context.cursor.execute(technician_ping_url.insert_string)
def update_technician_ping_url_config(self, technician_ping_url: TechnicianPingUrlConfig):
self._logger.trace(__name__, f"Send SQL command: {technician_ping_url.udpate_string}")
self._context.cursor.execute(technician_ping_url.udpate_string)
def delete_technician_ping_url_config(self, technician_ping_url: TechnicianPingUrlConfig):
self._logger.trace(__name__, f"Send SQL command: {technician_ping_url.delete_string}")
self._context.cursor.execute(technician_ping_url.delete_string)