updates on the customercontroller and the booking.go updates
This commit is contained in:
@@ -73,9 +73,15 @@ type PickupBooking struct {
|
||||
// list, so a "Converted_To_Consignment" booking can still show
|
||||
// Out_for_Delivery / Delivered). omitempty keeps it out of every other
|
||||
// PickupBooking response that does not populate it.
|
||||
Consignmentstatus string `json:"consignmentstatus,omitempty" gorm:"-"`
|
||||
Createdat time.Time `json:"createdat" gorm:"column:createdat;default:CURRENT_TIMESTAMP"`
|
||||
Updatedat time.Time `json:"updatedat" gorm:"column:updatedat;default:CURRENT_TIMESTAMP"`
|
||||
Consignmentstatus string `json:"consignmentstatus,omitempty" gorm:"-"`
|
||||
// Trackingno is not a column either — it lives on the consignment, which only
|
||||
// exists once the parcel is collected. It is filled in by handlers that serve
|
||||
// a customer, because without it the customer app has no way to reach
|
||||
// GET /customer/track/:trackingno at all: a booking is addressed by id, a
|
||||
// shipment by tracking number, and nothing joined the two.
|
||||
Trackingno string `json:"trackingno,omitempty" gorm:"-"`
|
||||
Createdat time.Time `json:"createdat" gorm:"column:createdat;default:CURRENT_TIMESTAMP"`
|
||||
Updatedat time.Time `json:"updatedat" gorm:"column:updatedat;default:CURRENT_TIMESTAMP"`
|
||||
|
||||
// Relations
|
||||
Parcels []BookingParcel `json:"parcels" gorm:"foreignKey:Bookingid"`
|
||||
|
||||
Reference in New Issue
Block a user