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
|
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!
|
}
|