2023-03-28 09:33:17 +03:00

21 lines
451 B
TypeScript

import { z } from 'zod';
export const KeysSchema = z.enum(['osago', 'kasko', 'fingap']);
export const RowSchema = z.object({
insCost: z.number(),
insTerm: z.number().nullable(),
insuranceCompany: z.string().nullable(),
insured: z.number().nullable(),
key: KeysSchema,
policyType: z.string(),
});
export const InsuranceSchema = z.object({
values: z.object({
fingap: RowSchema,
kasko: RowSchema,
osago: RowSchema,
}),
});