feat-(all routes, models, migration completed)
This commit is contained in:
@@ -5,7 +5,7 @@ from pydantic import BaseModel, Field, field_validator, ConfigDict
|
||||
class CreateChat(BaseModel):
|
||||
model_config = ConfigDict(extra="forbid")
|
||||
title: str = Field(..., min_length=1, max_length=100)
|
||||
member_ids: list[str] = Field(..., min_items=1, max_items=100)
|
||||
member_ids: list[str] = Field(..., min_length=1, max_length=100)
|
||||
|
||||
|
||||
@field_validator("title")
|
||||
|
||||
@@ -5,6 +5,7 @@ class CreateUser(BaseModel):
|
||||
model_config = ConfigDict(extra="forbid")
|
||||
username: str = Field(..., pattern=r"^[a-z0-9_]{3,32}$")
|
||||
display_name: str = Field(..., min_length=1, max_length=100)
|
||||
password: str = Field(..., min_length=12, max_length=128)
|
||||
|
||||
|
||||
@field_validator("display_name")
|
||||
|
||||
Reference in New Issue
Block a user