Inclut le prénom dans string_agg et expose nom/prenom dans parents[]. Co-authored-by: Cursor <cursoragent@cursor.com>
73 lines
1.9 KiB
TypeScript
73 lines
1.9 KiB
TypeScript
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 d’enfants 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[];
|
||
}
|