mirror of
https://github.moeyy.xyz/https://github.com/GeWuYou/forgeboot
synced 2025-10-27 16:14:32 +08:00
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:
parent
05a8d3d409
commit
96469ac1e3
@ -32,4 +32,8 @@ open class BaseResult<T>(
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun toFlatMap(): Map<String, Any?> = toMutableFlatMap().toMap()
|
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)"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user