From ae3349d2ff53767b5bc9cb30e1bf7e15f9e814ee Mon Sep 17 00:00:00 2001
From: lrj <owen.stl@gmail.com>
Date: 星期五, 03 十月 2025 20:45:44 +0800
Subject: [PATCH] 清理测试代码和调试文件

---
 backend/src/main/resources/graphql/media.graphqls |  147 +++++++++++++++++++-----------------------------
 1 files changed, 59 insertions(+), 88 deletions(-)

diff --git a/backend/src/main/resources/graphql/media.graphqls b/backend/src/main/resources/graphql/media.graphqls
index 8964117..0e2b1d7 100644
--- a/backend/src/main/resources/graphql/media.graphqls
+++ b/backend/src/main/resources/graphql/media.graphqls
@@ -1,111 +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
-    
-    "淇濆瓨濯掍綋鏂囦欢锛堟柊鐗堟湰锛�"
-    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!
+    # 寰俊绔繚瀛樺獟浣撴枃浠禫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!
-    path: String!
-    fileSize: Int
-    fileExt: String!
-    thumbPath: String
-    duration: Int
-    description: String
-    targetType: Int
-    targetId: ID
-    mediaType: Int!
-
-    "瀹屾暣璁块棶鍦板潃锛堝墠缂� + path锛�"
-    fullUrl: String
-    "缂╃暐鍥惧畬鏁村湴鍧�锛堝墠缂� + thumbPath锛�"
-    fullThumbUrl: String
-}
-
-
-
-"搴旂敤閰嶇疆"
-type AppConfig {
-    mediaBaseUrl: String!
-}
-
-"濯掍綋淇濆瓨杈撳叆绫诲瀷锛堟柊鐗堟湰锛�"
+# 濯掍綋淇濆瓨杈撳叆绫诲瀷锛圴2鐗堟湰锛�
 input MediaSaveInput {
-    targetType: String!     # 鐩爣绫诲瀷锛歱layer, activity_player
-    targetId: ID!          # 鐩爣ID
-    path: String!          # COS鏂囦欢璺緞
-    thumbPath: String      # 缂╃暐鍥捐矾寰勶紙鍙�夛級
-    fileName: String       # 鏂囦欢鍚�
-    fileExt: String        # 鏂囦欢鎵╁睍鍚�
-    fileSize: Long         # 鏂囦欢澶у皬锛堝瓧鑺傦級
-    duration: Int          # 瑙嗛鏃堕暱锛堢锛岃棰戞枃浠朵笓鐢級
-    mediaType: Int!        # 濯掍綋绫诲瀷锛�1-鍥剧墖锛�2-瑙嗛锛�3-闊抽锛�4-鏂囨。
+    targetType: String!
+    targetId: Long!
+    path: String!
+    thumbPath: String
+    fileName: String
+    fileExt: String
+    fileSize: Long
+    duration: Int
+    mediaType: Int!
 }
 
-"濯掍綋淇濆瓨鍝嶅簲绫诲瀷"
+# 濯掍綋淇濆瓨鍝嶅簲绫诲瀷
 type MediaSaveResponse {
     success: Boolean!
-    message: String
-    mediaId: ID
+    message: String!
+    mediaId: Long
 }
\ No newline at end of file

--
Gitblit v1.8.0