Pull Request branch dev-clone to main #1
|
|
@ -17,19 +17,19 @@ import { options } from "../../drizzle/schema/options";
|
|||
// Schema for creating and updating options
|
||||
export const optionFormSchema = z.object({
|
||||
text: z.string().min(1).max(255),
|
||||
score: z.number().min(0),
|
||||
score: z.number().min(0).max(999),
|
||||
});
|
||||
|
||||
// Schema for creating and updating questions
|
||||
export const questionFormSchema = z.object({
|
||||
subAspectId: z.string().min(1).max(255),
|
||||
question: z.string().min(1).max(255),
|
||||
question: z.string().min(1).max(510),
|
||||
needFile: z.boolean().default(false),
|
||||
options: z.array(optionFormSchema).optional(), // Allow options to be included
|
||||
});
|
||||
|
||||
export const questionUpdateSchema = questionFormSchema.extend({
|
||||
question: z.string().min(1).max(255).or(z.literal("")),
|
||||
question: z.string().min(1).max(510).or(z.literal("")),
|
||||
subAspectId: z.string().min(1).max(255).or(z.literal("")),
|
||||
needFile: z.boolean().default(false).or(z.boolean()),
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user