/** * 实体接口定义 * 所有实体都应该实现这些基础接口 */ import { ContentItem, LensType } from "./valueObject"; /** * 基础实体接口 */ 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; } /**视频片段进度 */ export enum VideoSegmentStatus { /** 草稿加载中 */ sketchLoading = 0, /** 视频加载中 */ videoLoading = 1, /** 完成 */ finished = 2, } /** * 视频片段实体接口 */ export interface VideoSegmentEntity extends BaseEntity { /** 视频片段名称 */ name: string; /**视频片段草图Url */ sketchUrl: string; /**视频片段视频Url */ videoUrl: string[]; /**视频片段状态 */ status: VideoSegmentStatus; /**角色ID列表 */ roleList: string[]; /**场景ID列表 */ sceneList: string[]; /**对话内容 */ content: ContentItem[]; /**镜头项 */ lens: LensType[]; /**视频片段剧本Id */ scriptId: string; }