Codex Assistant
昨天 915d80766dd8e0157e9b9510b3634ed758eb5c5a
backend/src/main/resources/graphql/user.graphqls
@@ -10,6 +10,8 @@
    school: String
    major: String
    grade: String
    gender: String
    birthday: String
    roles: [String!]!
    createdAt: String
    # 角色相关信息
@@ -53,6 +55,38 @@
    mediaType: String!
}
# 用户项目类型
type UserProject {
    id: ID!
    projectName: String!
    activityName: String!
    status: String!
    statusText: String!
    createTime: String!
    submissionFiles: [SubmissionMediaResponse]
}
# 用户输入类型
input UserInput {
    name: String!
    avatar: String
    phone: String!
    gender: String!
    birthday: String
}
# 用户信息响应类型
type UserProfileInfo {
    id: ID!
    name: String!
    avatar: String
    phone: String!
    gender: String!
    birthday: String
    wxOpenId: String
    unionId: String
}
# 扩展查询类型
extend type Query {
    # 获取当前用户档案
@@ -63,4 +97,13 @@
    
    # 获取我的报名记录
    myRegistrations(limit: Int): [UserRegistration!]!
    # 获取我的项目列表
    myProjects: [UserProject!]!
}
# 扩展变更类型
extend type Mutation {
    # 保存用户信息
    saveUserInfo(input: UserInput!): UserProfileInfo!
}