20 lines
551 B
Python
20 lines
551 B
Python
from datetime import datetime
|
|
|
|
from pydantic import BaseModel, Field
|
|
|
|
|
|
class SubscriptionData(BaseModel):
|
|
has_subscription: bool = Field()
|
|
devices: int | None = Field(None)
|
|
expires_at: datetime | None = Field(None)
|
|
addon_ids: list[str] = Field(default_factory=list)
|
|
subscription_link: str | None = Field(None)
|
|
duration_days: int | None = Field(None)
|
|
|
|
|
|
class UserInfo(BaseModel):
|
|
username: str | None = Field(None)
|
|
telegram_id: str | None = Field(None)
|
|
referal_code: str = Field()
|
|
bonus_balance: float = Field()
|