From 915d80766dd8e0157e9b9510b3634ed758eb5c5a Mon Sep 17 00:00:00 2001
From: Codex Assistant <codex@example.com>
Date: 星期日, 05 十月 2025 14:45:58 +0800
Subject: [PATCH] feat: 新增员工审核入口与审核页面
---
backend/src/main/resources/graphql/media.graphqls | 116 +++++++++++++++++++++++++++++-----------------------------
1 files changed, 58 insertions(+), 58 deletions(-)
diff --git a/backend/src/main/resources/graphql/media.graphqls b/backend/src/main/resources/graphql/media.graphqls
index 97961f1..0e2b1d7 100644
--- a/backend/src/main/resources/graphql/media.graphqls
+++ b/backend/src/main/resources/graphql/media.graphqls
@@ -1,82 +1,82 @@
-# 濯掍綋鏂囦欢绠$悊 GraphQL Schema
+extend type Query {
+ media(id: ID!): Media
+ mediasByTarget(targetType: Int!, targetId: ID!): [MediaResponse]
+}
extend type Mutation {
- "淇濆瓨濯掍綋鏂囦欢淇℃伅"
saveMedia(input: MediaInput!): Media
-
- "鍒犻櫎濯掍綋鏂囦欢"
deleteMedia(id: ID!): Boolean
+ # 寰俊绔繚瀛樺獟浣撴枃浠禫2
+ saveMediaV2(input: MediaSaveInput!): MediaSaveResponse
+ # 淇濆瓨閫夋墜澶村儚
+ savePlayerAvatar(playerId: ID!, path: String!, fileName: String!, fileSize: Long!): MediaSaveResponse
+ # 淇濆瓨娲诲姩鎶ュ悕闄勪欢
+ saveActivityPlayerAttachment(activityPlayerId: ID!, path: String!, fileName: String!, fileSize: Long!, mediaType: Int!): MediaSaveResponse
}
-extend type Query {
- "鏍规嵁ID鑾峰彇濯掍綋淇℃伅"
- media(id: ID!): Media
-
- "鏍规嵁鐩爣绫诲瀷鍜岀洰鏍嘔D鑾峰彇濯掍綋鍒楄〃"
- mediasByTarget(targetType: Int!, targetId: ID!): [MediaResponse!]!
-
- "搴旂敤閰嶇疆锛堟彁渚涘獟浣撳墠缂�绛夛級"
- appConfig: AppConfig!
+type Media {
+ id: ID
+ name: String
+ path: String
+ fileSize: Int
+ fileExt: String
+ mediaType: Int
+ targetType: Int
+ targetId: Long
+ thumbPath: String
+ duration: Int
+ description: String
+ fullUrl: String
+ fullThumbUrl: String
}
-"濯掍綋杈撳叆绫诲瀷"
+# 涓庡悗绔� DTO 瀵归綈鐨勫搷搴旂被鍨嬶紝渚� Carousel/Activity 绛変娇鐢�
+type MediaResponse {
+ id: ID
+ name: String
+ path: String
+ fileSize: Int
+ fileExt: String
+ mediaType: Int
+ targetType: Int
+ targetId: Long
+ thumbPath: String
+ duration: Int
+ description: String
+ fullUrl: String
+ fullThumbUrl: String
+}
+
+# 濯掍綋杈撳叆绫诲瀷
input MediaInput {
name: String!
path: String!
- fileSize: Int!
- fileExt: String!
- mediaType: Int!
- targetType: Int
- targetId: ID
- thumbPath: String
- duration: Int
- description: String
-}
-
-"濯掍綋鏂囦欢绫诲瀷"
-type Media {
- id: ID!
- name: String!
- path: String!
fileSize: Int
- fileExt: String!
+ fileExt: String
+ mediaType: Int!
+ targetType: Int!
+ targetId: Long!
thumbPath: String
duration: Int
description: String
- state: String
- targetType: Int
- targetId: ID
- mediaType: Int!
-
- "瀹屾暣璁块棶鍦板潃锛堝墠缂� + path锛�"
- fullUrl: String
- "缂╃暐鍥惧畬鏁村湴鍧�锛堝墠缂� + thumbPath锛�"
- fullThumbUrl: String
}
-"濯掍綋鍝嶅簲绫诲瀷"
-type MediaResponse {
- id: ID!
- name: String!
+# 濯掍綋淇濆瓨杈撳叆绫诲瀷锛圴2鐗堟湰锛�
+input MediaSaveInput {
+ targetType: String!
+ targetId: Long!
path: String!
- fileSize: Int
- fileExt: String!
thumbPath: String
+ fileName: String
+ fileExt: String
+ fileSize: Long
duration: Int
- description: String
- targetType: Int
- targetId: ID
mediaType: Int!
-
- "瀹屾暣璁块棶鍦板潃锛堝墠缂� + path锛�"
- fullUrl: String
- "缂╃暐鍥惧畬鏁村湴鍧�锛堝墠缂� + thumbPath锛�"
- fullThumbUrl: String
}
-
-
-"搴旂敤閰嶇疆"
-type AppConfig {
- mediaBaseUrl: String!
+# 濯掍綋淇濆瓨鍝嶅簲绫诲瀷
+type MediaSaveResponse {
+ success: Boolean!
+ message: String!
+ mediaId: Long
}
\ No newline at end of file
--
Gitblit v1.8.0