src.models.exports module#
Data models for exports
- class src.models.exports.ExportLog(*, userId: str = '', timeInitiated: str = '', timeCompleted: str = '')[source]#
Bases:
BaseModel
- class Config[source]#
Bases:
object
Pydantic config to allow creation of data model from a JSON object with camelCase keys.
- alias_generator() str #
Converts a string to camel case.
- Parameters:
string (str) – Input string
- Returns:
Camel case string
- Return type:
str
- arbitrary_types_allowed = True#
- _abc_impl = <_abc._abc_data object>#
- time_completed: str#
- time_initiated: str#
- userId: str#
- class src.models.exports.ExportLogPackage(*, logs_package: List[ExportLog])[source]#
Bases:
BaseModel
- _abc_impl = <_abc._abc_data object>#
- class src.models.exports.ExportsPage(*, page_num: int = 1, exports_num: int = 5, userId: str = '', time_initiated_range: Optional[Union[str, dict]] = {'from': '', 'to': ''}, time_completed_range: Optional[Union[str, dict]] = {'from': '', 'to': ''})[source]#
Bases:
BaseModel
Request model for finding logs of the exports
- _abc_impl = <_abc._abc_data object>#
- exports_num: int#
- classmethod id_is_empty(v: str) Optional[str] [source]#
Validate user id search field is not empty
- Parameters:
v (str) – User id
- Returns:
user id if not empty, None if empty
- Return type:
Optional[str]
- page_num: int#
- classmethod time_completed_check(v: Dict) Optional[Dict] [source]#
Check if time completed search range is empty
- Parameters:
v (Dict) – Time completed search range
- Returns:
Search range if not empty, None if empty
- Return type:
Optional[Dict]
- time_completed_range: Optional[Union[str, dict]]#
- classmethod time_initiated_check(v: Dict) Optional[Dict] [source]#
Check if time initiated search range is empty
- Parameters:
v (Dict) – Time initiated search range
- Returns:
Search range if not empty, None if empty
- Return type:
Optional[Dict]
- time_initiated_range: Optional[Union[str, dict]]#
- userId: str#