60 lines
1.2 KiB
TypeScript
60 lines
1.2 KiB
TypeScript
import { JobStatus } from '@utils/constants';
|
|
|
|
export interface Coordinates {
|
|
latitude: number;
|
|
longitude: number;
|
|
}
|
|
|
|
export interface PartnerLocation {
|
|
coordinates: Coordinates;
|
|
address: string;
|
|
city: string;
|
|
state: string;
|
|
pincode: string;
|
|
}
|
|
|
|
export interface PartnerProfile {
|
|
partnerId: string;
|
|
fullName: string;
|
|
email: string;
|
|
phone: string;
|
|
locationType: 'home' | 'work' | 'other';
|
|
location: PartnerLocation | null;
|
|
avatarUri: string | null;
|
|
rating: number;
|
|
totalDeliveries: number;
|
|
acceptanceRate: number;
|
|
completionRate: number;
|
|
isVerified: boolean;
|
|
}
|
|
|
|
export interface JobOffer {
|
|
jobId: string;
|
|
pickupName: string;
|
|
pickupAddress: string;
|
|
pickupCoordinates: Coordinates;
|
|
dropName: string;
|
|
dropAddress: string;
|
|
dropCoordinates: Coordinates;
|
|
amount: string;
|
|
distance: string;
|
|
estimatedTime: number;
|
|
paymentType: 'online' | 'cod';
|
|
itemCount: number;
|
|
customerPhone: string;
|
|
}
|
|
|
|
export interface Job extends JobOffer {
|
|
orderId: string;
|
|
status: JobStatus;
|
|
acceptedAt: string;
|
|
pickedUpAt?: string;
|
|
deliveredAt?: string;
|
|
collectAmount: number;
|
|
}
|
|
|
|
export interface DayEarning {
|
|
day: string;
|
|
amount: number;
|
|
}
|