Skip to content

Instantly share code, notes, and snippets.

@codigoconjuan
Last active November 16, 2024 20:33
Show Gist options
  • Save codigoconjuan/fa3b9f17202ea45dfb9994251d6a51b5 to your computer and use it in GitHub Desktop.
Save codigoconjuan/fa3b9f17202ea45dfb9994251d6a51b5 to your computer and use it in GitHub Desktop.
Schema de Ventas
export const ContentsSchema = z.object({
id: z.number(),
quantity: z.number(),
price: z.string(),
product: ProductSchema
})
export const TransactionResponseSchema = z.object({
id: z.number(),
total: z.string(),
transactionDate: z.string(),
discount: z.string(),
coupon: z.string().nullable(),
contents: z.array(ContentsSchema)
})
export const TransactionsResponseSchema = z.array(TransactionResponseSchema)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment