62 lines
1.5 KiB
TypeScript
62 lines
1.5 KiB
TypeScript
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
||
|
||
/** Identité minimale enfant pour le bandeau couple — ticket #168 */
|
||
export class CoupleGardeEnfantDto {
|
||
@ApiProperty({ format: 'uuid' })
|
||
id: string;
|
||
|
||
@ApiPropertyOptional()
|
||
prenom?: string | null;
|
||
|
||
@ApiPropertyOptional()
|
||
nom?: string | null;
|
||
|
||
@ApiPropertyOptional()
|
||
photo_url?: string | null;
|
||
}
|
||
|
||
/** Identité minimale AM pour le bandeau couple — ticket #168 */
|
||
export class CoupleGardeAmDto {
|
||
@ApiProperty({ format: 'uuid', description: 'UUID utilisateur de l’AM' })
|
||
id: string;
|
||
|
||
@ApiPropertyOptional()
|
||
prenom?: string | null;
|
||
|
||
@ApiPropertyOptional()
|
||
nom?: string | null;
|
||
|
||
@ApiPropertyOptional()
|
||
photo_url?: string | null;
|
||
}
|
||
|
||
/** Un couple de garde = placement actif enfant ↔ AM */
|
||
export class CoupleGardeDto {
|
||
@ApiProperty({
|
||
format: 'uuid',
|
||
description: 'Id du placement (enfants_assistantes_maternelles.id)',
|
||
})
|
||
id: string;
|
||
|
||
@ApiProperty({ type: CoupleGardeEnfantDto })
|
||
enfant: CoupleGardeEnfantDto;
|
||
|
||
@ApiProperty({ type: CoupleGardeAmDto })
|
||
am: CoupleGardeAmDto;
|
||
|
||
@ApiProperty({ description: 'True si c’est le couple actuellement sélectionné' })
|
||
courant: boolean;
|
||
}
|
||
|
||
export class CouplesGardeResponseDto {
|
||
@ApiProperty({ type: [CoupleGardeDto] })
|
||
couples: CoupleGardeDto[];
|
||
|
||
@ApiPropertyOptional({
|
||
format: 'uuid',
|
||
nullable: true,
|
||
description: 'Id du couple courant (null si aucun / premier couple implicite côté client)',
|
||
})
|
||
couple_courant_id: string | null;
|
||
}
|