backend/src/main/resources/graphql/player.graphqls
@@ -1,295 +1,292 @@
extend type Query {
  activityPlayerApplications(name: String, activityId: ID, state: Int, page: Int, size: Int): PlayerApplicationPageResponse!
  # 新增:项目评审专用查询,包含所有阶段数据(包括复赛、决赛)
  projectReviewApplications(name: String, activityId: ID, state: Int, page: Int, size: Int): ProjectReviewApplicationPageResponse!
  activityPlayerDetail(id: ID!): ActivityPlayerDetailResponse
  # 报名状态查询
  playerRegistration(activityId: ID!): PlayerRegistrationResponse
  # 评分相关查询
  judgeRatingsForPlayer(activityPlayerId: ID!): [JudgeRatingStatusResponse!]!
  currentJudgeRating(activityPlayerId: ID!): CurrentJudgeRatingResponse
  averageScoreForPlayer(activityPlayerId: ID!): Float
  currentJudgeInfo: CurrentJudgeInfoResponse
  # 权限检查查询
  isJudgeInActivity(stageId: ID!, judgeId: ID!): Boolean!
  # 获取指定评委的评分明细
  judgeRatingDetail(activityPlayerId: ID!, judgeId: ID!): CurrentJudgeRatingResponse
  # 比赛晋级相关查询
  promotionCompetitions(name: String, page: Int, size: Int): [PromotionCompetitionResponse!]!
  competitionParticipants(competitionId: ID!, page: Int, size: Int): [CompetitionParticipantResponse!]!
  promotableParticipants(currentStageId: ID!): PromotableParticipantsResponse!
    myActivityPlayer(activityId: ID!): ActivityPlayer
    activityPlayerApplications(name: String, activityId: ID, state: Int, page: Int, size: Int): PlayerApplicationPageResponse
    # 项目评审专用查询,包含所有阶段数据(包括复赛、决赛)
    projectReviewApplications(name: String, activityId: ID, state: Int, page: Int, size: Int): ProjectReviewApplicationPageResponse
    # 获取指定选手的所有评委评分状态
    judgeRatingsForPlayer(activityPlayerId: ID!): [JudgeRatingStatusResponse!]!
    # 获取指定选手的平均分
    averageScoreForPlayer(activityPlayerId: ID!): Float
    # 获取当前评委信息
    currentJudgeInfo: CurrentJudgeInfoResponse
    # 检查评委是否在指定比赛阶段的评委列表中
    isJudgeInActivity(stageId: ID!, judgeId: ID!): Boolean
    # 获取指定评委对选手的评分明细
    judgeRatingDetail(activityPlayerId: ID!, judgeId: ID!): CurrentJudgeRatingResponse
    # 获取当前评委对选手的评分
    currentJudgeRating(activityPlayerId: ID!): CurrentJudgeRatingResponse
    activityPlayerDetail(id: ID!): ActivityPlayerDetailResponse
    # 微信端获取选手报名状态
    getPlayerRegistrationState(activityId: ID!): PlayerRegistrationResponse
    # 获取比赛晋级列表
    promotionCompetitions(name: String, page: Int, size: Int): [PromotionCompetitionResponse!]!
    # 获取可晋级参赛者列表
    promotableParticipants(currentStageId: ID!): PromotableParticipantsResponse
}
extend type Mutation {
  saveActivityPlayerRating(input: ActivityPlayerRatingInput!): Boolean!
  submitActivityRegistration(input: ActivityRegistrationInput!): ActivityRegistrationResponse!
  updateActivityRegistration(activityPlayerId: ID!, input: ActivityRegistrationInput!): ActivityRegistrationResponse!
  # 审核相关mutations
  approveActivityPlayer(activityPlayerId: ID!, feedback: String): Boolean!
  rejectActivityPlayer(activityPlayerId: ID!, feedback: String!): Boolean!
  updatePlayerFeedback(activityPlayerId: ID!, feedback: String!): Boolean!
  # 比赛晋级相关mutations
  promoteParticipants(input: PromotionInput!): PromotionResult!
    approveActivityPlayer(activityPlayerId: ID!, feedback: String): Boolean
    rejectActivityPlayer(activityPlayerId: ID!, feedback: String!): Boolean
    updatePlayerFeedback(activityPlayerId: ID!, feedback: String!): Boolean
    # 微信端提交活动报名
    submitActivityRegistration(input: ActivityRegistrationInput!): ActivityRegistrationResponse
    # 保存评委评分
    saveActivityPlayerRating(input: ActivityPlayerRatingInput!): Boolean
    # 执行学员晋级操作
    promoteParticipants(input: PromotionInput!): PromotionResult
}
type ActivityPlayer {
    id: ID!
    activityId: ID!
    playerId: ID!
    stageId: ID
    state: Int
    stateName: String
    createTime: String
    player: Player
    activity: Activity
}
type Player {
    id: ID!
    name: String
    phone: String
}
type PlayerApplicationPageResponse {
    content: [ActivityPlayerApplicationResponse]
    totalElements: Int
    page: Int
    size: Int
}
type ProjectReviewApplicationPageResponse {
    content: [ActivityPlayerApplicationResponse]
    totalElements: Int
    page: Int
    size: Int
}
# 评委评分状态响应
type JudgeRatingStatusResponse {
    judgeId: ID!
    judgeName: String!
    hasRated: Boolean!
    ratingTime: String
    totalScore: Float
}
# 当前评委信息响应
type CurrentJudgeInfoResponse {
    judgeId: ID!
    judgeName: String!
    title: String
    company: String
}
# 当前评委评分响应
type CurrentJudgeRatingResponse {
    id: ID!
    totalScore: Float
    status: Int
    remark: String
    items: [CurrentJudgeRatingItemResponse!]!
}
# 评分项响应
type CurrentJudgeRatingItemResponse {
    ratingItemId: ID!
    ratingItemName: String!
    score: Float
    weightedScore: Float
}
type ActivityPlayerApplicationResponse {
  id: ID
  playerName: String!
  activityName: String!
  projectName: String
  phone: String
  applyTime: String!
  state: Int
  ratingCount: Int
  averageScore: Float
    id: ID
    playerName: String
    activityName: String
    projectName: String
    phone: String
    applyTime: String
    state: Int
    ratingCount: Int
    averageScore: Float
}
# 比赛报名详情响应(用于评分页面)
type ActivityPlayerDetailResponse {
  id: ID!
  playerInfo: PlayerInfoResponse!
  regionInfo: RegionInfoResponse
  activityName: String!
  projectName: String
  description: String
  feedback: String
  state: Int
  submissionFiles: [SubmissionMediaResponse!]!
  ratingForm: RatingFormResponse
    id: ID
    playerInfo: PlayerInfoResponse
    regionInfo: RegionInfoResponse
    activityName: String
    projectName: String
    description: String
    feedback: String
    state: Int
    stageId: ID
    submissionFiles: [SubmissionMediaResponse]
    ratingForm: RatingFormResponse
}
# 报名审核分页响应类型
type PlayerApplicationPageResponse {
    content: [ActivityPlayerApplicationResponse!]!
    totalElements: Int!
    page: Int!
    size: Int!
}
# 项目评审分页响应类型
type ProjectReviewApplicationPageResponse {
    content: [ActivityPlayerApplicationResponse!]!
    totalElements: Int!
    page: Int!
    size: Int!
}
# 学员信息响应
type PlayerInfoResponse {
    id: ID
    name: String
    phone: String
    description: String
    avatarUrl: String
    avatar: MediaResponse
    gender: Int
    birthday: String
    education: String
    introduction: String
    description: String
    avatarUrl: String
    avatar: MediaResponse
}
# 区域信息响应
type RegionInfoResponse {
  id: ID!
  name: String!
  fullPath: String
    id: ID
    name: String
    fullPath: String
}
# 提交资料响应
type SubmissionMediaResponse {
  id: ID!
  name: String!
  url: String!
  fileExt: String
  fileSize: Int
  mediaType: Int
  thumbUrl: String
    id: ID
    name: String
    url: String
    fileExt: String
    fileSize: Int
    mediaType: Int
    thumbUrl: String
}
# 评分表单响应
type RatingFormResponse {
  schemeId: ID!
  schemeName: String!
  items: [RatingItemResponse!]!
  totalMaxScore: Int!
    schemeId: ID
    schemeName: String
    items: [RatingItemResponse]
    totalMaxScore: Int
}
# 评分提交输入类型
input ActivityPlayerRatingInput {
  activityPlayerId: ID!
  stageId: ID!
  ratings: [ActivityPlayerRatingItemInput!]!
  comment: String
# 选手报名状态响应类型
type PlayerRegistrationStateResponse {
    activityId: ID!
    playerId: ID
    registrationState: String
    canRegister: Boolean
    registrationTime: String
    projectName: String
}
# 评分项目输入类型
input ActivityPlayerRatingItemInput {
  itemId: ID!
  score: Float!
# 选手报名响应类型(用于playerRegistration和getPlayerRegistrationState查询)
type PlayerRegistrationResponse {
    id: ID
    status: Int
    registrationTime: String
    reviewStatus: Int
    reviewComment: String
}
# 评委评分状态响应类型
type JudgeRatingStatusResponse {
  judgeId: ID!
  judgeName: String!
  hasRated: Boolean!
  ratingTime: String
  totalScore: Float
}
# 当前评委评分响应类型
type CurrentJudgeRatingResponse {
  id: ID!
  totalScore: Float
  status: Int
  remark: String
  items: [CurrentJudgeRatingItemResponse!]!
}
# 当前评委评分项响应类型
type CurrentJudgeRatingItemResponse {
  ratingItemId: ID!
  ratingItemName: String!
  score: Float!
  weightedScore: Float!
}
# 评分项目分数响应类型
type RatingItemScoreResponse {
  itemId: ID!
  itemName: String!
  score: Int!
  maxScore: Int!
}
# 当前评委信息响应类型
type CurrentJudgeInfoResponse {
  judgeId: ID!
  judgeName: String!
  title: String
  company: String
}
# 报名提交输入类型
input ActivityRegistrationInput {
  activityId: ID!
  playerInfo: PlayerRegistrationInput!
  regionId: ID
  projectName: String
  description: String
  mediaFiles: [MediaFileInput!]
  attachmentMediaIds: [String!]
# 媒体文件输入类型
input MediaFileInput {
    name: String
    path: String
    fileExt: String
    fileSize: Int
    mediaType: Int
}
# 选手报名信息输入类型
input PlayerRegistrationInput {
  name: String!
  phone: String!
  gender: Int
  birthDate: String
  education: String
  introduction: String
  description: String
  avatarMediaId: String
    name: String!
    phone: String!
    birthDate: String
    gender: Int
    education: String
    introduction: String
    description: String
    avatarMediaId: String
}
# 媒体文件输入类型
input MediaFileInput {
  name: String!
  path: String!
  fileExt: String
  fileSize: Int
  mediaType: Int!
# 活动报名输入类型
input ActivityRegistrationInput {
    activityId: ID!
    playerInfo: PlayerRegistrationInput!
    regionId: ID
    projectName: String!
    description: String
    mediaFiles: [MediaFileInput]
    attachmentMediaIds: [String]
}
# 报名提交响应类型
# 活动报名响应类型
type ActivityRegistrationResponse {
  success: Boolean!
  message: String
  registrationId: ID
  playerId: ID
  userId: ID
  activityPlayerId: ID
    success: Boolean!
    message: String
    registrationId: ID
    playerId: ID
    userId: ID
    activityPlayerId: ID
}
# 玩家报名状态响应类型
type PlayerRegistrationResponse {
  id: ID
  status: Int
  registrationTime: String
  reviewStatus: Int
  reviewComment: String
# 评委评分输入类型
input ActivityPlayerRatingInput {
    activityPlayerId: ID!
    stageId: ID
    ratings: [ActivityPlayerRatingItemInput!]!
    comment: String
}
# 比赛晋级相关类型定义
# 评分项输入类型
input ActivityPlayerRatingItemInput {
    itemId: ID!
    score: Float!
}
# 比赛晋级列表响应类型
type PromotionCompetitionResponse {
  id: ID!
  competitionName: String!
  stageName: String!
  maxParticipants: Int
  currentCount: Int!
  status: Int!
  startTime: String
  endTime: String
  sortOrder: Int
  state: Int
}
# 比赛参赛者响应类型
type CompetitionParticipantResponse {
  id: ID!
  playerName: String!
  projectName: String
  phone: String
  averageScore: Float
  ratingCount: Int!
  applyTime: String!
  state: Int!
}
# 晋级操作输入类型
input PromotionInput {
  competitionId: ID!
  participantIds: [ID!]!
  targetStageId: ID
}
# 晋级操作结果类型
type PromotionResult {
  success: Boolean!
  message: String!
  promotedCount: Int!
}
# 可晋级参赛者响应类型
type PromotableParticipantResponse {
  id: ID!
  playerId: ID!
  playerName: String!
  projectName: String
  phone: String
  averageScore: Float
  ratingCount: Int!
  applyTime: String!
  state: Int!
    id: ID!
    competitionId: ID!
    competitionName: String!
    stageName: String!
    maxParticipants: Int
    currentCount: Int!
    status: Int
    startTime: String
    endTime: String
    sortOrder: Int
    state: Int
}
# 可晋级参赛者列表响应类型
type PromotableParticipantsResponse {
  participants: [PromotableParticipantResponse!]!
  selectableCount: Int!
  totalCount: Int!
  previousStageName: String!
  currentStageName: String!
    participants: [PromotableParticipantResponse!]!
    selectableCount: Int
    totalCount: Int
    previousStageName: String
    currentStageName: String
}
# 可晋级参赛者响应类型
type PromotableParticipantResponse {
    id: ID!
    playerName: String
    projectName: String
    phone: String
    averageScore: Float
    ratingCount: Int
    applyTime: String
    state: Int
    playerId: ID
}
# 晋级操作输入类型
input PromotionInput {
    competitionId: ID!
    participantIds: [ID!]!
    targetStageId: ID!
}
# 晋级操作结果类型
type PromotionResult {
    success: Boolean!
    message: String
    promotedCount: Int
}