mirror of
https://github.com/remnawave/python-sdk.git
synced 2026-08-31 14:21:05 +00:00
- Implemented models for nodes usage history including NodeInfoDto, GetUserAccessibleNodesResponse, and usage statistics. - Created subscription-related models such as UserSubscription, SubscriptionInfoData, and various response DTOs for subscription information. - Developed models for subscription settings, templates, and system statistics, enhancing the API's capability to manage and retrieve subscription configurations. - Introduced user management models including CreateUserRequestDto, UpdateUserRequestDto, and various response DTOs for user actions. - Added bulk actions for user updates and statistics tracking, improving the efficiency of user management operations. - Established a base controller for handling API requests and responses, along with decorators for HTTP methods to streamline API interactions. - Included utility functions for serialization using orjson for better performance with Pydantic models.
17 lines
384 B
Python
17 lines
384 B
Python
import datetime
|
|
from typing import List
|
|
from uuid import UUID
|
|
|
|
from pydantic import BaseModel, Field
|
|
|
|
|
|
class UserUsageByRange(BaseModel):
|
|
user_uuid: UUID = Field(alias="userUuid")
|
|
node_uuid: UUID = Field(alias="nodeUuid")
|
|
node_name: str = Field(alias="nodeName")
|
|
total: int
|
|
date: datetime.date
|
|
|
|
|
|
class UserUsageByRangeResponseDto(List[UserUsageByRange]):
|
|
pass
|