forked from 77media/video-flow
130 lines
2.3 KiB
TypeScript
130 lines
2.3 KiB
TypeScript
/**
|
|
* 实体接口定义
|
|
* 所有实体都应该实现这些基础接口
|
|
*/
|
|
|
|
/**
|
|
* 基础实体接口
|
|
*/
|
|
export interface BaseEntity {
|
|
/** 唯一标识 */
|
|
readonly id: string;
|
|
/** 更新时间 */
|
|
readonly updatedAt: number;
|
|
|
|
/**loading进度 0-100 */
|
|
loadingProgress: number;
|
|
/** 禁止编辑 */
|
|
disableEdit: boolean;
|
|
}
|
|
|
|
/**
|
|
* AI文本实体接口
|
|
*/
|
|
export interface AITextEntity extends BaseEntity {
|
|
/** 文本内容 */
|
|
content: string;
|
|
}
|
|
|
|
/**
|
|
* 角色实体接口
|
|
*/
|
|
export interface RoleEntity extends BaseEntity {
|
|
/** 角色名称 */
|
|
name: string;
|
|
/** 角色提示词Id */
|
|
generateTextId: string;
|
|
/**角色标签 */
|
|
tagIds: string[];
|
|
/** 角色图片URL */
|
|
imageUrl: string;
|
|
/** 角色是否已存储 */
|
|
isStored: boolean;
|
|
}
|
|
|
|
/**
|
|
* 标签实体接口
|
|
*/
|
|
export interface TagEntity extends BaseEntity {
|
|
/** 标签名称 */
|
|
name: string;
|
|
/** 内容标签类型 */
|
|
content: number | string;
|
|
}
|
|
|
|
/**
|
|
* 场景实体接口
|
|
*/
|
|
export interface SceneEntity extends BaseEntity {
|
|
/** 场景名称 */
|
|
name: string;
|
|
/** 场景图片URL */
|
|
imageUrl: string;
|
|
/** 场景标签 */
|
|
tagIds: string[];
|
|
/** 场景提示词Id */
|
|
generateTextId: string;
|
|
}
|
|
/**对话内容项 */
|
|
interface ContentItem {
|
|
/** 角色ID */
|
|
roleId: string;
|
|
/** 对话内容 */
|
|
content: string;
|
|
}
|
|
export enum ShotStatus {
|
|
/** 草稿加载中 */
|
|
sketchLoading = 0,
|
|
/** 视频加载中 */
|
|
videoLoading = 1,
|
|
/** 完成 */
|
|
finished = 2,
|
|
}
|
|
/**
|
|
* 分镜实体接口
|
|
*/
|
|
export interface ShotEntity extends BaseEntity {
|
|
/** 分镜名称 */
|
|
name: string;
|
|
/**分镜草图Url */
|
|
sketchUrl: string;
|
|
/**分镜视频Url */
|
|
videoUrl: string;
|
|
/**分镜状态 */
|
|
status: ShotStatus;
|
|
/**角色ID列表 */
|
|
roleList: string[];
|
|
/**场景ID列表 */
|
|
sceneList: string[];
|
|
/**对话内容 */
|
|
content: ContentItem[];
|
|
/**镜头项 */
|
|
shot: string[];
|
|
/**分镜剧本 */
|
|
scriptId: string;
|
|
}
|
|
|
|
/**不同类型 将有不同元数据 */
|
|
export enum ScriptSliceType {
|
|
/** 文本 */
|
|
text = 'text',
|
|
/** 高亮 */
|
|
highlight = 'highlight',
|
|
/**角色 */
|
|
role = 'role',
|
|
/** 场景 */
|
|
scene = 'scene',
|
|
|
|
}
|
|
/**
|
|
* 剧本片段实体接口
|
|
*/
|
|
export interface ScriptSliceEntity extends BaseEntity {
|
|
/** 类型 */
|
|
type: ScriptSliceType;
|
|
/** 剧本内容 */
|
|
text: string;
|
|
/** 元数据 */
|
|
metaData: any;
|
|
}
|