extend type Query {
|
|
activity(id: ID!): Activity
|
|
activities(page: Int!, size: Int!, name: String, state: Int): 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
|
updateActivityState(id: ID!, state: Int!): Boolean
|
|
}
|
|
|
|
type Activity {
|
|
id: ID
|
|
pid: ID
|
|
path: String
|
|
name: String
|
|
description: String
|
|
signupDeadline: String
|
|
matchTime: String
|
|
address: String
|
|
ratingSchemeId: ID
|
|
ratingScheme: RatingSchemeResponse
|
|
playerCount: Int
|
|
playerMax: Int
|
|
sortOrder: Int
|
|
state: Int
|
|
stateName: String
|
|
createTime: String
|
|
updateTime: String
|
|
coverImage: MediaResponse
|
|
images: [MediaResponse]
|
|
videos: [MediaResponse]
|
|
stages: [Activity]
|
|
parent: Activity
|
|
judges: [ActivityJudgeResponse]
|
|
}
|
|
|
|
type PageResponse {
|
|
content: [Activity]
|
|
page: Int
|
|
size: Int
|
|
total: Int
|
|
totalPages: Int
|
|
totalElements: Int
|
|
number: Int
|
|
first: Boolean
|
|
last: Boolean
|
|
}
|
|
|
|
input ActivityInput {
|
|
id: ID
|
|
pid: ID
|
|
name: String!
|
|
description: String
|
|
signupDeadline: String
|
|
matchTime: String
|
|
address: String
|
|
ratingSchemeId: ID
|
|
playerMax: Int
|
|
sortOrder: Int
|
|
state: Int
|
|
stages: [ActivityStageInput]
|
|
judges: [ActivityJudgeInput]
|
|
}
|
|
|
|
input ActivityStageInput {
|
|
id: ID
|
|
name: String!
|
|
description: String
|
|
matchTime: String
|
|
address: String
|
|
ratingSchemeId: ID
|
|
playerMax: Int
|
|
sortOrder: Int
|
|
state: Int
|
|
}
|
|
|
|
input ActivityJudgeInput {
|
|
judgeId: ID!
|
|
judgeName: String
|
|
stageIds: [ID]
|
|
}
|
|
|
|
type ActivityJudgeResponse {
|
|
id: ID
|
|
name: String
|
|
phone: String
|
|
description: String
|
|
stageIds: [ID]
|
|
}
|
|
|
|
# 娲诲姩璇︽儏鍜岀姸鎬佸搷搴旂被鍨嬶紙寰俊绔娇鐢級
|
|
type ActivityDetailAndStatusResponse {
|
|
activity: Activity
|
|
registrationStatus: String
|
|
canRegister: Boolean
|
|
playerRegistration: ActivityPlayer
|
|
}
|
|
|
|
# 涓诲姙鏂圭粺璁″搷搴旂被鍨?
|
|
type OrganizerStatsResponse {
|
|
activeActivities: Int!
|
|
totalParticipants: Int!
|
|
totalActivities: Int!
|
|
}
|