hub apis
This commit is contained in:
@@ -67,6 +67,8 @@ type Consignment struct {
|
||||
Returninitiatedat *time.Time `json:"returninitiatedat" gorm:"column:returninitiatedat"`
|
||||
Returndeliveredat *time.Time `json:"returndeliveredat" gorm:"column:returndeliveredat"`
|
||||
Parentconsignmentid *int `json:"parentconsignmentid" gorm:"column:parentconsignmentid"`
|
||||
Condition string `json:"condition" gorm:"column:condition;size:50"` // recorded at hub inbound scan: Good, Damaged, etc.
|
||||
Shelf string `json:"shelf" gorm:"column:shelf;size:50"` // hub storage location assigned at inbound scan
|
||||
Createdat time.Time `json:"createdat" gorm:"column:createdat;default:CURRENT_TIMESTAMP"`
|
||||
Updatedat time.Time `json:"updatedat" gorm:"column:updatedat;default:CURRENT_TIMESTAMP"`
|
||||
Createdby int `json:"createdby" gorm:"column:createdby"`
|
||||
|
||||
@@ -105,6 +105,7 @@ type BookingAssignment struct {
|
||||
Acceptedat *time.Time `json:"acceptedat" gorm:"column:acceptedat"`
|
||||
Completedat *time.Time `json:"completedat" gorm:"column:completedat"`
|
||||
Remarks string `json:"remarks" gorm:"column:remarks"`
|
||||
AgentDecisionID *uint64 `json:"agent_decision_id,omitempty" gorm:"column:agent_decision_id"`
|
||||
}
|
||||
|
||||
func (BookingAssignment) TableName() string {
|
||||
|
||||
@@ -13,7 +13,10 @@ type Tripsheet struct {
|
||||
Driveruserid *int `json:"driveruserid" gorm:"column:driveruserid"`
|
||||
Dispatchtime *time.Time `json:"dispatchtime" gorm:"column:dispatchtime"`
|
||||
Arrivaltime *time.Time `json:"arrivaltime" gorm:"column:arrivaltime"`
|
||||
Status string `json:"status" gorm:"column:status;default:Draft"` // Draft, Dispatched, Arrived, Cancelled
|
||||
Status string `json:"status" gorm:"column:status;default:Draft"` // Draft, Ready, Dispatched, Arrived, Cancelled
|
||||
Batchlabel string `json:"batchlabel" gorm:"column:batchlabel;size:100"`
|
||||
Batchkind string `json:"batchkind" gorm:"column:batchkind;size:20"` // local, transfer
|
||||
Destinationlabel string `json:"destinationlabel" gorm:"column:destinationlabel;size:200"`
|
||||
Createdat time.Time `json:"createdat" gorm:"column:createdat;default:CURRENT_TIMESTAMP"`
|
||||
Updatedat time.Time `json:"updatedat" gorm:"column:updatedat;default:CURRENT_TIMESTAMP"`
|
||||
Createdby int `json:"createdby" gorm:"column:createdby"`
|
||||
|
||||
@@ -28,6 +28,7 @@ type Hub struct {
|
||||
Latitude float64 `json:"latitude" gorm:"column:latitude"`
|
||||
Longitude float64 `json:"longitude" gorm:"column:longitude"`
|
||||
Pincode string `json:"pincode" gorm:"column:pincode"`
|
||||
Capacity int `json:"capacity" gorm:"column:capacity;default:50"`
|
||||
Status string `json:"status" gorm:"column:status;default:Active"` // Active, InActive
|
||||
Createdat time.Time `json:"createdat" gorm:"column:createdat;default:CURRENT_TIMESTAMP"`
|
||||
Updatedat time.Time `json:"updatedat" gorm:"column:updatedat;default:CURRENT_TIMESTAMP"`
|
||||
@@ -90,6 +91,7 @@ type MilerProfile struct {
|
||||
Phone string `json:"phone" gorm:"column:phone;not null"`
|
||||
Profilephotourl string `json:"profilephotourl" gorm:"column:profilephotourl"`
|
||||
Vehicleid *int `json:"vehicleid" gorm:"column:vehicleid"`
|
||||
Hubid *int `json:"hubid" gorm:"column:hubid"`
|
||||
Defaultvehicletype string `json:"defaultvehicletype" gorm:"column:defaultvehicletype"`
|
||||
Currentlatitude float64 `json:"currentlatitude" gorm:"column:currentlatitude"`
|
||||
Currentlongitude float64 `json:"currentlongitude" gorm:"column:currentlongitude"`
|
||||
@@ -171,3 +173,20 @@ type TenantLocation struct {
|
||||
func (TenantLocation) TableName() string {
|
||||
return "tenantlocations"
|
||||
}
|
||||
|
||||
type HubStaffAccount struct {
|
||||
Hubstaffaccountid int `json:"hubstaffaccountid" gorm:"primaryKey;column:hubstaffaccountid"`
|
||||
Hubid int `json:"hubid" gorm:"column:hubid;index;not null"`
|
||||
Email string `json:"email" gorm:"column:email;unique;not null"`
|
||||
Passwordhash string `json:"-" gorm:"column:passwordhash;not null"`
|
||||
Displayname string `json:"displayname" gorm:"column:displayname"`
|
||||
Roleid int `json:"roleid" gorm:"column:roleid;default:6"`
|
||||
Isactive bool `json:"isactive" gorm:"column:isactive;default:true"`
|
||||
Tenantid *int `json:"tenantid" gorm:"column:tenantid;index"` // null = Doormile staff (can manage any hub in their city); set = partner staff scoped to their own hub
|
||||
Createdat time.Time `json:"createdat" gorm:"column:createdat;default:CURRENT_TIMESTAMP"`
|
||||
Updatedat time.Time `json:"updatedat" gorm:"column:updatedat;default:CURRENT_TIMESTAMP"`
|
||||
}
|
||||
|
||||
func (HubStaffAccount) TableName() string {
|
||||
return "hubstaffaccounts"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user