from typing import Generic, TypeVar, Optional
from pydantic import BaseModel

T = TypeVar("T")


class MetaSchema(BaseModel):
    total_page: int
    current_page: int
    total_data: int
    total_all_data: int


class ResponseSchema(BaseModel, Generic[T]):
    message: str
    data: Optional[T] = None
    meta: Optional[MetaSchema] = None
