Public Access
19 lines
494 B
TypeScript
19 lines
494 B
TypeScript
import { z } from 'zod'
|
|
|
|
export const submitResultSchema = z.object({
|
|
exam_id: z.number().nullable().optional(),
|
|
title: z.string().min(1),
|
|
score_points: z.number(),
|
|
total_points: z.number(),
|
|
correct_count: z.number(),
|
|
graded_count: z.number(),
|
|
passing_score: z.number().optional(),
|
|
elapsed_ms: z.number(),
|
|
state: z.record(z.unknown()),
|
|
exam: z.record(z.unknown()),
|
|
})
|
|
|
|
export const resultIdParamSchema = z.object({
|
|
id: z.string().regex(/^\d+$/, 'ID must be a number'),
|
|
})
|