Files
juwan-backend/desc/api/dispute.api
T
wwweww 19cc7a778c Refactor: Remove deprecated gRPC service files and implement new API structure
- Deleted old gRPC service definitions in `game_grpc.pb.go` and `public.go`.
- Added new API server implementations for objectstory, player, and shop services.
- Introduced configuration files for new APIs in `etc/*.yaml`.
- Created main entry points for each service in `objectstory.go`, `player.go`, and `shop.go`.
- Removed unused user update handler and user API files.
- Added utility functions for context management and HTTP header parsing.
- Introduced PostgreSQL backup configuration in `backup/postgreSql.yaml`.
2026-02-28 18:35:56 +08:00

65 lines
1.4 KiB
Plaintext

syntax = "v1"
import "common.api"
type (
PathId {
Id int64 `path:"id"`
}
Dispute {
Id int64 `json:"id"`
OrderId int64 `json:"orderId"`
Reason string `json:"reason"`
Status string `json:"status"`
Evidence []string `json:"evidence"`
Result string `json:"result,optional"`
CreatedAt string `json:"createdAt"`
}
DisputeListResp {
Items []Dispute `json:"items"`
Meta PageMeta `json:"meta"`
}
CreateDisputeReq {
PathId
Reason string `json:"reason"`
Evidence []string `json:"evidence"`
}
DisputeResponseReq {
PathId
Reason string `json:"reason"`
Evidence []string `json:"evidence"`
}
AppealReq {
PathId
Reason string `json:"reason"`
}
)
@server(
prefix: api/v1
group: dispute
)
service dispute-api {
@doc "获取争议列表"
@handler ListDisputes
get /disputes (PageReq) returns (DisputeListResp)
@doc "获取订单争议"
@handler GetOrderDispute
get /orders/:id/dispute (PathId) returns (Dispute)
@doc "发起争议"
@handler CreateDispute
post /orders/:id/dispute (CreateDisputeReq) returns (EmptyResp)
@doc "回应争议"
@handler RespondDispute
post /disputes/:id/response (DisputeResponseReq) returns (EmptyResp)
@doc "申诉"
@handler AppealDispute
post /disputes/:id/appeal (AppealReq) returns (EmptyResp)
}