Source code for LOGS.Entity.EntityRequestParameter

from dataclasses import dataclass
from enum import Enum
from typing import Generic, List, Optional, TypeVar, Union

from LOGS.Entity.SerializeableContent import SerializeableClass
from LOGS.Interfaces.IPaginationRequest import IPaginationRequest


[docs] class DefaultOrder(Enum): ID_ASC = "ID_ASC" ID_DESC = "ID_DESC" NAME_ASC = "NAME_ASC" NAME_DESC = "NAME_DESC"
_Sorting = TypeVar("_Sorting", bound=Enum)
[docs] @dataclass class EntityRequestParameter(Generic[_Sorting], SerializeableClass, IPaginationRequest): _noSerialize = ["asString"] excludeIds: Optional[Union[List[int], List[str]]] = None searchTerm: Optional[str] = None ids: Optional[Union[List[int], List[str]]] = None includeCount: Optional[bool] = None includeRelations: Optional[bool] = True orderby: Optional[_Sorting] = None