Last active
November 16, 2024 20:33
-
-
Save codigoconjuan/fa3b9f17202ea45dfb9994251d6a51b5 to your computer and use it in GitHub Desktop.
Schema de Ventas
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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