refactor(dto): move app models into dto layer

This commit is contained in:
2026-06-17 17:34:55 +08:00
parent f0b5275c55
commit 5d66cef85c
24 changed files with 30 additions and 41 deletions
+1
View File
@@ -10,3 +10,4 @@ export * from "./recent_memory";
export * from "./update_profile_request";
export * from "./user";
export * from "./user_stats_response";
export * from "./user_view";
+23
View File
@@ -0,0 +1,23 @@
/**
* UI 侧用户模型(基于 data/dto/user/user + user_storage 重新导出 view-model
*
* 原始 Dart: lib/data/models/user/user.dart
*/
import { z } from "zod";
export const UserViewSchema = z.object({
id: z.string(),
username: z.string(),
email: z.string(),
avatarUrl: z.string(),
intimacy: z.number(),
dolBalance: z.number(),
relationshipStage: z.string(),
currentMood: z.string(),
isGuest: z.boolean(),
isVip: z.boolean(),
voiceMinutesRemaining: z.number(),
stripeCustomerId: z.string().nullable(),
});
export type UserView = z.infer<typeof UserViewSchema>;