- pricingid null: lookupDoormilePrice now returns matched rule ID; wired to BookingServiceOption.Pricingid - Zone rename: Interstate→Regional, OtherState→National throughout (code + DB migrated) - Zone from pincodes: CheckPrice now accepts pickup_pincode+delivery_pincode and auto-resolves zone - Delivery geocoding: pincodeToLatLon() maps 3-digit prefix to city coords when lat/lon are 0 - Device tokens: device_token field added to PinVerify DTOs; saved on both customer and miler login - Assignment retry: RejectMilerAssignment now re-triggers AssignCustomerMiler/AssignCRMMiler immediately - Provider empty B2C: defaults to Doormile when no pricing provider row matches - City gate 422→400: StatusUnprocessableEntity corrected to StatusBadRequest - Miler GPS 0,0: WS tracking falls back to MilerProfile DB coords when Redis key is expired Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
30 lines
1.6 KiB
Go
30 lines
1.6 KiB
Go
package models
|
|
|
|
import "time"
|
|
|
|
// Zone values: Local | Regional | National
|
|
// Category values: General | Documents | Electronics | Clothing | Fragile | Medical | Automotive | Food
|
|
// ServiceType: Normal | Express
|
|
|
|
type DoormilePricing struct {
|
|
Doormile_pricing_id int `json:"doormile_pricing_id" gorm:"primaryKey;column:doormile_pricing_id"`
|
|
Zone string `json:"zone" gorm:"column:zone;not null"`
|
|
Category string `json:"category" gorm:"column:category;not null"`
|
|
Servicetype string `json:"servicetype" gorm:"column:servicetype;not null"`
|
|
Minweight float64 `json:"min_weight" gorm:"column:min_weight;not null"`
|
|
Maxweight float64 `json:"max_weight" gorm:"column:max_weight;not null"`
|
|
Minprice float64 `json:"min_price" gorm:"column:min_price;not null"`
|
|
Maxprice float64 `json:"max_price" gorm:"column:max_price;not null"`
|
|
Currency string `json:"currency" gorm:"column:currency;default:INR"`
|
|
Providercompany string `json:"provider_company" gorm:"column:provider_company;default:Doormile"`
|
|
Reliabilityscore float64 `json:"reliability_score" gorm:"column:reliability_score;default:5.0"`
|
|
Status string `json:"status" gorm:"column:status;default:Active"`
|
|
Createdat time.Time `json:"createdat" gorm:"column:createdat;default:CURRENT_TIMESTAMP"`
|
|
Updatedat time.Time `json:"updatedat" gorm:"column:updatedat;default:CURRENT_TIMESTAMP"`
|
|
Deletedat *time.Time `json:"deletedat,omitempty" gorm:"column:deletedat"`
|
|
}
|
|
|
|
func (DoormilePricing) TableName() string {
|
|
return "doormile_pricing"
|
|
}
|