import { ApiProperty } from '@nestjs/swagger';
import { StatutUtilisateurType } from 'src/entities/users.entity';

/** Utilisateur AM sans données sensibles (pour dossier AM complet). Ticket #119 */
export class DossierAmUserDto {
  @ApiProperty()
  id: string;
  @ApiProperty()
  email: string;
  @ApiProperty({ required: false })
  prenom?: string;
  @ApiProperty({ required: false })
  nom?: string;
  @ApiProperty({ required: false })
  telephone?: string;
  @ApiProperty({ required: false })
  adresse?: string;
  @ApiProperty({ required: false })
  ville?: string;
  @ApiProperty({ required: false })
  code_postal?: string;
  @ApiProperty({ required: false })
  profession?: string;
  @ApiProperty({ required: false })
  date_naissance?: Date;
  @ApiProperty({ required: false, description: 'Ville de naissance' })
  lieu_naissance_ville?: string;
  @ApiProperty({ required: false, description: 'Pays de naissance' })
  lieu_naissance_pays?: string;
  @ApiProperty({ required: false })
  photo_url?: string;
  @ApiProperty({ required: false, description: 'Consentement utilisation photo' })
  consentement_photo?: boolean;
  @ApiProperty({ enum: StatutUtilisateurType })
  statut: StatutUtilisateurType;
}

/** Dossier AM complet (fiche AM sans secrets). Ticket #119 */
export class DossierAmCompletDto {
  @ApiProperty({ example: '2026-000003', description: 'Numéro de dossier AM' })
  numero_dossier: string;
  @ApiProperty({ type: DossierAmUserDto, description: 'Utilisateur (sans mot de passe ni tokens)' })
  user: DossierAmUserDto;
  @ApiProperty({ required: false })
  numero_agrement?: string;
  @ApiProperty({ required: false })
  nir?: string;
  @ApiProperty({ required: false })
  biographie?: string;
  @ApiProperty({ required: false })
  disponible?: boolean;
  @ApiProperty({ required: false })
  ville_residence?: string;
  @ApiProperty({ required: false })
  date_agrement?: Date;
  @ApiProperty({ required: false })
  annees_experience?: number;
  @ApiProperty({ required: false })
  specialite?: string;
  @ApiProperty({ required: false })
  nb_max_enfants?: number;
  @ApiProperty({ required: false })
  place_disponible?: number;
}
