mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 15:07:28 -06:00
Initial commit for the DL
This commit is contained in:
parent
e19d5545bc
commit
d972c505d0
38 changed files with 3512 additions and 0 deletions
25
plugins/DigitalLibrary/src/PaginationMetadata.py
Normal file
25
plugins/DigitalLibrary/src/PaginationMetadata.py
Normal file
|
@ -0,0 +1,25 @@
|
|||
# Copyright (c) 2021 Ultimaker B.V.
|
||||
|
||||
from typing import Optional
|
||||
|
||||
|
||||
class PaginationMetadata:
|
||||
"""Class representing the metadata related to pagination."""
|
||||
|
||||
def __init__(self,
|
||||
total_count: Optional[int] = None,
|
||||
total_pages: Optional[int] = None,
|
||||
**kwargs) -> None:
|
||||
"""
|
||||
Creates a new digital factory project response object
|
||||
:param total_count: The total count of items.
|
||||
:param total_pages: The total number of pages when pagination is applied.
|
||||
:param kwargs:
|
||||
"""
|
||||
|
||||
self.total_count = total_count
|
||||
self.total_pages = total_pages
|
||||
self.__dict__.update(kwargs)
|
||||
|
||||
def __str__(self) -> str:
|
||||
return "PaginationMetadata | Total Count: {}, Total Pages: {}".format(self.total_count, self.total_pages)
|
Loading…
Add table
Add a link
Reference in a new issue