feat: add GPS tracking with Traccar integration
- Add GPS module with Traccar client service for device management - Add driver enrollment flow with QR code generation - Add real-time location tracking on driver profiles - Add GPS settings configuration in admin tools - Add Auth0 OpenID Connect setup script for Traccar - Add deployment configs for production server - Update nginx configs for SSL on GPS port 5055 - Add timezone setting support - Various UI improvements and bug fixes Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
51
backend/src/gps/dto/location-response.dto.ts
Normal file
51
backend/src/gps/dto/location-response.dto.ts
Normal file
@@ -0,0 +1,51 @@
|
||||
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;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user