| 7 | |
| 8 | |
| 9 | class SignupRequest(DTO): |
| 10 | email: str = Field( |
| 11 | ..., |
| 12 | min_length=3, |
| 13 | max_length=255, |
| 14 | description="The email of the user", |
| 15 | examples=["p8t2H@example.com", "Ww5rP@example.com"], |
| 16 | ) |
| 17 | password: str = Field( |
| 18 | ..., |
| 19 | min_length=3, |
| 20 | max_length=255, |
| 21 | description="The password of the user", |
| 22 | examples=["password", "password123"], |
| 23 | ) |
| 24 | first_name: str = Field( |
| 25 | ..., |
| 26 | min_length=3, |
| 27 | max_length=255, |
| 28 | description="The password of the user", |
| 29 | examples=["John", "Mark"], |
| 30 | ) |
| 31 | |
| 32 | second_name: str = Field( |
| 33 | ..., |
| 34 | min_length=3, |
| 35 | max_length=255, |
| 36 | description="The password of the user", |
| 37 | examples=["Smith", "Average"], |
| 38 | ) |
| 39 | |
| 40 | def to_user(self) -> User: |
| 41 | return User( |
| 42 | first_name=self.first_name, |
| 43 | second_name=self.second_name, |
| 44 | email=self.email, |
| 45 | status=UserStatus.PENDING, |
| 46 | roles=[Role.USER], |
| 47 | ) |
nothing calls this directly
no outgoing calls
no test coverage detected