Added technician config queries #127
This commit is contained in:
@@ -30,6 +30,10 @@ class TechnicianConfig(TableABC, ConfigurationModelABC):
|
||||
self._created_at = created_at if created_at is not None else self._created_at
|
||||
self._modified_at = modified_at if modified_at is not None else self._modified_at
|
||||
|
||||
@property
|
||||
def id(self) -> int:
|
||||
return self._id
|
||||
|
||||
@property
|
||||
def help_command_reference_url(self) -> str:
|
||||
return self._help_command_reference_url
|
||||
|
58
kdb-bot/src/bot_data/model/technician_config_history.py
Normal file
58
kdb-bot/src/bot_data/model/technician_config_history.py
Normal file
@@ -0,0 +1,58 @@
|
||||
from bot_data.abc.history_table_abc import HistoryTableABC
|
||||
|
||||
|
||||
class TechnicianConfigHistory(HistoryTableABC):
|
||||
def __init__(
|
||||
self,
|
||||
help_command_reference_url: str,
|
||||
wait_for_restart: int,
|
||||
wait_for_shutdown: int,
|
||||
cache_max_messages: int,
|
||||
deleted: bool,
|
||||
date_from: str,
|
||||
date_to: str,
|
||||
id=0,
|
||||
):
|
||||
HistoryTableABC.__init__(self)
|
||||
|
||||
self._id = id
|
||||
self._help_command_reference_url = help_command_reference_url
|
||||
self._wait_for_restart = wait_for_restart
|
||||
self._wait_for_shutdown = wait_for_shutdown
|
||||
self._cache_max_messages = cache_max_messages
|
||||
|
||||
self._deleted = deleted
|
||||
self._date_from = date_from
|
||||
self._date_to = date_to
|
||||
|
||||
@property
|
||||
def help_command_reference_url(self) -> str:
|
||||
return self._help_command_reference_url
|
||||
|
||||
@help_command_reference_url.setter
|
||||
def help_command_reference_url(self, value: str):
|
||||
self._help_command_reference_url = value
|
||||
|
||||
@property
|
||||
def wait_for_restart(self) -> int:
|
||||
return self._wait_for_restart
|
||||
|
||||
@wait_for_restart.setter
|
||||
def wait_for_restart(self, value: int):
|
||||
self._wait_for_restart = value
|
||||
|
||||
@property
|
||||
def wait_for_shutdown(self) -> int:
|
||||
return self._wait_for_shutdown
|
||||
|
||||
@wait_for_shutdown.setter
|
||||
def wait_for_shutdown(self, value: int):
|
||||
self._wait_for_shutdown = value
|
||||
|
||||
@property
|
||||
def cache_max_messages(self) -> int:
|
||||
return self._cache_max_messages
|
||||
|
||||
@cache_max_messages.setter
|
||||
def cache_max_messages(self, value: int):
|
||||
self._cache_max_messages = value
|
@@ -18,6 +18,10 @@ class TechnicianIdConfig(TableABC):
|
||||
self._created_at = created_at if created_at is not None else self._created_at
|
||||
self._modified_at = modified_at if modified_at is not None else self._modified_at
|
||||
|
||||
@property
|
||||
def id(self) -> int:
|
||||
return self._id
|
||||
|
||||
@property
|
||||
def technician_id(self) -> str:
|
||||
return self._technician_id
|
||||
|
28
kdb-bot/src/bot_data/model/technician_id_config_history.py
Normal file
28
kdb-bot/src/bot_data/model/technician_id_config_history.py
Normal file
@@ -0,0 +1,28 @@
|
||||
from bot_data.abc.history_table_abc import HistoryTableABC
|
||||
|
||||
|
||||
class TechnicianIdConfigHistory(HistoryTableABC):
|
||||
def __init__(
|
||||
self,
|
||||
technician_id: int,
|
||||
deleted: bool,
|
||||
date_from: str,
|
||||
date_to: str,
|
||||
id=0,
|
||||
):
|
||||
HistoryTableABC.__init__(self)
|
||||
|
||||
self._id = id
|
||||
self._technician_id = technician_id
|
||||
|
||||
self._deleted = deleted
|
||||
self._date_from = date_from
|
||||
self._date_to = date_to
|
||||
|
||||
@property
|
||||
def technician_id(self) -> int:
|
||||
return self._technician_id
|
||||
|
||||
@technician_id.setter
|
||||
def technician_id(self, value: int):
|
||||
self._technician_id = value
|
@@ -18,6 +18,10 @@ class TechnicianPingUrlConfig(TableABC):
|
||||
self._created_at = created_at if created_at is not None else self._created_at
|
||||
self._modified_at = modified_at if modified_at is not None else self._modified_at
|
||||
|
||||
@property
|
||||
def id(self) -> int:
|
||||
return self._id
|
||||
|
||||
@property
|
||||
def ping_url(self) -> str:
|
||||
return self._ping_url
|
||||
|
@@ -0,0 +1,28 @@
|
||||
from bot_data.abc.history_table_abc import HistoryTableABC
|
||||
|
||||
|
||||
class TechnicianPingUrlConfigHistory(HistoryTableABC):
|
||||
def __init__(
|
||||
self,
|
||||
url: str,
|
||||
deleted: bool,
|
||||
date_from: str,
|
||||
date_to: str,
|
||||
id=0,
|
||||
):
|
||||
HistoryTableABC.__init__(self)
|
||||
|
||||
self._id = id
|
||||
self._url = url
|
||||
|
||||
self._deleted = deleted
|
||||
self._date_from = date_from
|
||||
self._date_to = date_to
|
||||
|
||||
@property
|
||||
def url(self) -> str:
|
||||
return self._url
|
||||
|
||||
@url.setter
|
||||
def url(self, value: str):
|
||||
self._url = value
|
Reference in New Issue
Block a user