stock request table created
This commit is contained in:
@@ -452,3 +452,21 @@ type LocationRevenueDetails struct {
|
||||
Revenue float64 `json:"revenue"`
|
||||
}
|
||||
|
||||
type SalesSummaryChartData struct {
|
||||
Date string `json:"date"`
|
||||
Revenue float64 `json:"revenue"`
|
||||
Orders int `json:"orders"`
|
||||
}
|
||||
|
||||
type SalesSummaryTopLocation struct {
|
||||
Locationname string `json:"locationname"`
|
||||
Revenue float64 `json:"revenue"`
|
||||
}
|
||||
|
||||
type SalesSummaryResponse struct {
|
||||
TotalRevenue float64 `json:"totalRevenue"`
|
||||
TotalOrders int `json:"totalOrders"`
|
||||
AverageOrderValue float64 `json:"averageOrderValue"`
|
||||
ChartData []SalesSummaryChartData `json:"chartData"`
|
||||
TopLocations []SalesSummaryTopLocation `json:"topLocations"`
|
||||
}
|
||||
|
||||
@@ -86,6 +86,31 @@ type Locationconfigs struct {
|
||||
Status string `json:"status"`
|
||||
}
|
||||
|
||||
type FleetCounts struct {
|
||||
Totalriders int `json:"totalriders"`
|
||||
Activeriders int `json:"activeriders"`
|
||||
Ridersworked int `json:"ridersworked"`
|
||||
Totallogins int `json:"totallogins"`
|
||||
}
|
||||
|
||||
type FleetRiderSummary struct {
|
||||
Userid int `json:"userid"`
|
||||
Fullname string `json:"fullname"`
|
||||
Contactno string `json:"contactno"`
|
||||
Partnerid int `json:"partnerid"`
|
||||
Status string `json:"status"`
|
||||
Vehicleno string `json:"vehicleno"`
|
||||
Vehiclename string `json:"vehiclename"`
|
||||
Dayslogged int `json:"dayslogged"`
|
||||
Totalworkhours float32 `json:"totalworkhours"`
|
||||
Totalshorthours float32 `json:"totalshorthours"`
|
||||
Totalbreakhours float32 `json:"totalbreakhours"`
|
||||
}
|
||||
|
||||
type FleetSummary struct {
|
||||
Counts FleetCounts `json:"counts"`
|
||||
Riders []FleetRiderSummary `json:"riders"`
|
||||
}
|
||||
|
||||
type RiderlogDetails struct {
|
||||
Logid int `json:"logid"`
|
||||
@@ -103,4 +128,4 @@ type RiderlogDetails struct {
|
||||
Shorthours float32 `json:"shorthours"`
|
||||
Breakhours float32 `json:"breakhours"`
|
||||
Logstatus int `json:"logstatus"`
|
||||
}
|
||||
}
|
||||
|
||||
20
models/stockrequest.go
Normal file
20
models/stockrequest.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package models
|
||||
|
||||
import "time"
|
||||
|
||||
type StockRequest struct {
|
||||
Requestid int `json:"requestid" gorm:"primaryKey;autoIncrement;column:requestid"`
|
||||
Tenantid int `json:"tenantid" gorm:"column:tenantid"`
|
||||
Locationid int `json:"locationid" gorm:"column:locationid"`
|
||||
Productid int `json:"productid" gorm:"column:productid"`
|
||||
Productname string `json:"productname" gorm:"->"`
|
||||
Productimage string `json:"productimage" gorm:"->"`
|
||||
Qty int `json:"qty" gorm:"column:qty"`
|
||||
Status string `json:"status" gorm:"column:status;default:Pending"`
|
||||
Created time.Time `json:"created" gorm:"column:created;autoCreateTime"`
|
||||
Updated time.Time `json:"updated" gorm:"column:updated;autoUpdateTime"`
|
||||
}
|
||||
|
||||
func (StockRequest) TableName() string {
|
||||
return "stockrequests"
|
||||
}
|
||||
Reference in New Issue
Block a user