You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
969 B
23 lines
969 B
from pydantic import BaseModel, Field
|
|
from typing import Optional, List
|
|
|
|
# 从models导入设备操作相关模型
|
|
from app.models.adb_models import (
|
|
ClickRequest, InputRequest, InstallRequest, ScreenshotResponse,
|
|
InstallResponse, LogcatResponse, ShellCommandRequest, BatchShellCommandRequest,
|
|
ShellCommandResponse
|
|
)
|
|
|
|
class LogcatRequest(BaseModel):
|
|
"""日志请求模型"""
|
|
package_name: Optional[str] = Field(None, description="指定包名过滤")
|
|
level: Optional[str] = Field("V", description="日志级别")
|
|
max_lines: Optional[int] = Field(100, description="最大行数")
|
|
|
|
class ADBDeviceInfo(BaseModel):
|
|
"""ADB设备信息模型"""
|
|
device_id: str = Field(..., description="设备ID")
|
|
model: str = Field(..., description="设备型号")
|
|
android_version: str = Field(..., description="Android版本")
|
|
sdk_version: int = Field(..., description="SDK版本")
|
|
status: str = Field(..., description="设备状态")
|