This commit is contained in:
2025-12-10 14:48:42 -03:00
parent 64ca0c7e81
commit 12f558233b
3 changed files with 76 additions and 55 deletions

View File

@@ -0,0 +1,34 @@
import { z } from 'zod'
export const enrollment = z.object({
user: z
.object({
id: z.string(),
name: z.string(),
email: z.string(),
cpf: z.string()
})
.required(),
course: z
.object({
id: z.string(),
name: z.string(),
access_period: z.number(),
unit_price: z.number()
})
.required(),
deduplication_window: z
.object({
offset_days: z.number()
})
.optional(),
scheduled_for: z.date().optional()
})
export const formSchema = z.object({
enrollments: z.array(enrollment).min(1).max(100)
})
export type Schema = z.infer<typeof formSchema>
export const MAX_ITEMS = 100