增加 postfix 字段
This commit is contained in:
@@ -10,6 +10,7 @@ class FunctionList(Base):
|
||||
function_name = Column(String(255), nullable=False, comment="功能名称")
|
||||
description = Column(String(1000), nullable=True, comment="描述")
|
||||
path = Column(String(500), nullable=True, comment="路径")
|
||||
postfix = Column(String(255), nullable=False, comment="后缀")
|
||||
|
||||
def to_dict(self):
|
||||
"""将模型实例转换为字典"""
|
||||
|
||||
@@ -7,6 +7,7 @@ class FunctionListBase(BaseModel):
|
||||
function_name: str
|
||||
description: Optional[str] = None
|
||||
path: Optional[str] = None
|
||||
postfix: str
|
||||
|
||||
|
||||
class FunctionListCreate(FunctionListBase):
|
||||
@@ -19,6 +20,7 @@ class FunctionListUpdate(BaseModel):
|
||||
function_name: Optional[str] = None
|
||||
description: Optional[str] = None
|
||||
path: Optional[str] = None
|
||||
postfix: Optional[str] = None
|
||||
|
||||
|
||||
class FunctionListResponse(FunctionListBase):
|
||||
@@ -34,7 +36,8 @@ class FunctionListResponse(FunctionListBase):
|
||||
id=func.id,
|
||||
function_name=func.function_name,
|
||||
description=func.description,
|
||||
path=func.path
|
||||
path=func.path,
|
||||
postfix=func.postfix
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user