15 lines
381 B
TypeScript
15 lines
381 B
TypeScript
import { z } from "zod";
|
|
|
|
export const productModel = z.object({
|
|
id: z.string(),
|
|
linkId: z.string(),
|
|
title: z.string(),
|
|
description: z.string(),
|
|
longDescription: z.string(),
|
|
price: z.number(),
|
|
discountPrice: z.number(),
|
|
createdAt: z.coerce.string().optional(),
|
|
updatedAt: z.coerce.string().optional(),
|
|
});
|
|
export type ProductModel = z.infer<typeof productModel>;
|