Please solve the programming task below using a self-contained code snippet in a markdown code block.

Given an integer num, return a string of its base 7 representation.
 
Please complete the following python code precisely:
```python
class Solution:
    def convertToBase7(self, num: int) -> str:
```