Updates
This commit is contained in:
@@ -1,30 +1,34 @@
|
||||
from datetime import datetime
|
||||
|
||||
from pydantic import BaseModel
|
||||
from pydantic import BaseModel, ConfigDict, Field
|
||||
|
||||
|
||||
class ClientUserCreate(BaseModel):
|
||||
model_config = ConfigDict(extra="forbid")
|
||||
client_account_id: int
|
||||
full_name: str
|
||||
email: str
|
||||
full_name: str = Field(min_length=1, max_length=255)
|
||||
email: str = Field(min_length=3, max_length=255)
|
||||
role: str = "viewer"
|
||||
status: str = "invited"
|
||||
is_new_user: bool = True
|
||||
|
||||
|
||||
class ClientUserUpdate(BaseModel):
|
||||
full_name: str | None = None
|
||||
email: str | None = None
|
||||
model_config = ConfigDict(extra="forbid")
|
||||
full_name: str | None = Field(default=None, min_length=1, max_length=255)
|
||||
email: str | None = Field(default=None, min_length=3, max_length=255)
|
||||
role: str | None = None
|
||||
status: str | None = None
|
||||
is_new_user: bool | None = None
|
||||
|
||||
|
||||
class ClientFeatureUpdate(BaseModel):
|
||||
model_config = ConfigDict(extra="forbid")
|
||||
enabled: bool
|
||||
|
||||
|
||||
class ClientUserModulePermissionUpdate(BaseModel):
|
||||
model_config = ConfigDict(extra="forbid")
|
||||
access_level: str
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user