334 lines
12 KiB
Go
334 lines
12 KiB
Go
package models
|
|
|
|
type User struct {
|
|
Userid int `json:"userid" gorm:"Primary_Key"`
|
|
Authname string `json:"authname"`
|
|
Firstname string `json:"firstname"`
|
|
Lastname string `json:"lastname"`
|
|
Password string `json:"password"`
|
|
Email string `json:"email"`
|
|
Dialcode string `json:"dialcode"`
|
|
Contactno string `json:"contactno"`
|
|
Configid int `json:"configid"`
|
|
Authmode int `json:"authmode"`
|
|
Roleid int `json:"roleid"`
|
|
Rolename string `json:"rolename"`
|
|
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"`
|
|
Status string `json:"status"`
|
|
Shiftid int `json:"shiftid"`
|
|
Bonuspts int `json:"bonuspts" gorm:"-"`
|
|
Hashsalt string `json:"hashsalt" gorm:"-"`
|
|
}
|
|
|
|
type Users struct {
|
|
Userid int `json:"userid" gorm:"Primary_Key"`
|
|
Email string `json:"email"`
|
|
Username string `json:"username"`
|
|
Contactno string `json:"contactno"`
|
|
Roleid int `json:"roleid"`
|
|
Configid int `json:"configid"`
|
|
Password string `json:"password"`
|
|
}
|
|
|
|
type AppLocation struct {
|
|
Applocationid int `json:"applocationid"`
|
|
Applocationname string `json:"applocationname"`
|
|
Status string `json:"status"`
|
|
}
|
|
|
|
type UserInfo struct {
|
|
Userid int `json:"userid"`
|
|
Authname string `json:"authname"`
|
|
Configid int `json:"configid"`
|
|
Authmode int `json:"authmode"`
|
|
Roleid int `json:"roleid"`
|
|
Rolename string `json:"rolename"`
|
|
Firstname string `json:"firstname"`
|
|
Lastname string `json:"lastname"`
|
|
Fullname string `json:"fullname"`
|
|
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"`
|
|
Shiftid int `json:"shiftid"`
|
|
Shiftname string `json:"shiftname"`
|
|
Pin int `json:"pin"`
|
|
Tenantid int `json:"tenantid"`
|
|
Status string `json:"status"`
|
|
Latitude string `json:"latitude"`
|
|
Longitude string `json:"longitude"`
|
|
|
|
Applocations []AppLocation `json:"applocations" gorm:"-"`
|
|
}
|
|
|
|
type UserInfov2 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"`
|
|
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"`
|
|
Shiftid int `json:"shiftid"`
|
|
Shiftname string `json:"shiftname"`
|
|
Pin int `json:"pin"`
|
|
Tenantid int `json:"tenantid"`
|
|
|
|
ApplocationidsRaw string `json:"-"`
|
|
ApplocationnamesRaw string `json:"-"`
|
|
|
|
Applocationids []int `json:"applocationids"`
|
|
Applocationnames []string `json:"applocationnames"`
|
|
|
|
Status string `json:"status"`
|
|
}
|
|
|
|
type TenantUserInfo 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"`
|
|
Locationid int `json:"locationid"`
|
|
Applocationid int `json:"applocationid"`
|
|
Tenantid int `json:"tenantid"`
|
|
Tenantname string `json:"tenantname"`
|
|
Tenantaddress string `json:"tenantaddress"`
|
|
Tenantcity string `json:"tenantcity"`
|
|
Tenantpostcode string `json:"tenantpostcode"`
|
|
Tenantlat string `json:"tenantlat"`
|
|
Tenantlong string `json:"tenantlong"`
|
|
Locationname string `json:"locationname"`
|
|
Applocation string `json:"applocation"`
|
|
Applatitude string `json:"applatitude"`
|
|
Applongitude string `json:"applongitude"`
|
|
Appradius int `json:"appradius"`
|
|
Moduleid int `json:"moduleid"`
|
|
Categoryid int `json:"categoryid"`
|
|
Categoryname string `json:"categoryname"`
|
|
Subcategoryid int `json:"subcategoryid"`
|
|
}
|
|
|
|
type StaffInfo 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"`
|
|
Applocationid int `json:"applocationid"`
|
|
Partnerid int `json:"partnerid"`
|
|
Tenantid int `json:"tenantid"`
|
|
Locationid int `json:"locationid"`
|
|
Locationname string `json:"locationname"`
|
|
}
|
|
|
|
type RiderInfo 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"`
|
|
Username string `json:"username"`
|
|
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"`
|
|
Identificationno string `json:"identificationno"`
|
|
Vehiclename string `json:"vehiclename"`
|
|
Vehicleno string `json:"vehicleno"`
|
|
Licenseno string `json:"licenseno"`
|
|
Insuranceno string `json:"insoranceno"`
|
|
Insurancedate string `json:"insurancedate"`
|
|
Shiftid int `json:"shiftid"`
|
|
Firstmilecharge float32 `json:"firstmilecharge"`
|
|
Starttime string `json:"starttime"`
|
|
Endtime string `json:"endtime"`
|
|
Shifthours float32 `json:"shifthours"`
|
|
Basefare float32 `json:"basefare"`
|
|
Additionalcharges float32 `json:"additionalcharges"`
|
|
Orders int `json:"orders"`
|
|
Fuelcharge float32 `json:"fuelcharge"`
|
|
Logdate string `json:"logdate"`
|
|
Applocationid int `json:"applocationid"`
|
|
Applocation string `json:"applocation"`
|
|
Logseconds int `json:"logseconds"`
|
|
Deliveryradius int `json:"deliveryradius"`
|
|
Riderid int `json:"riderid"`
|
|
Status string `json:"status"`
|
|
Tenantid int `json:"tenantid"`
|
|
Locationid int `json:"locationid"`
|
|
Logid int `json:"logid"`
|
|
Onduty int `json:"onduty"`
|
|
Latitude string `json:"latitude"`
|
|
Longitude string `json:"longitude"`
|
|
Bonuspts int `json:"bonuspts"`
|
|
Name string `json:"name"`
|
|
Capacity int `json:"capacity"`
|
|
Rangekm int `json:"rangekm"`
|
|
Batterypercentage int `json:"batterypercentage"`
|
|
Type string `json:"type"`
|
|
}
|
|
|
|
type AppUserpools struct {
|
|
Poolid int `json:"poolid" gorm:"Primary_key"`
|
|
Userid int `json:"userid"`
|
|
Partnerid int `json:"partnerid"`
|
|
Vehicleid int `json:"vehicleid"`
|
|
Onduty int `json:"onduty"`
|
|
Latitude string `json:"latitude"`
|
|
Longitude string `json:"longitude"`
|
|
Status string `json:"status"`
|
|
}
|
|
|
|
type Tenantstaffs struct {
|
|
Tenantstaffid int `json:"tenantstaffid" gorm:"Primary_key"`
|
|
Tenantid int `json:"tenantid"`
|
|
Moduleid int `json:"moduleid"`
|
|
Locationid int `json:"locationid"`
|
|
Userid int `json:"userid"`
|
|
Status string `json:"status"`
|
|
}
|
|
|
|
type Riderinfo struct {
|
|
Userid int `json:"userid" gorm:"Primary_Key"`
|
|
Authname string `json:"authname"`
|
|
Firstname string `json:"firstname"`
|
|
Lastname string `json:"lastname"`
|
|
Password string `json:"password"`
|
|
Email string `json:"email"`
|
|
Dialcode string `json:"dialcode"`
|
|
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"`
|
|
Status string `json:"status"`
|
|
Shiftid int `json:"shiftid"`
|
|
Bonuspts int `json:"bonuspts"`
|
|
Hashsalt string `json:"hashsalt" gorm:"-"`
|
|
}
|
|
|
|
type AppLocationConfig struct {
|
|
Applocationconfigid int `gorm:"primaryKey"`
|
|
Applocationid int
|
|
Configid int
|
|
Userid int
|
|
Partnerid int
|
|
Notify string
|
|
Status string
|
|
}
|
|
|
|
type ConsoleUser struct {
|
|
Userid int `json:"userid" gorm:"Primary_Key"`
|
|
Authname string `json:"authname"`
|
|
Firstname string `json:"firstname"`
|
|
Lastname string `json:"lastname"`
|
|
Password string `json:"password"`
|
|
Email string `json:"email"`
|
|
Dialcode string `json:"dialcode"`
|
|
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"`
|
|
Status string `json:"status"`
|
|
Shiftid int `json:"shiftid"`
|
|
Bonuspts int `json:"bonuspts" gorm:"-"`
|
|
Hashsalt string `json:"hashsalt" gorm:"-"`
|
|
// Applocationids []int `json:"applocationids" gorm:"-"`
|
|
}
|
|
|
|
type AppLocationConfigRequest struct {
|
|
Userid int `json:"userid"`
|
|
Configid int `json:"configid"`
|
|
Partnerid int `json:"partnerid"`
|
|
Applocationids []int `json:"applocationids"`
|
|
Notify string `json:"notify"`
|
|
Status string `json:"status"`
|
|
}
|