from rest_framework.pagination import LimitOffsetPagination, PageNumberPagination


class PostLimitOffsetPagination(LimitOffsetPagination):
    max_limit = 20
    default_limit = 7


class PostPageNumberPagination(PageNumberPagination):
    page_size = 10


class DeviceInfoListPagination(PageNumberPagination):
    page_size = 10
    page_size_query_param = 'limit'
    page_query_param = 'page'
    max_page_size = 1000


class LatestDailyPagination(PageNumberPagination):
    page_size = 7
    page_size_query_param = 'limit'
    page_query_param = 'page'
    max_page_size = 1000


class DeviceLogListPagination(PageNumberPagination):
    page_size = 10
    page_size_query_param = 'limit'
    page_query_param = 'page'
    max_page_size = 1000


class DeviceLogHistoryPagination(PageNumberPagination):
    page_size = 10
    page_size_query_param = 'limit'
    page_query_param = 'page'
    max_page_size = 1000

class WeatherlogHistoryPagination(PageNumberPagination):
    page_size = 10
    page_size_query_param = 'limit'
    page_query_param = 'page'
    max_page_size = 1000