mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-09-24 05:26:58 +00:00
refactor: 统一状态字段为字符串类型并更新相关组件 refactor: 更新模型基类移除租户和客户相关字段 refactor: 简化数据权限控制逻辑 refactor: 优化类型注解使用Python 3.10+语法 refactor: 清理无用导入和注释 docs: 更新文档移除多租户相关内容
24 lines
872 B
Python
24 lines
872 B
Python
# -*- coding: utf-8 -*-
|
|
|
|
from typing import Any
|
|
from pydantic import BaseModel, ConfigDict, Field
|
|
|
|
|
|
class CacheMonitorSchema(BaseModel):
|
|
"""缓存监控信息模型"""
|
|
model_config = ConfigDict(from_attributes=True)
|
|
|
|
command_stats: list[dict] = Field(default_factory=list, description='Redis命令统计信息')
|
|
db_size: int = Field(default=0, description='Redis数据库中的Key总数')
|
|
info: dict = Field(default_factory=dict, description='Redis服务器信息')
|
|
|
|
|
|
class CacheInfoSchema(BaseModel):
|
|
"""缓存对象信息模型"""
|
|
model_config = ConfigDict(from_attributes=True)
|
|
|
|
cache_key: str = Field(..., description='缓存键名')
|
|
cache_name: str = Field(..., description='缓存名称')
|
|
cache_value: Any = Field(default=None, description='缓存值')
|
|
remark: str | None = Field(default=None, description='备注说明')
|