mirror of
https://github.com/house-of-vanity/OutFleet.git
synced 2025-08-21 14:37:16 +00:00
33 lines
738 B
Python
33 lines
738 B
Python
![]() |
"""User management command wrappers"""
|
||
|
from dataclasses import dataclass
|
||
|
from typing import List, Optional, Dict, Any
|
||
|
|
||
|
from ..models.base import BaseXrayModel
|
||
|
|
||
|
|
||
|
@dataclass
|
||
|
class AddUserRequest(BaseXrayModel):
|
||
|
"""Request to add user to inbound"""
|
||
|
inboundTag: str
|
||
|
user: Dict[str, Any] # Protocol-specific user config
|
||
|
|
||
|
|
||
|
@dataclass
|
||
|
class RemoveUserRequest(BaseXrayModel):
|
||
|
"""Request to remove user from inbound"""
|
||
|
inboundTag: str
|
||
|
email: str
|
||
|
|
||
|
|
||
|
@dataclass
|
||
|
class UserStats(BaseXrayModel):
|
||
|
"""User statistics data"""
|
||
|
email: str
|
||
|
uplink: int = 0
|
||
|
downlink: int = 0
|
||
|
online: bool = False
|
||
|
ips: List[str] = None
|
||
|
|
||
|
def __post_init__(self):
|
||
|
if self.ips is None:
|
||
|
self.ips = []
|