taolib.testing.config_center.models.version#

配置版本数据模型模块。

定义配置版本历史相关的 Pydantic 模型。

Classes#

ConfigVersionBase

配置版本基础模型。

ConfigVersionCreate

创建配置版本请求模型。

ConfigVersionResponse

配置版本响应模型。

ConfigVersionDocument

MongoDB 配置版本文档模型。

Module Contents#

class taolib.testing.config_center.models.version.ConfigVersionBase#

Bases: pydantic.BaseModel

配置版本基础模型。

config_id: str#
config_key: str#
version: int#
value: Any#
changed_by: str#
change_reason: str#
change_type: taolib.testing.config_center.models.enums.ChangeType#
diff_summary: dict[str, Any] | None#
class taolib.testing.config_center.models.version.ConfigVersionCreate#

Bases: ConfigVersionBase

创建配置版本请求模型。

is_rollback_target: bool#
class taolib.testing.config_center.models.version.ConfigVersionResponse#

Bases: ConfigVersionBase

配置版本响应模型。

id: str#
is_rollback_target: bool#
created_at: datetime.datetime#
model_config#
class taolib.testing.config_center.models.version.ConfigVersionDocument#

Bases: pydantic.BaseModel

MongoDB 配置版本文档模型。

id: str#
config_id: str#
config_key: str#
version: int#
value: Any#
changed_by: str#
change_reason: str#
change_type: taolib.testing.config_center.models.enums.ChangeType#
diff_summary: dict[str, Any] | None#
is_rollback_target: bool#
created_at: datetime.datetime#
model_config#
to_response() ConfigVersionResponse#

转换为响应模型。