|
|
@@ -65,9 +65,9 @@ export const UserSchema = z.object({
|
|
|
],
|
|
|
description: '用户角色列表'
|
|
|
}),
|
|
|
- userType: z.enum([UserType.TEACHER, UserType.STUDENT]).default(UserType.STUDENT).openapi({
|
|
|
+ userType: z.enum([UserType.TEACHER, UserType.STUDENT, UserType.TRAINEE]).default(UserType.STUDENT).openapi({
|
|
|
example: UserType.STUDENT,
|
|
|
- description: '用户类型(teacher:老师,student:学生)'
|
|
|
+ description: '用户类型(teacher:老师,student:学生,trainee:学员)'
|
|
|
}),
|
|
|
wechatOpenid: z.string().max(255, '微信openid最多255个字符').nullable().openapi({
|
|
|
example: 'o6_bmjrPTlm6_2sgVt7hMZOPfL2M',
|
|
|
@@ -135,9 +135,9 @@ export const CreateUserDto = z.object({
|
|
|
example: 1,
|
|
|
description: '头像文件ID'
|
|
|
}),
|
|
|
- userType: z.enum([UserType.TEACHER, UserType.STUDENT]).default(UserType.STUDENT).openapi({
|
|
|
+ userType: z.enum([UserType.TEACHER, UserType.STUDENT, UserType.TRAINEE]).default(UserType.STUDENT).openapi({
|
|
|
example: UserType.STUDENT,
|
|
|
- description: '用户类型(teacher:老师,student:学生)'
|
|
|
+ description: '用户类型(teacher:老师,student:学生,trainee:学员)'
|
|
|
}),
|
|
|
isDisabled: z.number().int().min(0, '状态值只能是0或1').max(1, '状态值只能是0或1').default(DisabledStatus.ENABLED).optional().openapi({
|
|
|
example: DisabledStatus.ENABLED,
|
|
|
@@ -179,8 +179,8 @@ export const UpdateUserDto = z.object({
|
|
|
example: DisabledStatus.ENABLED,
|
|
|
description: '是否禁用(0:启用,1:禁用)'
|
|
|
}),
|
|
|
- userType: z.enum([UserType.TEACHER, UserType.STUDENT]).optional().openapi({
|
|
|
+ userType: z.enum([UserType.TEACHER, UserType.STUDENT, UserType.TRAINEE]).optional().openapi({
|
|
|
example: UserType.STUDENT,
|
|
|
- description: '用户类型(teacher:老师,student:学生)'
|
|
|
+ description: '用户类型(teacher:老师,student:学生,trainee:学员)'
|
|
|
})
|
|
|
});
|