feat(BaseResult): Adding toString method to BaseResult class

- Added override fun toString() method in BaseResult class
- This method can display all properties of the BaseResult object in a string
- Adding toString method helps debugging and logging, improving code maintainability
This commit is contained in:
gewuyou 2025-06-05 18:16:03 +08:00
parent 05a8d3d409
commit 96469ac1e3

View File

@ -32,4 +32,8 @@ open class BaseResult<T>(
}
fun toFlatMap(): Map<String, Any?> = toMutableFlatMap().toMap()
override fun toString(): String {
return "BaseResult(code=$code, success=$success, message='$message', data=$data, requestId=$requestId, extra=$extra)"
}
}