import { CategoryId } from './category'; /** * 题型与模板引擎相关模型:对齐技术架构 §5.4 与云开发 worksheets 集合 §3.3 */ /** 难度等级文案键(用于前端展示与映射) */ export type Difficulty = 'beginner' | 'basic' | 'intermediate' | 'advanced'; /** 与架构文档 WorksheetConfig 一致,供云端下发 / 本地内置 */ export interface WorksheetConfig { id: string; title: string; subtitle: string; category: CategoryId; subcategory?: string; ageMin: number; ageMax: number; difficulty: 1 | 2 | 3 | 4; previewImg: string; tags: string[]; isNew: boolean; isHot: boolean; sortOrder?: number; status: 'active' | 'draft' | 'hidden'; downloads: number; likes: number; } /** 云集合 `worksheets` 文档(§3.3,含数据库字段) */ export interface WorksheetRecord extends WorksheetConfig { _id: string; createdAt: Date; updatedAt: Date; contentUpdatedAt?: Date; }