29 lines
1.0 KiB
TypeScript
29 lines
1.0 KiB
TypeScript
import { z } from "zod";
|
|
|
|
export const CreateManagementLevelGroupSchema = z.object({
|
|
name: z.string().min(1).max(100),
|
|
targetPercentage: z.number().min(0).max(1),
|
|
sortOrder: z.number().int().default(0),
|
|
});
|
|
|
|
export const UpdateManagementLevelGroupSchema = z.object({
|
|
name: z.string().min(1).max(100).optional(),
|
|
targetPercentage: z.number().min(0).max(1).optional(),
|
|
sortOrder: z.number().int().optional(),
|
|
});
|
|
|
|
export const CreateManagementLevelSchema = z.object({
|
|
name: z.string().min(1).max(100),
|
|
groupId: z.string(),
|
|
});
|
|
|
|
export const UpdateManagementLevelSchema = z.object({
|
|
name: z.string().min(1).max(100).optional(),
|
|
groupId: z.string().optional(),
|
|
});
|
|
|
|
export type CreateManagementLevelGroupInput = z.infer<typeof CreateManagementLevelGroupSchema>;
|
|
export type UpdateManagementLevelGroupInput = z.infer<typeof UpdateManagementLevelGroupSchema>;
|
|
export type CreateManagementLevelInput = z.infer<typeof CreateManagementLevelSchema>;
|
|
export type UpdateManagementLevelInput = z.infer<typeof UpdateManagementLevelSchema>;
|