// ============================================================================
// Contractor request / response types
// Generated from:
//   honeyDueAPI-go/internal/dto/requests/contractor.go
//   honeyDueAPI-go/internal/dto/responses/contractor.go
// ============================================================================

// ---------------------------------------------------------------------------
// Requests
// ---------------------------------------------------------------------------

export interface CreateContractorRequest {
  residence_id?: number | null;
  name: string;
  company?: string;
  phone?: string;
  email?: string;
  website?: string;
  notes?: string;
  street_address?: string;
  city?: string;
  state_province?: string;
  postal_code?: string;
  specialty_ids?: number[];
  rating?: number | null;
  is_favorite?: boolean | null;
}

export interface UpdateContractorRequest {
  name?: string | null;
  company?: string | null;
  phone?: string | null;
  email?: string | null;
  website?: string | null;
  notes?: string | null;
  street_address?: string | null;
  city?: string | null;
  state_province?: string | null;
  postal_code?: string | null;
  specialty_ids?: number[];
  rating?: number | null;
  is_favorite?: boolean | null;
  residence_id?: number | null;
}

// ---------------------------------------------------------------------------
// Responses
// ---------------------------------------------------------------------------

export interface ContractorSpecialtyResponse {
  id: number;
  name: string;
  description: string;
  icon: string;
  display_order: number;
}

export interface ContractorUserResponse {
  id: number;
  username: string;
  first_name: string;
  last_name: string;
}

export interface ContractorResponse {
  id: number;
  residence_id: number | null;
  created_by_id: number;
  added_by: number;
  created_by?: ContractorUserResponse | null;
  name: string;
  company: string;
  phone: string;
  email: string;
  website: string;
  notes: string;
  street_address: string;
  city: string;
  state_province: string;
  postal_code: string;
  specialties: ContractorSpecialtyResponse[];
  rating: number | null;
  is_favorite: boolean;
  is_active: boolean;
  task_count?: number;
  created_at: string;
  updated_at: string;
}

export interface ToggleFavoriteResponse {
  message: string;
  is_favorite: boolean;
}
