feat(frontend): bind sessions to chart profiles

This commit is contained in:
Jesse_Chen
2026-08-30 15:55:45 +08:00
parent 5c1d095f69
commit f5e6d51646
6 changed files with 120 additions and 5 deletions
@@ -34,6 +34,9 @@ const chatSessionWriteObjectSchema = z.object({
messages: z.array(chatMessageSchema).max(CHAT_SESSION_MAX_MESSAGES),
session_type: z.enum(["consultation", "birth_time_rectification"]),
rectification_case_id: z.string().uuid().nullable(),
chart_profile_id: z.string().trim().max(100).nullable().optional(),
chart_profile_name: z.string().trim().max(80).nullable().optional(),
chart_profile_role: z.enum(["self", "other"]).nullable().optional(),
updated_at: z.string().datetime(),
}).strict();
@@ -101,6 +104,9 @@ export type ChatSessionWrite = Readonly<{
}>[];
session_type: "consultation" | "birth_time_rectification";
rectification_case_id: string | null;
chart_profile_id?: string | null;
chart_profile_name?: string | null;
chart_profile_role?: "self" | "other" | null;
updated_at: string;
}>;