diff --git a/models/booking.go b/models/booking.go index f33bbc5..1dbedd2 100644 --- a/models/booking.go +++ b/models/booking.go @@ -47,7 +47,11 @@ type PickupBooking struct { // pickup point. Nullable — a booking that was never reached has no arrival. // arrivallatitude/longitude are the rider's actual GPS at the moment they // tapped "arrived", kept as a durable record separate from live telemetry. - Arrivedat *time.Time `json:"arrivedat" gorm:"column:arrivedat"` + // JSON name is reachedat (not arrivedat): the miler app, the /reached + // response and the Admin Console all key off reachedat — the console derives + // its "Arrived" display from Pickup_Scheduled + reachedat != null. The DB + // column stays arrivedat. + Arrivedat *time.Time `json:"reachedat" gorm:"column:arrivedat"` Arrivallatitude *float64 `json:"arrivallatitude" gorm:"column:arrivallatitude"` Arrivallongitude *float64 `json:"arrivallongitude" gorm:"column:arrivallongitude"` Consignmentid *int `json:"consignmentid" gorm:"column:consignmentid"`