15 lines
537 B
TypeScript
15 lines
537 B
TypeScript
import { z } from "zod";
|
|
|
|
export const createExerciseSchema = z.object({
|
|
name: z.string().min(2).max(50),
|
|
description: z.string().max(300).optional(),
|
|
difficulty: z.enum(["BEGINNER", "INTERMEDIATE", "ADVANCED"]).default("BEGINNER"),
|
|
muscleGroups: z.array(z.string()).min(1),
|
|
modelPath: z.string().optional(),
|
|
});
|
|
|
|
export const updateExerciseSchema = createExerciseSchema.partial();
|
|
|
|
export type CreateExerciseInput = z.infer<typeof createExerciseSchema>;
|
|
export type UpdateExerciseInput = z.infer<typeof updateExerciseSchema>;
|