19 lines
566 B
TypeScript
19 lines
566 B
TypeScript
|
|
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>;
|