metis-desk/modules/companies/src/api/domain/work-profile-values.ts

19 lines
468 B
TypeScript
Raw Normal View History

2026-10-05 07:53:29 +00:00
import { z } from "zod/v4";
export const WorkProfileInputSchema = z.strictObject({
name: z.string().trim().min(1).max(100),
personId: z.uuid(),
assetId: z.uuid(),
accountId: z.uuid().nullable(),
active: z.boolean(),
notes: z.string().trim().max(4000).nullable(),
});
2026-10-10 10:01:58 +00:00
2026-10-05 07:53:29 +00:00
export type WorkProfileInput = z.infer<typeof WorkProfileInputSchema>;
2026-10-10 10:01:58 +00:00
2026-10-05 07:53:29 +00:00
export class WorkProfileError extends Error {
constructor(public readonly code: string) {
super(code);
}
}