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
| # 媒体文件管理 GraphQL Schema
|
| extend type Mutation {
| "保存媒体文件信息"
| saveMedia(input: MediaInput!): Media
|
| "删除媒体文件"
| deleteMedia(id: ID!): Boolean
| }
|
| extend type Query {
| "根据ID获取媒体信息"
| media(id: ID!): Media
|
| "根据目标类型和目标ID获取媒体列表"
| mediasByTarget(targetType: Int!, targetId: ID!): [MediaResponse!]!
|
| "应用配置(提供媒体前缀等)"
| appConfig: AppConfig!
| }
|
| "媒体输入类型"
| 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!
| 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!
| }
|
|