updates on the api endpoints on the customer page and more
This commit is contained in:
@@ -24,7 +24,20 @@ type PickupBooking struct {
|
||||
// parcel came out of. Separate column because pickuplocationid points at a
|
||||
// different table entirely; writing a tenantlocations id into it violates
|
||||
// that foreign key. This is what per-site reporting groups by.
|
||||
Tenantlocationid *int `json:"tenantlocationid" gorm:"column:tenantlocationid;index"`
|
||||
Tenantlocationid *int `json:"tenantlocationid" gorm:"column:tenantlocationid;index"`
|
||||
// Pickupsourcetype says what KIND of place this booking is collected from —
|
||||
// one of constants.PickupSource*. It is stored on the booking row, not looked
|
||||
// up from a location master, because a customer-door pickup has no location
|
||||
// id at all: only the row can tell "no location because it is a front door"
|
||||
// apart from "no location because nobody filled it in". Empty on rows written
|
||||
// before this column existed; derivePickupSourceType classifies those from
|
||||
// what they do carry, so the API never returns a blank type.
|
||||
Pickupsourcetype string `json:"pickup_source_type" gorm:"column:pickupsourcetype;size:20"`
|
||||
// Pickuphubid is set only when Pickupsourcetype is "hub" — the base the
|
||||
// parcel is collected FROM (Base → Customer). It is a separate column from
|
||||
// Nearesthubid, which is the base a parcel is routed TO. Conflating them
|
||||
// would make a base-origin booking look like a base-destination one.
|
||||
Pickuphubid *int `json:"pickuphubid" gorm:"column:pickuphubid;index"`
|
||||
Pickupaddress string `json:"pickupaddress" gorm:"column:pickupaddress;not null"`
|
||||
Pickuppincode string `json:"pickuppincode" gorm:"column:pickuppincode;not null"`
|
||||
Pickuplatitude float64 `json:"pickuplatitude" gorm:"column:pickuplatitude;not null"`
|
||||
|
||||
Reference in New Issue
Block a user