Skip to content

Commit

Permalink
Add MQ request model for input validation
Browse files Browse the repository at this point in the history
  • Loading branch information
NeonDaniel committed Oct 25, 2024
1 parent cf33b27 commit 1987049
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions neon_users_service/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,3 +132,10 @@ class User(BaseModel):

def __eq__(self, other):
return self.model_dump() == other.model_dump()


class MQRequest(BaseModel):
operation: Literal["create", "read", "update", "delete"]
username: str
password: Optional[str] = None
user: Optional[User] = None

0 comments on commit 1987049

Please sign in to comment.