mirror of
https://github.com/massbug/judge4c.git
synced 2025-05-18 07:16:34 +00:00
feat(admin/problemset): add schema definition for new problem
This commit is contained in:
parent
1875e98106
commit
74e85edd33
@ -0,0 +1,11 @@
|
|||||||
|
import { z } from "zod";
|
||||||
|
import { ProblemSchema } from "@/generated/zod";
|
||||||
|
|
||||||
|
export const problemSchema = ProblemSchema.extend({
|
||||||
|
displayId: z.coerce.number().int().positive().min(1),
|
||||||
|
title: z.string().min(1),
|
||||||
|
description: z.string().min(1),
|
||||||
|
solution: z.string().min(1),
|
||||||
|
});
|
||||||
|
|
||||||
|
export type ProblemSchema = z.infer<typeof problemSchema>;
|
Loading…
Reference in New Issue
Block a user