mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-04 18:04:18 +00:00
28 lines
1.3 KiB
TypeScript
28 lines
1.3 KiB
TypeScript
import { createZodDto } from 'nestjs-zod';
|
|
import {
|
|
assignmentCreateRequestSchema,
|
|
assignmentReorderRequestSchema,
|
|
assignmentMoveRequestSchema,
|
|
assignmentTimeRequestSchema,
|
|
assignmentEndDayRequestSchema,
|
|
assignmentNotesRequestSchema,
|
|
assignmentTransportRequestSchema,
|
|
assignmentParticipantsRequestSchema,
|
|
} from '@trek/shared';
|
|
|
|
/**
|
|
* Server-side createZodDto wrappers over the @trek/shared assignment
|
|
* contracts. The global ZodValidationPipe (APP_PIPE in app.module.ts)
|
|
* validates any @Body() parameter typed with one of these classes by
|
|
* metatype — the Zod schemas in shared/ remain the single source of truth for
|
|
* the wire contract.
|
|
*/
|
|
export class AssignmentCreateDto extends createZodDto(assignmentCreateRequestSchema) {}
|
|
export class AssignmentReorderDto extends createZodDto(assignmentReorderRequestSchema) {}
|
|
export class AssignmentMoveDto extends createZodDto(assignmentMoveRequestSchema) {}
|
|
export class AssignmentTimeDto extends createZodDto(assignmentTimeRequestSchema) {}
|
|
export class AssignmentEndDayDto extends createZodDto(assignmentEndDayRequestSchema) {}
|
|
export class AssignmentNotesDto extends createZodDto(assignmentNotesRequestSchema) {}
|
|
export class AssignmentTransportDto extends createZodDto(assignmentTransportRequestSchema) {}
|
|
export class AssignmentParticipantsDto extends createZodDto(assignmentParticipantsRequestSchema) {}
|