nomadro/apps/nomadvip/lib/content/config.ts
eric 56b29205e7 Integrate four verticals into nomadro portal with shared packages and API gateway.
Mount /vip with nomadvip+payjsapi, add @nomadro/pay|pb|sdk, apps/api, /admin shell, and backup/rollback scripts under git.nomadro.cn workflow.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-28 20:16:44 -05:00

32 lines
831 B
TypeScript

/**
* 共享内容模块配置 - 可标准应用到 digital / nomadvip / nomadlms
*/
export type EbookConfig = {
title: string;
backHref: string;
/** 是否需权限,免费则 false */
requireAuth?: boolean;
/** 预计阅读分钟数,用于倒计时/展示 */
estimatedMinutes?: number;
/** 存储 key 前缀,区分项目 */
storagePrefix?: string;
};
export type CourseConfig = {
courseId: string;
courseHomeHref: string;
payHref: string;
/** 试看:[[moduleIndex, lessonIndex], ...] 或 (m,l)=>boolean */
freeTrial?: [number, number][] | ((m: number, l: number) => boolean);
/** 视频进度存储前缀 */
videoStoragePrefix?: string;
/** 学习进度存储前缀 */
learningStoragePrefix?: string;
};
export type ContentConfig = {
ebook: EbookConfig;
course: CourseConfig;
};