refactor(dto): move app models into dto layer
This commit is contained in:
@@ -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";
|
||||
|
||||
@@ -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>;
|
||||
Reference in New Issue
Block a user