# -*- coding = utf-8 -*- # @Time : 2025/2/13 下午5:01 # @File : schema.py # @Software : PyCharm # @Author : xingc # @Desc : import enum from typing import Optional, Generic, TypeVar from pydantic import BaseModel T = TypeVar('T') class BaseResponse(BaseModel, Generic[T]): status: int = 200 message: str = 'success' data: Optional[T] = None class Paginated(BaseModel, Generic[T]): list: Optional[T] = None total: int = 0 page: int = 1 page_size: int = 15 class SupportPlatformType(enum.Enum): PSA = 'psa' BGS = 'bgs' CGC = 'cgc' GBTC = 'gbtc' CCG = 'ccg' BCTC = 'bctc' class PlatformSourceType(enum.Enum): PSA = 'psa' BGS = 'bgs' CGC = 'cgc' GBTC = 'gbtc' CCG = 'ccg' BCTC = 'bctc' OTHER = 'other' class MessageType(enum.Enum): TEXT = 'text' IMAGE = 'image' READ = 'read' class CardCategoryType(enum.Enum): SPORTS = 'sports' ANIME = 'anime' OTHER = 'other' class ProductCategory(enum.Enum): VIP = 'vip' POINTS = 'points' class ProductAction(enum.Enum): VIP_RENEWAL = 'vip_renewal' RECHARGE_POINTS = 'recharge_points' class OrderStatusType(enum.Enum): INIT = 'init' FAIL = 'fail' OK = 'ok' WAIT_PAYMENT = 'wait_payment' CANCEL = 'cancel'