Files
petitspas/backend/src/routes/parents/dto/pending-family.dto.ts
T
jmartinandCursor 2ce9e9215f fix(#153): libellé pending-families en NOM Prénom.
Inclut le prénom dans string_agg et expose nom/prenom dans parents[].

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-24 18:41:25 +02:00

73 lines
1.9 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 })
nom?: string | null;
@ApiPropertyOptional({ nullable: true })
prenom?: string | null;
@ApiPropertyOptional({ nullable: true })
telephone?: string | null;
@ApiPropertyOptional({ nullable: true })
code_postal?: string | null;
@ApiPropertyOptional({ nullable: true })
ville?: string | null;
}
export class PendingFamilyDto {
@ApiProperty({
example: 'MARTIN Claire - MARTIN Thomas',
description: 'Libellé affiché : NOM Prénom (séparés par « - » si co-parent)',
})
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[];
}