From ae3349d2ff53767b5bc9cb30e1bf7e15f9e814ee Mon Sep 17 00:00:00 2001 From: lrj <owen.stl@gmail.com> Date: 星期五, 03 十月 2025 20:45:44 +0800 Subject: [PATCH] 清理测试代码和调试文件 --- backend/src/main/resources/graphql/activity.graphqls | 144 +++++++++++++++++++++++------------------------ 1 files changed, 71 insertions(+), 73 deletions(-) diff --git a/backend/src/main/resources/graphql/activity.graphqls b/backend/src/main/resources/graphql/activity.graphqls index d6eeb5b..4520da0 100644 --- a/backend/src/main/resources/graphql/activity.graphqls +++ b/backend/src/main/resources/graphql/activity.graphqls @@ -1,72 +1,75 @@ -# 姣旇禌绠$悊 GraphQL Schema +extend type Query { + activity(id: ID!): Activity + activities(page: Int!, size: Int!, name: String): PageResponse + allActivities: [Activity] + allActivityStages: [Activity] + activityStages(activityId: ID!): [Activity] + ongoingActivities: [Activity] + # 寰俊绔幏鍙栨椿鍔ㄥ垪琛� + getActivities: [Activity] + # 鑾峰彇涓诲姙鏂圭粺璁℃暟鎹� + organizerStats: OrganizerStatsResponse +} -# 姣旇禌鍝嶅簲绫诲瀷 +extend type Mutation { + saveActivity(input: ActivityInput!): Activity + deleteActivity(id: ID!): Boolean +} + type Activity { - id: ID! - pid: ID! - path: String! - name: String! + id: ID + pid: ID + path: String + name: String description: String - signupDeadline: String! + signupDeadline: String matchTime: String address: String - ratingSchemeId: ID! + ratingSchemeId: ID + ratingScheme: RatingSchemeResponse + playerCount: Int playerMax: Int - state: Int! sortOrder: Int - createTime: String! - updateTime: String! - - # 鍏宠仈鏁版嵁 - ratingScheme: RatingScheme - stages: [Activity!] - parent: Activity - judges: [ActivityJudgeResponse!]! - - # 濯掍綋鏂囦欢 + state: Int + stateName: String + createTime: String + updateTime: String coverImage: MediaResponse - images: [MediaResponse!]! - videos: [MediaResponse!]! - - # 缁熻鏁版嵁 - playerCount: Int! - stateName: String! + images: [MediaResponse] + videos: [MediaResponse] + stages: [Activity] + parent: Activity + judges: [ActivityJudgeResponse] } -# 姣旇禌鍒嗛〉鍝嶅簲 -type ActivityPageResponse { - content: [Activity!]! - totalElements: Int! - page: Int! - size: Int! +type PageResponse { + content: [Activity] + page: Int + size: Int + total: Int + totalPages: Int + totalElements: Int + number: Int + first: Boolean + last: Boolean } -# 姣旇禌璇勫鍝嶅簲绫诲瀷 -type ActivityJudgeResponse { - id: ID! - name: String! - phone: String - description: String - stageIds: [ID!]! -} - -# 姣旇禌杈撳叆绫诲瀷 input ActivityInput { id: ID pid: ID name: String! description: String - signupDeadline: String! + signupDeadline: String matchTime: String address: String - ratingSchemeId: ID! + ratingSchemeId: ID playerMax: Int + sortOrder: Int state: Int - stages: [ActivityStageInput!] - judges: [ActivityJudgeInput!] + stages: [ActivityStageInput] + judges: [ActivityJudgeInput] } -# 姣旇禌闃舵杈撳叆绫诲瀷 input ActivityStageInput { id: ID name: String! @@ -75,40 +78,35 @@ address: String ratingSchemeId: ID playerMax: Int - state: Int sortOrder: Int + state: Int } -# 姣旇禌璇勫杈撳叆绫诲瀷 input ActivityJudgeInput { judgeId: ID! - judgeName: String! - stageIds: [ID!] + judgeName: String + stageIds: [ID] } -# 鎵╁睍鏌ヨ -extend type Query { - # 鍒嗛〉鏌ヨ姣旇禌鍒楄〃 - activities(page: Int!, size: Int!, name: String): ActivityPageResponse! - - # 鑾峰彇姣旇禌璇︽儏 - activity(id: ID!): Activity - - # 鑾峰彇鎵�鏈夋瘮璧涳紙鐢ㄤ簬涓嬫媺閫夋嫨锛� - allActivities: [Activity!]! - - # 鑾峰彇姣旇禌鐨勬墍鏈夐樁娈� - activityStages(activityId: ID!): [Activity!]! - - # 鑾峰彇杩涜涓殑姣旇禌 - ongoingActivities: [Activity!]! +type ActivityJudgeResponse { + id: ID + name: String + phone: String + description: String + stageIds: [ID] } -# 鎵╁睍鍙樻洿 -extend type Mutation { - # 淇濆瓨姣旇禌锛堟柊澧炴垨缂栬緫锛� - saveActivity(input: ActivityInput!): Activity! - - # 鍒犻櫎姣旇禌 - deleteActivity(id: ID!): Boolean! +# 娲诲姩璇︽儏鍜岀姸鎬佸搷搴旂被鍨嬶紙寰俊绔娇鐢級 +type ActivityDetailAndStatusResponse { + activity: Activity + registrationStatus: String + canRegister: Boolean + playerRegistration: ActivityPlayer +} + +# 涓诲姙鏂圭粺璁″搷搴旂被鍨� +type OrganizerStatsResponse { + activeActivities: Int! + totalParticipants: Int! + totalActivities: Int! } \ No newline at end of file -- Gitblit v1.8.0