| | |
| | | # Spring Data的Page对象会自动映射到GraphQL |
| | | |
| | | # 扩展查询类型 |
| | | |
| | | |
| | | type EmployeeReviewApplication { |
| | | id: Long! |
| | | playerName: String |
| | | projectName: String |
| | | activityName: String |
| | | state: Int |
| | | stateText: String |
| | | stateType: String |
| | | applyTime: String |
| | | } |
| | | |
| | | type EmployeeReviewPage { |
| | | content: [EmployeeReviewApplication!]! |
| | | totalElements: Int! |
| | | page: Int! |
| | | size: Int! |
| | | } |
| | | |
| | | type EmployeeReviewStats { |
| | | pendingCount: Int! |
| | | approvedCount: Int! |
| | | rejectedCount: Int! |
| | | } |
| | | |
| | | extend type Query { |
| | | # 获取所有员工列表 |
| | | employees: [EmployeeResponse!]! |
| | |
| | | |
| | | # 根据ID获取员工详情 |
| | | employee(id: Long!): EmployeeResponse |
| | | |
| | | # 员工审核统计 |
| | | employeeReviewStats(keyword: String): EmployeeReviewStats! |
| | | |
| | | # 员工审核列表 |
| | | employeeReviewApplications(keyword: String, state: Int, page: Int, size: Int): EmployeeReviewPage! |
| | | } |
| | | |
| | | # 扩展变更类型 |