feat(friendships): implement FriendshipService with TDD

- Add send_request(), accept_request(), decline_request(), cancel_request()
- Add get_inbox(), get_outgoing_requests(), get_friends_list(), remove_friend()
- Add unit tests for all service methods (14 tests)
- Update FriendRequestResponse schema to include 'canceled' status
- Follow async SQLAlchemy patterns and BaseService conventions
This commit is contained in:
qzl
2026-02-28 12:01:57 +08:00
parent 0dfc52cbf7
commit 17551d662b
5 changed files with 1621 additions and 1 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ class FriendRequestResponse(BaseModel):
sender: UserBasicInfo
recipient: UserBasicInfo
content: str | None
status: Literal["pending", "accepted", "rejected"]
status: Literal["pending", "accepted", "rejected", "canceled"]
created_at: datetime