Files
gitlab-instance-0a899031_do…/dto/order.dto.ts
2026-04-02 07:15:42 -05:00

16 lines
401 B
TypeScript

import { z } from "zod";
export const orderPlanSchema = z.enum(["free", "pro", "ultra"]);
export const orderStatusSchema = z.enum(["pending", "success", "failed"]);
export const orderSchema = z.object({
id: z.string(),
plan: orderPlanSchema,
slug: z.string(),
amount: z.number(),
status: orderStatusSchema,
createdAt: z.string(),
});
export type OrderDto = z.infer<typeof orderSchema>;