1
This commit is contained in:
@ -7,7 +7,7 @@ from pydantic import BaseModel, Field
|
||||
# ------------------------------
|
||||
class SensitiveCreateRequest(BaseModel):
|
||||
"""创建敏感信息记录请求模型"""
|
||||
id: int = Field(..., description="主键ID")
|
||||
# 移除了id字段,由数据库自动生成
|
||||
name: str = Field(None, max_length=255, description="名称")
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@ class SensitiveUpdateRequest(BaseModel):
|
||||
# ------------------------------
|
||||
class SensitiveResponse(BaseModel):
|
||||
"""敏感信息记录响应模型"""
|
||||
id: int = Field(..., description="主键ID")
|
||||
id: int = Field(..., description="主键ID") # 响应中仍然包含ID
|
||||
name: str = Field(None, description="名称")
|
||||
created_at: datetime = Field(..., description="记录创建时间")
|
||||
updated_at: datetime = Field(..., description="记录更新时间")
|
||||
|
Reference in New Issue
Block a user