from typing import Optional, List

from .standard_result import StandardResult
from actionstreamer.Model import Token


class TokenResult(StandardResult):
    def __init__(self, code: int = 0, description: str = '', token: Optional[Token] = None):
        super().__init__(code, description)
        self.token = token or Token()


class TokenListResult(StandardResult):
    def __init__(self, code: int = 0, description: str = '', token_list: Optional[List[Token]] = None):
        super().__init__(code, description)
        self.token_list = token_list or []