forked from 77media/video-flow
72 lines
1.6 KiB
TypeScript
72 lines
1.6 KiB
TypeScript
import { post } from './request';
|
|
import { ApiResponse } from './common';
|
|
import { Character } from './video_flow';
|
|
|
|
// 创建剧集的数据类型
|
|
export interface CreateScriptEpisodeRequest {
|
|
title?: string;
|
|
script_id?: number;
|
|
characters?: {
|
|
characters?: Array<{
|
|
name?: string;
|
|
desc?: string;
|
|
}>;
|
|
};
|
|
summary?: string;
|
|
atmosphere?: string;
|
|
scene?: string;
|
|
status?: number;
|
|
task_description?: string;
|
|
creator_name?: string;
|
|
cate_tags?: {
|
|
tags?: string[];
|
|
};
|
|
episode_sort?: number;
|
|
}
|
|
|
|
// 更新剧集的数据类型
|
|
export interface UpdateScriptEpisodeRequest {
|
|
id: number;
|
|
title?: string;
|
|
script_id?: number;
|
|
status?: number;
|
|
summary?: string;
|
|
atmosphere?: string;
|
|
scene?: string;
|
|
task_description?: string;
|
|
creator_name?: string;
|
|
cate_tags?: {
|
|
tags?: string[];
|
|
};
|
|
characters?: Character[];
|
|
episode_sort?: number;
|
|
video_url?: string;
|
|
}
|
|
|
|
// 获取剧集详情请求数据类型
|
|
export interface detailScriptEpisodeRequest {
|
|
id: number;
|
|
}
|
|
|
|
// 创建剧集响应数据类型
|
|
export interface ScriptEpisode {
|
|
id: number;
|
|
title: string;
|
|
script_id: number;
|
|
status: number;
|
|
episode_sort: number;
|
|
creator_name: string;
|
|
created_at: string;
|
|
updated_at?: string;
|
|
video_url?: string;
|
|
}
|
|
|
|
// 新-获取剧集列表
|
|
export const getScriptEpisodeListNew = async (data: any): Promise<ApiResponse<any>> => {
|
|
return post<ApiResponse<any>>('/movie/list_movie_projects', data);
|
|
};
|
|
|
|
// 获取剧集详情
|
|
export const detailScriptEpisode = async (data: detailScriptEpisodeRequest): Promise<ApiResponse<ScriptEpisode>> => {
|
|
return post<ApiResponse<ScriptEpisode>>('/script_episode/detail', data);
|
|
};
|