feat: 添加店铺邀请列表查询接口并修复 responded_at 未写入

This commit is contained in:
zetaloop
2026-04-23 15:54:12 +08:00
parent d596d41e1a
commit 83a2f243f4
9 changed files with 300 additions and 13 deletions
+20
View File
@@ -93,6 +93,18 @@ type (
AcceptInvitationReq {
Id int64 `path:"id"`
}
ShopInvitation {
Id int64 `json:"id"`
ShopId int64 `json:"shopId"`
PlayerId int64 `json:"playerId"`
Status string `json:"status"`
InvitedBy int64 `json:"invitedBy"`
CreatedAt int64 `json:"createdAt"`
RespondedAt int64 `json:"respondedAt,optional"`
}
ShopInvitationListResp {
Items []ShopInvitation `json:"items"`
}
)
@server (
@@ -128,6 +140,14 @@ service shop-api {
@handler InvitePlayer
post /shops/:id/invitations (InvitationReq) returns (EmptyResp)
@doc "获取店铺邀请列表"
@handler ListShopInvitations
get /shops/:id/invitations (ShopIdReq) returns (ShopInvitationListResp)
@doc "获取我收到的邀请"
@handler MyInvitations
get /shops/invitations/mine returns (ShopInvitationListResp)
@doc "接受邀请"
@handler AcceptInvitation
post /shops/invitations/:id/accept (AcceptInvitationReq) returns (EmptyResp)