# 轮播图(新闻与推广)GraphQL Schema
|
|
# 轮播图输入类型
|
input CarouselInput {
|
id: ID
|
title: String!
|
content: String
|
sortOrder: Int
|
}
|
|
# 轮播图响应类型
|
type CarouselResponse {
|
id: ID!
|
title: String!
|
content: String
|
sortOrder: Int
|
mediaCount: Int
|
createTime: String
|
updateTime: String
|
}
|
|
# 轮播图分页响应类型
|
type CarouselPageResponse {
|
content: [CarouselResponse!]!
|
totalElements: Int!
|
page: Int!
|
size: Int!
|
}
|
|
# 扩展查询
|
extend type Query {
|
# 分页查询轮播图
|
carousels(page: Int!, size: Int!, title: String): CarouselPageResponse!
|
|
# 根据ID查询轮播图
|
carousel(id: ID!): CarouselResponse
|
|
# 获取播放列表
|
carouselPlayList: [CarouselResponse!]!
|
}
|
|
# 扩展变更
|
extend type Mutation {
|
# 保存轮播图
|
saveCarousel(carousel: CarouselInput!): CarouselResponse!
|
|
# 删除轮播图
|
deleteCarousel(id: ID!): Boolean!
|
|
# 批量更新播放顺序
|
updateCarouselSortOrders(sortOrders: [CarouselSortOrderInput!]!): Boolean!
|
}
|
|
# 排序输入类型
|
input CarouselSortOrderInput {
|
id: ID!
|
sortOrder: Int!
|
}
|