17 lines
515 B
TypeScript
17 lines
515 B
TypeScript
import { z } from "zod";
|
|
|
|
export const LoginDto = z.object({
|
|
username: z.string().min(1, "用户名不能为空"),
|
|
password: z.string().min(1, "密码不能为空"),
|
|
});
|
|
|
|
export const ChangePasswordDto = z.object({
|
|
currentPassword: z.string().min(1, "当前密码不能为空"),
|
|
newPassword: z.string().min(6, "新密码长度至少为6位"),
|
|
});
|
|
|
|
export const UpdateProfileDto = z.object({
|
|
name: z.string().min(1, "姓名不能为空"),
|
|
email: z.string().email("邮箱格式不正确").optional(),
|
|
});
|