FactuGES_ERP/modules/companies/src/common/dto/response/company.response.dto.ts

19 lines
566 B
TypeScript
Raw Normal View History

2026-07-06 10:57:33 +00:00
import { EmailSchema, TinSchema, WebsiteSchema } from "@erp/core";
import { z } from "zod/v4";
export const CompanyStatusResponseSchema = z.enum(["active", "disabled"]);
export const CompanyResponseSchema = z.object({
id: z.uuid(),
legal_name: z.string(),
trade_name: z.string().nullable(),
tin: TinSchema.nullable(),
slug: z.string(),
email: EmailSchema.nullable(),
phone: z.string().nullable(),
website: WebsiteSchema.nullable(),
status: CompanyStatusResponseSchema,
});
export type CompanyResponseDTO = z.infer<typeof CompanyResponseSchema>;