lrj
16 小时以前 ae3349d2ff53767b5bc9cb30e1bf7e15f9e814ee
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
extend type Query {
    media(id: ID!): Media
    mediasByTarget(targetType: Int!, targetId: ID!): [MediaResponse]
}
 
extend type Mutation {
    saveMedia(input: MediaInput!): Media
    deleteMedia(id: ID!): Boolean
    # 微信端保存媒体文件V2
    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
}
 
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: Long!
    thumbPath: String
    duration: Int
    description: String
}
 
# 媒体保存输入类型(V2版本)
input MediaSaveInput {
    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: Long
}