Refactored some custom classess

This commit is contained in:
Donald Zou
2025-01-19 14:04:21 +08:00
parent a7317af413
commit 645db97c14
4 changed files with 114 additions and 4 deletions

22
src/modules/Log.py Normal file
View File

@@ -0,0 +1,22 @@
"""
Log Class
"""
class Log:
def __init__(self, LogID: str, JobID: str, LogDate: str, Status: str, Message: str):
self.LogID = LogID
self.JobID = JobID
self.LogDate = LogDate
self.Status = Status
self.Message = Message
def toJson(self):
return {
"LogID": self.LogID,
"JobID": self.JobID,
"LogDate": self.LogDate,
"Status": self.Status,
"Message": self.Message
}
def __dict__(self):
return self.toJson()