16 lines
401 B
TypeScript
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>;
|