hub apis
This commit is contained in:
@@ -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