| 70 | |
| 71 | |
| 72 | class UserResponse(ResponseBaseModel): |
| 73 | @property |
| 74 | def model_name(self) -> str: |
| 75 | return "User" |
| 76 | |
| 77 | @property |
| 78 | def relationships(self) -> dict[str, RelationshipConfig]: |
| 79 | return { |
| 80 | "UserNotification": RelationshipConfig( |
| 81 | name="UserNotification", |
| 82 | service_name="user_notification_service", |
| 83 | service_method="new_by_user_id", |
| 84 | foreign_key="user_id", |
| 85 | relationship_type=RelationshipType.HAS_MANY, |
| 86 | ) |
| 87 | } |
| 88 | |
| 89 | # relationship on by own |
| 90 | # RelationshipConfig( |
| 91 | # name="User", |
| 92 | # service_name="user_service", |
| 93 | # foreign_key="id", |
| 94 | # local_key="user_id", |
| 95 | # relationship_type=RelationshipType.BELONGS_TO |
| 96 | # ) |
no outgoing calls
no test coverage detected