forked from 77media/video-flow
42 lines
984 B
TypeScript
42 lines
984 B
TypeScript
import { post } from './request';
|
|
import { ApiResponse } from './common';
|
|
|
|
// 创建剧本项目的数据类型
|
|
export interface CreateScriptProjectRequest {
|
|
title?: string;
|
|
script_author?: string;
|
|
characters?: Array<{
|
|
name?: string;
|
|
desc?: string;
|
|
}>;
|
|
summary?: string;
|
|
project_type?: number;
|
|
status?: number;
|
|
cate_tags?: string[];
|
|
creator_name?: string;
|
|
mode?: number;
|
|
resolution?: number;
|
|
}
|
|
|
|
// 创建剧本项目响应数据类型
|
|
export interface ScriptProject {
|
|
id: number;
|
|
title: string;
|
|
script_author: string;
|
|
characters: Array<{
|
|
name: string;
|
|
desc: string;
|
|
}>;
|
|
summary: string;
|
|
project_type: number;
|
|
status: number;
|
|
cate_tags: string[];
|
|
creator_name: string;
|
|
mode: number;
|
|
resolution: number;
|
|
}
|
|
|
|
// 创建剧本项目
|
|
export const createScriptProject = async (data: CreateScriptProjectRequest): Promise<ApiResponse<ScriptProject>> => {
|
|
return post<ApiResponse<ScriptProject>>('/script_project/create', data);
|
|
}; |