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

37 lines
791 B
TypeScript
Raw Normal View History

2025-08-11 17:49:52 +00:00
import { MetadataSchema } from "@erp/core";
2025-09-24 17:30:35 +00:00
import { z } from "zod/v4";
2025-08-11 17:49:52 +00:00
2025-09-01 14:07:59 +00:00
export const CreateCustomerResponseSchema = z.object({
2025-08-11 17:49:52 +00:00
id: z.uuid(),
2025-08-26 18:55:59 +00:00
company_id: z.uuid(),
2025-08-21 08:14:12 +00:00
reference: z.string(),
2025-09-01 14:07:59 +00:00
is_company: z.string(),
2025-08-21 08:14:12 +00:00
name: z.string(),
trade_name: z.string(),
tin: z.string(),
street: z.string(),
2025-08-26 18:55:59 +00:00
street2: z.string(),
2025-08-21 08:14:12 +00:00
city: z.string(),
2025-09-02 10:55:45 +00:00
province: z.string(),
2025-08-21 08:14:12 +00:00
postal_code: z.string(),
country: z.string(),
email: z.string(),
phone: z.string(),
fax: z.string(),
website: z.string(),
legal_record: z.string(),
2025-09-21 19:46:51 +00:00
default_taxes: z.array(z.string()),
2025-08-21 08:14:12 +00:00
status: z.string(),
2025-09-01 14:07:59 +00:00
language_code: z.string(),
2025-08-21 08:14:12 +00:00
currency_code: z.string(),
2025-08-11 17:49:52 +00:00
metadata: MetadataSchema.optional(),
});
2025-09-01 14:07:59 +00:00
export type CustomerCreationResponseDTO = z.infer<typeof CreateCustomerResponseSchema>;