354 lines
14 KiB
Go
354 lines
14 KiB
Go
package models
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
type RiderPoolResult struct {
|
|
Status bool `json:"status"`
|
|
Code int `json:"code"`
|
|
Message string `json:"message"`
|
|
Details []RiderPool `json:"Details"`
|
|
}
|
|
|
|
type RiderPool struct {
|
|
Poolid int `json:"poolid"`
|
|
Userid int `json:"userid"`
|
|
Partnerid int `json:"partnerid"`
|
|
Firstname string `json:"firstname"`
|
|
Lastname string `json:"lastname"`
|
|
Fullname string `json:"fullname"`
|
|
Email string `json:"email"`
|
|
Contactno string `json:"contactno"`
|
|
Userfcmtoken string `json:"userfcmtoken"`
|
|
Identificationno string `json:"identificationno"`
|
|
Vehicleid int `json:"vehicleid"`
|
|
Vehiclename string `json:"vehiclename"`
|
|
Registrationno string `json:"registrationno"`
|
|
Licenseno string `json:"licenseno"`
|
|
Shiftid int `json:"shiftid"`
|
|
Starttime string `json:"starttime"`
|
|
Endtime string `json:"endtime"`
|
|
Shifthours float32 `json:"shifthours"`
|
|
Basefare float32 `json:"basefare"`
|
|
Fuelcharge float32 `json:"fuelcharge"`
|
|
Applocationid int `json:"applocationid"`
|
|
Status string `json:"status"`
|
|
}
|
|
|
|
type Partnerinfo struct {
|
|
Partnerid int `json:"partnerid" gorm:"Primary_Key"`
|
|
Partnertypeid int `json:"partnertypeid"`
|
|
Applocationid int `json:"applocationid"`
|
|
Partnername string `json:"partnername"`
|
|
Registrationno string `json:"registrationno"`
|
|
Primarycontact string `json:"primartcontact"`
|
|
Primaryemail string `json:"primaryemail"`
|
|
Contactno string `json:"contactno"`
|
|
Bizcategoryid int `json:"bizcategoryid"`
|
|
Bizsubcategoryid int `json:"bizsubcategoryid"`
|
|
Adderss string `json:"address"`
|
|
Suburb string `json:"suburb"`
|
|
State string `json:"state"`
|
|
City string `json:"city"`
|
|
Postcode string `json:"postcode"`
|
|
Partnerinfo string `json:"partnerinfo"`
|
|
Partnerimage string `json:"partnerimage"`
|
|
}
|
|
|
|
type AdminToken struct {
|
|
Userid int `json:"userid"`
|
|
Userfcmtoken string `json:"userfcmtokem"`
|
|
Notify string `json:"notify"`
|
|
Applocationid int `json:"applocationid"`
|
|
Closetime string `json:"closetime"`
|
|
Opentime string `json:"opentime"`
|
|
Tenantid int `json:"tenantid"`
|
|
}
|
|
|
|
type Rider struct {
|
|
Userid int `json:"userid" gorm:"primaryKey"`
|
|
Authname string `json:"authname"`
|
|
Firstname string `json:"firstname"`
|
|
Lastname string `json:"lastname"`
|
|
Password string `json:"password"`
|
|
Email string `json:"email"`
|
|
Contactno string `json:"contactno"`
|
|
Configid int `json:"configid"`
|
|
Authmode int `json:"authmode"`
|
|
Roleid int `json:"roleid"`
|
|
Pin int `json:"pin"`
|
|
Deviceid string `json:"deviceid"`
|
|
Devicetype string `json:"devicetype"`
|
|
Userfcmtoken string `json:"userfcmtoken"`
|
|
Address string `json:"address"`
|
|
Suburb string `json:"suburb"`
|
|
City string `json:"city"`
|
|
State string `json:"state"`
|
|
Postcode string `json:"postcode"`
|
|
Partnerid int `json:"partnerid"`
|
|
Tenantid int `json:"tenantid"`
|
|
Locationid int `json:"locationid"`
|
|
Applocationid int `json:"applocationid"`
|
|
Latitude string `json:"latitude"`
|
|
Longitude string `json:"longitude"`
|
|
Name string `json:"name"`
|
|
Capacity int `json:"capacity"`
|
|
Rangekm int `json:"rangekm"`
|
|
Batterypercentage int `json:"batterypercentage"`
|
|
Type string `json:"type"`
|
|
Status string `json:"status" gorm:"column:status;default:InActive"`
|
|
Ridersettings Ridersettings `json:"ridersettings" gorm:"-"`
|
|
}
|
|
|
|
type RiderDetails struct {
|
|
Userid int `json:"userid"`
|
|
Authname string `json:"authname"`
|
|
Configid int `json:"configid"`
|
|
Authmode int `json:"authmode"`
|
|
Roleid int `json:"roleid"`
|
|
Firstname string `json:"firstname"`
|
|
Lastname string `json:"lastname"`
|
|
Fullname string `json:"fullname"`
|
|
Password string `json:"password"`
|
|
Email string `json:"email"`
|
|
Contactno string `json:"contactno"`
|
|
Address string `json:"address"`
|
|
Suburb string `json:"suburb"`
|
|
City string `json:"city"`
|
|
State string `json:"state"`
|
|
Postcode string `json:"postcode"`
|
|
Userfcmtoken string `json:"userfcmtoken"`
|
|
Pin int `json:"pin"`
|
|
Partnerid int `json:"partnerid"`
|
|
Riderid int `json:"riderid"`
|
|
Identificationno string `json:"identificationno"`
|
|
Shiftid int `json:"shiftid"`
|
|
Starttime string `json:"starttime"`
|
|
Endtime string `json:"endtime"`
|
|
Shifthours float32 `json:"shifthours"`
|
|
Basefare float32 `json:"basefare"`
|
|
Additionalcharges float32 `json:"additionalcharges"`
|
|
Additionalkm float32 `json:"additionalkm"`
|
|
Orders int `json:"orders"`
|
|
Fuelcharge float32 `json:"fuelcharge"`
|
|
Accountno string `json:"accountno"`
|
|
Accountname string `json:"accountname"`
|
|
Accounttypeid int `json:"accounttypeid"`
|
|
Accounttype string `json:"accounttype"`
|
|
Bankname string `json:"bankname"`
|
|
Ifsccode string `json:"ifsccode"`
|
|
Branch string `json:"branch"`
|
|
Vehicleid int `json:"vehicleid"`
|
|
Vehiclename string `json:"vehiclename"`
|
|
Vehicleno string `json:"vehicleno"`
|
|
Model string `json:"model"`
|
|
Color string `json:"color"`
|
|
Licenseno string `json:"licenseno"`
|
|
Insuranceno string `json:"insuranceno"`
|
|
Insurancedate string `json:"insurancedate"`
|
|
Applocationid int `json:"applocationid"`
|
|
Status string `json:"status"`
|
|
}
|
|
|
|
type Ridersettings struct {
|
|
Riderid int `json:"riderid" grom:"Primary_Key"`
|
|
Userid int `json:"userid"`
|
|
Partnerid int `json:"partnerid"`
|
|
Shiftid int `json:"shiftid"`
|
|
Identificationno string `json:"identificationno"`
|
|
Basefare float32 `json:"basefare"`
|
|
Additionalkm float32 `json:"additionalkm"`
|
|
Additionalcharges float32 `json:"additionalcharges"`
|
|
Accountno string `json:"accountno"`
|
|
Accountname string `json:"accountname"`
|
|
Accounttypeid int `json:"accounttypeid"`
|
|
Accounttype string `json:"accounttype"`
|
|
Bankname string `json:"bankname"`
|
|
Ifsccode string `json:"ifsccode"`
|
|
Branch string `json:"branch"`
|
|
Vehicleid int `json:"vehicleid"`
|
|
Vehiclename string `json:"vehiclename"`
|
|
Vehicleno string `json:"vehicleno"`
|
|
Model string `json:"model"`
|
|
Color string `json:"color"`
|
|
Licenseno string `json:"licenseno"`
|
|
Insuranceno string `json:"insuranceno"`
|
|
Insurancedate string `json:"insurancedate"`
|
|
Status int `json:"status"`
|
|
}
|
|
|
|
type Ridershifts struct {
|
|
Shiftid int `json:"shiftid" gorm:"Primary_Key"`
|
|
Shiftdate string `json:"shiftdate"`
|
|
Starttime string `json:"starttime"`
|
|
Endtime string `json:"endtime"`
|
|
Shifthours float32 `json:"shifthours"`
|
|
Basefare float32 `json:"basefare"`
|
|
Additionalkm float32 `json:"additionalkm"`
|
|
Additionalcharges float32 `json:"additionalcharges"`
|
|
Orders int `json:"orders"`
|
|
Fuelcharge float32 `json:"fuelcharge"`
|
|
Shiftname string `json:"shiftname" gorm:"<-:false"`
|
|
}
|
|
|
|
type Riderlogs struct {
|
|
Logid int `json:"logid" gorm:"Primary_Key"`
|
|
Logdate string `json:"logdate"`
|
|
Userid int `json:"userid"`
|
|
Partnerid int `json:"partnerid"`
|
|
Shiftid int `json:"shiftid"`
|
|
Shifthours float64 `json:"shifthours" gorm:"type:numeric"`
|
|
Login string `json:"login,omitempty" gorm:"column:login;default:NULL"`
|
|
Logout string `json:"logout,omitempty" gorm:"column:logout;default:NULL"`
|
|
Latitude string `json:"latitude"`
|
|
Workhours float64 `json:"workhours" gorm:"type:numeric"`
|
|
Shorthours float64 `json:"shorthours" gorm:"type:numeric"`
|
|
Logstatus int `json:"logstatus"`
|
|
Longitude string `json:"longitude"`
|
|
Status string `json:"status"`
|
|
Breakhours float32 `json:"breakhours" gorm:"<-:false"`
|
|
Onduty int `json:"onduty" gorm:"<-:false"`
|
|
|
|
Firstname string `json:"firstname" gorm:"<-:false"`
|
|
Lastname string `json:"lastname" gorm:"<-:false"`
|
|
Username string `json:"username"`
|
|
Contactno string `json:"contactno"`
|
|
Userfcmtoken string `json:"userfcmtoken"`
|
|
Applocationid int `json:"applocationid"`
|
|
Tenantid int `json:"tenantid"`
|
|
Locationid int `json:"locationid"`
|
|
Orderid string `json:"orderid"`
|
|
|
|
Raw_latitude string `json:"raw_latitude"`
|
|
Raw_longitude string `json:"raw_longitude"`
|
|
Velocity_lat string `json:"velocity_lat"`
|
|
Velocity_long string `json:"velocity_long"`
|
|
Speed string `json:"speed"`
|
|
Heading string `json:"heading"`
|
|
}
|
|
|
|
type Riderlogsv1 struct {
|
|
Logid int `json:"logid" gorm:"Primary_Key"`
|
|
Logdate string `json:"logdate"`
|
|
Userid int `json:"userid"`
|
|
Partnerid int `json:"partnerid"`
|
|
Shiftid int `json:"shiftid"`
|
|
Shifthours float32 `json:"shifthours"`
|
|
Login string `json:"login,omitempty" gorm:"column:login;default:NULL"`
|
|
Logout string `json:"logout,omitempty" gorm:"column:logout;default:NULL"`
|
|
Latitude string `json:"latitude"`
|
|
Workhours float32 `json:"workhours"`
|
|
Shorthours float32 `json:"shorthours"`
|
|
Logstatus int `json:"logstatus"`
|
|
Longitude string `json:"longitude"`
|
|
Breakhours float32 `json:"breakhours" `
|
|
Onduty int `json:"onduty" `
|
|
Status string `json:"status"`
|
|
Firstname string `json:"firstname" `
|
|
Lastname string `json:"lastname" `
|
|
Contactno string `json:"contactno" `
|
|
Username string `json:"username" `
|
|
Userfcmtoken string `json:"userfcmtoken"`
|
|
Applocationid int `json:"applocationid"`
|
|
Tenantid int `json:"tenantid"`
|
|
Locationid int `json:"locationid"`
|
|
Orderid string `json:"orderid"`
|
|
}
|
|
|
|
type Riderbreaks struct {
|
|
Breakid int `json:"breakid" gorm:"Primary_Key"`
|
|
Logid int `json:"logid"`
|
|
Breakdate string `json:"breakdate"`
|
|
Userid int `json:"userid"`
|
|
Partnerid int `json:"partnerid"`
|
|
Shiftid int `json:"shiftid"`
|
|
Breakstart string `json:"breakstart,omitempty" gorm:"column:breakstart;default:NULL"`
|
|
Breakend string `json:"breakend,omitempty" gorm:"column:breakend;default:NULL"`
|
|
Latitude string `json:"latitude"`
|
|
Longitude string `json:"longitude"`
|
|
Breakhours float32 `json:"breakhours"`
|
|
}
|
|
|
|
type RiderlogDetails struct {
|
|
Logid int `json:"logid"`
|
|
Logdate string `json:"logdate"`
|
|
Userid int `json:"userid"`
|
|
Username string `json:"username"`
|
|
Partnerid int `json:"partnerid"`
|
|
Shiftid int `json:"shiftid"`
|
|
Shifthours float32 `json:"shifthours"`
|
|
Login string `json:"login"`
|
|
Logout string `json:"logout"`
|
|
Latitude string `json:"latitude"`
|
|
Longitude string `json:"longitude"`
|
|
Workhours float32 `json:"workhours"`
|
|
Shorthours float32 `json:"shorthours"`
|
|
Breakhours float32 `json:"breakhours"`
|
|
Logstatus int `json:"logstatus"`
|
|
}
|
|
|
|
type Userpools struct {
|
|
Poolid int `json:"poolid" gorm:"primaryKey;autoIncrement"`
|
|
Userid int `json:"userid"`
|
|
Partnerid int `json:"partnerid"`
|
|
Vehicleid int `json:"vehicleid"`
|
|
Onduty int `json:"onduty" gorm:"column:onduty;default:0"`
|
|
Status string `json:"status" gorm:"column:status;default:idle"`
|
|
}
|
|
|
|
type Locationconfigs struct {
|
|
Applocationid int `json:"applocationid"`
|
|
Configid int `json:"configid"`
|
|
Locationname string `json:"locationname"`
|
|
Latitude string `json:"latitude"`
|
|
Longitude string `json:"longitude"`
|
|
Status string `json:"status"`
|
|
}
|
|
|
|
type DeliveryStats struct {
|
|
Today int `json:"today"`
|
|
Week int `json:"week"`
|
|
Month int `json:"month"`
|
|
Total int `json:"total"`
|
|
Cancelled int `json:"cancelled"`
|
|
}
|
|
|
|
type RiderPricing struct {
|
|
Shiftid int `json:"shiftid"`
|
|
Basefare float32 `json:"basefare"`
|
|
Additionalcharges float32 `json:"additionalcharges"`
|
|
Fuelcharge float32 `json:"fuelcharge"`
|
|
Applocationid int `json:"applocationid"`
|
|
Locationname string `json:"locationname"`
|
|
}
|
|
|
|
type RiderKms struct {
|
|
Day string `json:"day"`
|
|
Kms float64 `json:"kms"`
|
|
}
|
|
|
|
type RiderWeeklyKms struct {
|
|
Details []RiderKms `json:"details"`
|
|
TotalKms float64 `json:"totalkms"`
|
|
OverallKms float64 `json:"overallkms"`
|
|
}
|
|
|
|
type RiderSupport struct {
|
|
Ridersupportid int `json:"ridersupportid" gorm:"primaryKey;autoIncrement"`
|
|
Userid int `json:"userid"`
|
|
Category string `json:"category"`
|
|
Priority string `json:"priority"`
|
|
Subject string `json:"subject"`
|
|
Issue string `json:"issue"`
|
|
Image string `json:"image"`
|
|
Created time.Time `json:"created" gorm:"autoCreateTime"`
|
|
Updated time.Time `json:"updated" gorm:"autoUpdateTime"`
|
|
}
|
|
|
|
type RidersSummary struct {
|
|
Active int `json:"active"`
|
|
Inactive int `json:"inactive"`
|
|
Total int `json:"total"`
|
|
}
|