from typing import Optional
from typing import List


def convert_to_base(
        number: int, base: int, min_length: Optional[int] = None
) -> List[int]:
    """
    Convert number to its representation in a given system.

    :param number:
        positive integer number to be converted
    :param base:
        positive integer number to be used as base
    :param min_length:
        if result length is less than it, zero padding is added to the left
    :return:
        list where each element represents a digit in a given system
    """
    digits = []
    if number == 0:
        digits = [0]
    while number > 0:
        remainder = number % base
        digits.append(remainder)
        number //= base
    if min_length is not None:
        padding = [0 for _ in range(max(min_length - len(digits), 0))]
        digits.extend(padding)
    digits = digits[::-1]
    return digits