mirror of
https://github.com/remnawave/python-sdk.git
synced 2026-09-06 09:17:23 +00:00
- Implemented TemplateResponseDto and UpdateTemplateRequestDto for subscription templates. - Created models for system statistics including CPU, memory, and bandwidth. - Developed user models for user creation, updates, and responses. - Added bulk actions for user updates and statistics tracking. - Introduced tests for authentication, bandwidth statistics, hosts, inbounds, key generation, nodes, subscriptions, and user management. - Enhanced utility functions for generating random strings, emails, and date ranges for testing.
17 lines
399 B
Python
17 lines
399 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(BaseModel):
|
|
response: List[UserUsageByRange]
|