from pydantic import BaseModel from typing import List from datetime import datetime from ..models import BillingStatus, BillingType, SettlementType from uuid import UUID class Billing(BaseModel): id: int credit: int amount: int ref_id: str | None type: BillingType status: BillingStatus created_at: datetime class Billings(BaseModel): billings: List[Billing] class Url(BaseModel): url: str class Credit(BaseModel): credit: int class PlanDetail(BaseModel): id: str price: int coins: int free_coins: int class Plan(BaseModel): name: str prices: list[PlanDetail] class Plans(BaseModel): plans: list[Plan] class PlanDetailV2(PlanDetail): title: str image: str | None description: str | None class PlansV2(BaseModel): plans: list[PlanDetailV2] class Settlement(BaseModel): type: SettlementType class BasaCreditRequest(BaseModel): user_id: UUID amount: int class BillingsResponse(BaseModel): total: int page: int size: int total_pages: int items: List[Billing]