Files
petitspas/backend/src/routes/parents/dto/pending-family.dto.ts
T

64 lines
1.7 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
export class ParentPendingSummaryDto {
@ApiProperty({ description: 'UUID utilisateur' })
id: string;
@ApiProperty()
email: string;
@ApiPropertyOptional({ nullable: true })
telephone?: string | null;
@ApiPropertyOptional({ nullable: true })
code_postal?: string | null;
@ApiPropertyOptional({ nullable: true })
ville?: string | null;
}
export class PendingFamilyDto {
@ApiProperty({ example: 'Famille Dupont', description: 'Libellé affiché pour la famille' })
libelle: string;
@ApiProperty({
type: [String],
example: ['uuid-parent-1', 'uuid-parent-2'],
description: 'IDs utilisateur des parents de la famille',
})
parentIds: string[];
@ApiProperty({
nullable: true,
example: '2026-000001',
description: 'Numéro de dossier famille (format AAAA-NNNNNN)',
})
numero_dossier: string | null;
@ApiProperty({
nullable: true,
example: '2026-01-12T10:00:00.000Z',
description: 'Date de référence dossier soumis / en attente : MIN(cree_le) des parents en_attente du groupe (ISO 8601)',
})
date_soumission: string | null;
@ApiProperty({
example: 3,
description: 'Nombre denfants distincts liés aux parents de la famille (enfants_parents)',
})
nombre_enfants: number;
@ApiPropertyOptional({
type: [String],
example: ['parent1@example.com', 'parent2@example.com'],
description: 'Emails des parents du groupe (ordre stable : nom, prénom)',
})
emails?: string[];
@ApiPropertyOptional({
type: [ParentPendingSummaryDto],
description: 'Résumé des parents (ordre stable, aligné sur parentIds/emails)',
})
parents?: ParentPendingSummaryDto[];
}