Feat(SQL, UI): Logic for Get-Many SQL Stored Procedures refactored to use Calc Stored Procedures and Dog Command Links page styling improved.
This commit is contained in:
@@ -19,8 +19,9 @@ from typing import ClassVar
|
||||
|
||||
|
||||
class Command_Category(SQLAlchemy_ABC, Base):
|
||||
ATTR_ID_COMMAND_CATEGORY: ClassVar[str] = 'id_command_category'
|
||||
FLAG_COMMAND_CATEGORY: ClassVar[str] = 'command-category'
|
||||
NAME_ATTR_OPTION_VALUE: ClassVar[str] = FLAG_COMMAND_CATEGORY
|
||||
NAME_ATTR_OPTION_VALUE: ClassVar[str] = ATTR_ID_COMMAND_CATEGORY
|
||||
NAME_ATTR_OPTION_TEXT: ClassVar[str] = Base.FLAG_NAME
|
||||
|
||||
__tablename__ = 'DOG_Command_Category'
|
||||
@@ -50,23 +51,24 @@ class Command_Category(SQLAlchemy_ABC, Base):
|
||||
_m = 'Command_Category.from_json'
|
||||
command_category = cls()
|
||||
if json is None: return Command_Category
|
||||
Helper_App.console_log(f'{_m}\njson: {json}')
|
||||
# Helper_App.console_log(f'{_m}\njson: {json}')
|
||||
command_category.id_command_category = -1
|
||||
command_category.code = json[cls.FLAG_CODE]
|
||||
command_category.name = json[cls.FLAG_NAME]
|
||||
command_category.active = json[cls.FLAG_ACTIVE]
|
||||
Helper_App.console_log(f'Command_Category: {command_category}')
|
||||
# Helper_App.console_log(f'Command_Category: {command_category}')
|
||||
return command_category
|
||||
|
||||
|
||||
def to_json(self):
|
||||
as_json = {
|
||||
self.FLAG_COMMAND_CATEGORY: self.id_command_category
|
||||
**self.get_shared_json_attributes(self)
|
||||
, self.ATTR_ID_COMMAND_CATEGORY: self.id_command_category
|
||||
, self.FLAG_CODE: self.code
|
||||
, self.FLAG_NAME: self.name
|
||||
, self.FLAG_ACTIVE: self.active
|
||||
}
|
||||
Helper_App.console_log(f'as_json: {as_json}')
|
||||
# Helper_App.console_log(f'as_json: {as_json}')
|
||||
return as_json
|
||||
|
||||
def __repr__(self):
|
||||
|
||||
Reference in New Issue
Block a user