Uecko_ERP/modules/customers/src/common/dto/response/create-customer.result.dto.ts

37 lines
791 B
TypeScript

import { MetadataSchema } from "@erp/core";
import { z } from "zod/v4";
export const CreateCustomerResponseSchema = z.object({
id: z.uuid(),
company_id: z.uuid(),
reference: z.string(),
is_company: z.string(),
name: z.string(),
trade_name: z.string(),
tin: z.string(),
street: z.string(),
street2: z.string(),
city: z.string(),
province: z.string(),
postal_code: z.string(),
country: z.string(),
email: z.string(),
phone: z.string(),
fax: z.string(),
website: z.string(),
legal_record: z.string(),
default_taxes: z.array(z.string()),
status: z.string(),
language_code: z.string(),
currency_code: z.string(),
metadata: MetadataSchema.optional(),
});
export type CustomerCreationResponseDTO = z.infer<typeof CreateCustomerResponseSchema>;