forked from 77media/video-flow
47 lines
1.0 KiB
TypeScript
47 lines
1.0 KiB
TypeScript
import { post } from './request';
|
|
|
|
// 创建剧集的数据类型
|
|
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 ScriptEpisode {
|
|
id: number;
|
|
title: string;
|
|
script_id: number;
|
|
status: number;
|
|
episode_sort: number;
|
|
creator_name: string;
|
|
created_at: string;
|
|
}
|
|
|
|
// 创建剧集响应格式
|
|
export interface EpisodeApiResponse<T> {
|
|
code: number;
|
|
msg: string;
|
|
data: T;
|
|
successfull: boolean;
|
|
}
|
|
|
|
// 创建剧集
|
|
export const createScriptEpisode = async (data: CreateScriptEpisodeRequest): Promise<EpisodeApiResponse<ScriptEpisode>> => {
|
|
return post<EpisodeApiResponse<ScriptEpisode>>('/script_episode/create', data);
|
|
};
|