|
|
@@ -6,6 +6,7 @@ import { ErrorSchema } from '@/server/utils/errorHandler';
|
|
|
import { AppDataSource } from '@/server/data-source';
|
|
|
import { AuthContext } from '@/server/types/context';
|
|
|
import { UserSchema } from '@/server/modules/users/user.entity';
|
|
|
+import { DataScopeType } from '@/server/modules/departments/department.entity';
|
|
|
|
|
|
const userService = new UserService(AppDataSource);
|
|
|
|
|
|
@@ -28,7 +29,7 @@ const UpdateUserSchema = z.object({
|
|
|
isDisabled: UserSchema.shape.isDisabled.optional(),
|
|
|
isDeleted: UserSchema.shape.isDeleted.optional(),
|
|
|
defaultDepartmentId: z.number().int().positive().nullable().optional(),
|
|
|
- dataScopeType: z.enum(['PERSONAL', 'DEPARTMENT', 'SUB_DEPARTMENT', 'COMPANY', 'CUSTOM']).optional(),
|
|
|
+ dataScopeType: z.nativeEnum(DataScopeType).optional(),
|
|
|
roleIds: z.array(z.number().int().positive()).optional().openapi({
|
|
|
description: '角色ID列表',
|
|
|
example: [1, 2]
|