natsio/model/supplier_response.go

84 lines
2.9 KiB
Go
Raw Normal View History

2022-08-26 16:13:18 +00:00
package model
// ResponseSupplierInfo ...
type ResponseSupplierInfo struct {
2023-01-03 02:11:55 +00:00
ID string `json:"id"`
Name string `json:"name"`
BusinessType string `json:"businessType"`
Statistic *SupplierStatistic `json:"statistic"`
Rating float64 `json:"rating"`
Inventories *SKUCommonInfo `json:"inventories"`
Active bool `json:"active"`
}
// SupplierStatistic ...
type SupplierStatistic struct {
TotalInventory int64 `json:"totalInventory"`
TotalQuantitySale int64 `json:"totalQuantitySale"`
TotalProduct int64 `json:"totalProduct"`
TotalHasOrderSeller int64 `json:"totalHasOrderSeller"`
TotalFollower int64 `json:"totalFollower"`
SalesTotal float64 `json:"salesTotal"`
SalesWeekTotal float64 `json:"salesWeekTotal"`
SalesMonthTotal float64 `json:"salesMonthTotal"`
SalesTwoMonthTotal float64 `json:"salesTwoMonthTotal"`
SalesYearTotal float64 `json:"salesYearTotal"`
SalesSuccess float64 `json:"salesSuccess"`
SalesPending float64 `json:"salesPending"`
SalesCancelled float64 `json:"salesCancelled"`
}
// SKUCommonInfo ...
type SKUCommonInfo struct {
Code int `json:"id,omitempty" bson:"id,omitempty"`
ID string `json:"_id" bson:"_id"`
Name string `json:"name" bson:"name"`
SearchString string `json:"-" bson:"searchString,omitempty"`
Location *LocationInventory `json:"location,omitempty" bson:"location,omitempty"`
MinimumValue float64 `json:"minimumValue,omitempty" bson:"-"`
}
// LocationInventory ...
type LocationInventory struct {
Address string `bson:"address" json:"address"`
Province string `bson:"province" json:"province"`
ProvinceName string `bson:"provinceName,omitempty" json:"provinceName,omitempty"`
District string `bson:"district" json:"district"`
Ward string `bson:"ward" json:"ward"`
FullAddress string `bson:"fullAddress,omitempty" json:"fullAddress,omitempty"`
Location *MongoLocation `bson:"location" json:"location"`
}
// MongoLocation ...
type MongoLocation struct {
Type string `bson:"type"`
Coordinates []float64 `bson:"coordinates"`
2022-08-26 16:13:18 +00:00
}
2022-08-29 07:25:12 +00:00
// ResponseSupplierContract ...
type ResponseSupplierContract struct {
ID string `json:"id"`
Supplier string `json:"supplier"`
Name string `json:"name"`
Status string `json:"status"`
}
// SupplierBrief ...
type SupplierBrief struct {
2022-09-14 07:39:16 +00:00
ID string `json:"_id"`
Name string `json:"name"`
Status string `json:"status"`
BusinessType string `json:"businessType"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
}
type SupplierAll struct {
Suppliers []SupplierBrief `json:"suppliers"`
Total int64 `json:"total"`
}
2022-11-23 03:08:52 +00:00
type SupplierCountRes struct {
Total int64 `json:"total"`
}