Files
cfw-autumn/shared/models/cusModels/cusPriceModels/cusPriceModels.ts
2025-01-22 18:00:57 +00:00

19 lines
527 B
TypeScript

import { z } from "zod";
import { PriceSchema } from "../../productModels/priceModels.js";
export const CustomerPriceSchema = z.object({
id: z.string(),
internal_customer_id: z.string(),
customer_product_id: z.string(),
created_at: z.number(),
price_id: z.string().nullable(),
});
export const FullCustomerPriceSchema = CustomerPriceSchema.extend({
price: PriceSchema,
});
export type CustomerPrice = z.infer<typeof CustomerPriceSchema>;
export type FullCustomerPrice = z.infer<typeof FullCustomerPriceSchema>;