Skip to content

Commit

Permalink
✨ feat: 增加新功能
Browse files Browse the repository at this point in the history
  • Loading branch information
v_wieszheng(郑市委) committed Sep 6, 2024
1 parent ed0309d commit 1c5f5e2
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions app/schemas/project/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ class ProjectSchemaBase(BaseModel):
name: str = Field(..., description="项目名称")
app: str = Field(..., description="项目所属应用")
owner: int = Field(..., description="项目拥有者")
# private: bool = False
# description: str = "这是一个项目简介。"
# dingtalk_url: str = None
#
# @field_validator("name")
# def validate_username(cls, value: str):
# if 2 > len(value) > 6:
# raise ValueError("项目名称不能小于2大于6个字符")
# return value
private: bool = False
description: str = "这是一个项目简介。"
dingtalk_url: str = None

@field_validator("name")
def validate_username(cls, value: str):
if 2 > len(value) > 6:
raise ValueError("项目名称不能小于2大于6个字符")
return value


class UpdateProjectParam(ProjectSchemaBase):
Expand Down

0 comments on commit 1c5f5e2

Please sign in to comment.