export class DriverLocationDto {
  driverId: string;
  driverName: string;
  driverPhone: string | null;
  deviceIdentifier: string;
  isActive: boolean;
  lastActive: Date | null;
  location: LocationDataDto | null;
}

export class LocationDataDto {
  latitude: number;
  longitude: number;
  altitude: number | null;
  speed: number | null; // mph
  course: number | null;
  accuracy: number | null;
  battery: number | null;
  timestamp: Date;
}

export class DriverStatsDto {
  driverId: string;
  driverName: string;
  period: {
    from: Date;
    to: Date;
  };
  stats: {
    totalMiles: number;
    topSpeedMph: number;
    topSpeedTimestamp: Date | null;
    averageSpeedMph: number;
    totalTrips: number;
    totalDrivingMinutes: number;
  };
  recentLocations: LocationDataDto[];
}

export class GpsStatusDto {
  traccarAvailable: boolean;
  traccarVersion: string | null;
  enrolledDrivers: number;
  activeDrivers: number;
  settings: {
    updateIntervalSeconds: number;
    shiftStartTime: string;
    shiftEndTime: string;
    retentionDays: number;
  };
}
