• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16/**
17 * 综合类下的音频信息
18 */
19export class AudioInfo{
20  public audioId: number; // 音频ID
21  public audioName: string; // 音频名称
22  public audioIcon: Resource; // 音频图片
23  public audioAuthorName: string; // 音频作者名称
24  public audioTime: string; // 音频时间
25  public audioNum: string; // 音频使用人数
26  public audio: string; // 播放音频的文件名称
27
28  constructor(audioId: number, audioName: string, audioIcon: Resource, audioAuthorName: string, audioTime: string, audioNum: string, audio: string) {
29    this.audioId = audioId;
30    this.audioName = audioName;
31    this.audioIcon = audioIcon;
32    this.audioAuthorName = audioAuthorName;
33    this.audioTime = audioTime;
34    this.audioNum = audioNum;
35    this.audio = audio;
36  }
37}
38
39/**
40 * 综合类下的视频信息
41 */
42export class VideoDetailInfo{
43  public videoDetailId: number; // 视频ID
44  public videoDetailAuthorName: string; // 视频作者名称
45  public videoDetailAuthorIcon: Resource; // 视频作者头像
46  public videoDetailTime: string; // 视频发布时间
47  public videoDetailTitle: string; // 视频标题
48  public videoDetailLabel: string; // 视频标签
49  public videoDetailLike: string; // 视频点赞数
50  public videoDetailComment: string; // 视频评论数
51  public videoDetailCollect: string; // 视频收藏数
52  public videoDetailTransmit: string; // 视频评论数
53  public videoDetail: string; // 播放视频的文件名称
54  public commenterName: string; // 评论人名称
55  public commenterIcon: Resource;  // 评论人头像
56  public commenterContent: string; // 评论内容
57  public commenterLike: string; // 评论点赞数
58
59  constructor(videoDetailId: number, videoDetailAuthorName: string, videoDetailAuthorIcon: Resource, videoDetailTime: string, videoDetailTitle: string, videoDetailLabel: string,
60              videoDetailLike: string, videoDetailComment: string, videoDetailCollect: string, videoDetailTransmit: string, videoDetail: string,
61              commenterName: string, commenterIcon: Resource, commenterContent: string, commenterLike: string) {
62    this.videoDetailId = videoDetailId;
63    this.videoDetailAuthorName = videoDetailAuthorName;
64    this.videoDetailAuthorIcon = videoDetailAuthorIcon;
65    this.videoDetailTime = videoDetailTime;
66    this.videoDetailTitle = videoDetailTitle;
67    this.videoDetailLabel = videoDetailLabel;
68    this.videoDetailLike = videoDetailLike;
69    this.videoDetailComment = videoDetailComment;
70    this.videoDetailCollect = videoDetailCollect;
71    this.videoDetailTransmit = videoDetailTransmit;
72    this.videoDetail = videoDetail;
73    this.commenterName = commenterName;
74    this.commenterIcon = commenterIcon;
75    this.commenterContent = commenterContent;
76    this.commenterLike = commenterLike;
77  }
78}
79
80/**
81 * 视频类下的视频信息
82 */
83export class VideoInfo{
84  public videoAuthorName: string; // 视频作者名称
85  public videoAuthorIcon: Resource; // 视频作者头像
86  public videoLikeNum: string; // 视频点赞数
87  public videoTitle: string; // 视频标题
88  public video: Resource; // 视频展示图片的文件名称
89
90  constructor(videoAuthorName: string, videoAuthorIcon: Resource, videoLikeNum: string, videoTitle: string, video: Resource) {
91    this.videoAuthorName = videoAuthorName;
92    this.videoAuthorIcon = videoAuthorIcon;
93    this.videoLikeNum = videoLikeNum;
94    this.videoTitle = videoTitle;
95    this.video = video;
96  }
97}
98
99/**
100 * 一条搜索的搜索结果模板
101 */
102export class SearchResult{
103  public labelList: Array<string>;
104  public audioInfoList: Array<AudioInfo>;
105  public videoDetailInfo: Array<VideoDetailInfo>;
106  public videoInfo: Array<VideoInfo>;
107
108  constructor(labelList: Array<string>, audioInfoList: Array<AudioInfo>, videoDetailInfo: Array<VideoDetailInfo>, videoInfo: Array<VideoInfo>) {
109    this.labelList = labelList;
110    this.audioInfoList = audioInfoList;
111    this.videoDetailInfo = videoDetailInfo;
112    this.videoInfo = videoInfo;
113  }
114}