新增 3 个业务域(10 RPC): - ElectiveService: 选修课列表/学生选课记录/选课/退课(含容量与重复校验) - LessonPlanService: 教师备课列表/学生备课列表(仅 published)/详情 - CoursePlanService: 学生课程计划列表/详情 - KnowledgeGraphService.GetKnowledgePath: 与 GetLearningPath 同实现 新增 4 张 MySQL 表(elective_courses/selections/lesson_plans/course_plans),含完整索引。 新增 11 个权限点,覆盖 admin/teacher/student/parent 四角色。 proto 由 4 Service/22 RPC 扩展至 7 Service/32 RPC,v1 全部 RPC 保持向后兼容。 修复 logger.ts pino 导入: default import 在 NodeNext ESM 下不可调用, 改用 named import(与 iam/msg/core-edu 对齐)。 Docker 本地测试全部通过(HTTP + gRPC 双协议),健康检查、 Elective/LessonPlan/CoursePlan CRUD、4 个新 gRPC Service 全部验证通过。 nextstep-v2.md 已创建,记录上下游依赖与 6 项联调待办。
20 lines
387 B
TypeScript
20 lines
387 B
TypeScript
import { pino } from "pino";
|
|
import { env } from "../../config/env.js";
|
|
|
|
export const logger = pino({
|
|
level: env.LOG_LEVEL,
|
|
base: {
|
|
service: "content",
|
|
version: "0.1.0",
|
|
},
|
|
transport:
|
|
env.NODE_ENV === "development"
|
|
? {
|
|
target: "pino-pretty",
|
|
options: { colorize: true },
|
|
}
|
|
: undefined,
|
|
});
|
|
|
|
export type Logger = typeof logger;
|