v.0.10.0 redesign prj structure, multi dev containers

This commit is contained in:
tiijay
2025-11-20 11:50:19 +00:00
parent 53b1b96fb3
commit 76a8203458
52 changed files with 63 additions and 83 deletions

View File

@@ -0,0 +1,46 @@
class ResponseStatus:
def __init__(self, code: int=0, message:str="", error_text:str=""):
self._code = code
self._message = message
self._error_text = error_text
@property
def error_text(self):
"""Get the status code"""
return self._error_text
@error_text.setter
def error_text(self, value):
self._error_text = value
# Status Code property with validation
@property
def code(self):
"""Get the status code"""
return self._code
@code.setter
def code(self, value):
"""Set the status code with validation"""
if not isinstance(value, int):
raise TypeError("code must be an integer")
if value < 0 or value > 599:
raise ValueError("code must be between 0 and 599")
self._code = value
# Status Message property with validation
@property
def message(self):
"""Get the status message"""
return self._message
@message.setter
def message(self, value):
"""Set the status message with validation"""
if not isinstance(value, str):
raise TypeError("message must be a string")
self._message = value
def __repr__(self):
return f'ResponseStatus(code={self.code}, message={self.message})'