feat: schema mixins moved to project level
Resolves circular dependency issues.
This commit is contained in:
parent
e9fe405e06
commit
4ff9edf6d1
6 changed files with 38 additions and 43 deletions
|
|
@ -3,13 +3,9 @@ Pydantic models for the user module
|
|||
"""
|
||||
|
||||
from typing import Optional
|
||||
from pydantic import Field, EmailStr
|
||||
from pydantic import EmailStr
|
||||
|
||||
from src.schemas import CustomBaseModel
|
||||
|
||||
|
||||
class UserIDMixin(CustomBaseModel):
|
||||
user_id: int = Field(gt=0)
|
||||
from src.schemas import CustomBaseModel, OrgIDMixin
|
||||
|
||||
|
||||
class OIDCClaims(CustomBaseModel):
|
||||
|
|
@ -52,13 +48,7 @@ class UserResponse(CustomBaseModel):
|
|||
groups: Optional[dict[str, list[dict[str, str | int]]]] = None
|
||||
|
||||
|
||||
class OrgResponse(CustomBaseModel):
|
||||
org_id: int
|
||||
name: str
|
||||
|
||||
|
||||
class UserPostInvitationRequest(CustomBaseModel):
|
||||
organisation_id: int
|
||||
class UserPostInvitationRequest(OrgIDMixin):
|
||||
user_email: EmailStr
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue