# Client: scene → location 术语修正 **日期**: 2026-01-30 ## 背景 业务术语澄清: - **scene(场次)**:剧本中的连续动作段落 - **location(场地)**:拍摄地点/布景,即项目素材中的「场景」类型 原代码将「场景」素材使用 `scene` 命名,与「场次」概念混淆。现统一改为 `location`(场地)。 ## 变更范围 ### 常量与类型 - `RESOURCE_TYPES.SCENE` → `RESOURCE_TYPES.LOCATION`(值 `'scene'` → `'location'`) - `ResourceType` 中 `'scene'` → `'location'` - `SceneProfile` → `LocationProfile`(`type: 'location'`) - `StoryboardResources.scenes` → `StoryboardResources.locations` - `DraftShot.scenes` → `DraftShot.locations`(关联场地名称数组) - `SceneData` → `LocationData`(PreviewInfoPanel) - `SceneItem.sceneList` → `SceneItem.locationList`(ParseResult) ### UI 文案(中文显示名保持「场景」) - 技术字段使用 `location`,中文展示仍为「场景」 - 资源类别、面板、提示语、快捷符号说明等界面文案:使用「场景」 ### 组件与引用 - 所有 `RESOURCE_TYPES.SCENE` 引用改为 `RESOURCE_TYPES.LOCATION` - 所有 `type: 'scene'` 改为 `type: 'location'` - `ResourcePanelTab`、`ResourceSelector` 等类型联合中的 `'scene'` → `'location'` ### Mock 与测试 - `mocks/storyboards.ts`: `resources.scenes` → `resources.locations` - `mocks/project-resources.ts`: `type: 'scene'` → `type: 'location'` - `mocks/profiles.ts`: `mockSceneProfile` → `mockLocationProfile` - `mocks/screenplay-tags.ts`: `elementType: 'scene'` → `elementType: 'location'` - `mocks/timeline.ts`: `resources.scenes` → `resources.locations` - `test-timeline-status.ts`: 同步更新 ## 不受影响 - **DraftShot**:分镜草稿项(原 DraftScene 已重命名) - **ScreenplayParseDialog**:`shots` 状态、`ShotItem`、`ShotCard` 等(分镜列表相关) - **微信 OAuth `scene_id`**:保留(微信 API 术语) ### 第二轮:移除剩余 scene 命名(仅保留 location 概念) - `DraftScene` → `DraftShot`(分镜草稿项) - `SceneItem` → `ShotItem`(ParseResult 项) - `ParseResult.scenes` → `ParseResult.shots` - `SceneCard` → `ShotCard`,`SortableSceneItem` → `SortableShotItem` - `mockSceneTags` → `mockLocationVariantTags`(场景变体标签) - `cat_scene_*`、`tag_scene_*` → `cat_loc_*`、`tag_loc_*` - `mockScreenplayScenes` → `mockScreenplayLocations`,`scene_id` → `location_id` - `getSceneById` → `getLocationById`,`getScenesByScreenplay` → `getLocationsByScreenplay` - `ScreenplaySceneVariant` → `ScreenplayLocationVariant`,`sceneId` → `locationId` ## 后续 - 后端 API 如仍返回 `scenes` 字段,需在服务端同步改为 `locations` 或在前端增加兼容映射 - 数据库 `project_resources.type`、`storyboard_resources` 中资源类型枚举需评估是否迁移