From cc48a083f2f9f4c1b063c74ae755a940b7865cba Mon Sep 17 00:00:00 2001 From: trunglt251292 Date: Tue, 13 Sep 2022 11:47:46 +0700 Subject: [PATCH 01/23] [Update] Response warehouse --- model/warehouse_response.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/model/warehouse_response.go b/model/warehouse_response.go index 2429743..f2d60a9 100644 --- a/model/warehouse_response.go +++ b/model/warehouse_response.go @@ -25,6 +25,20 @@ type WarehouseConfiguration struct { Partner WarehousePartner `json:"partner"` Delivery WarehouseDelivery `json:"delivery"` Other WarehouseOther `json:"other"` + Food WarehouseFood `json:"food"` +} + +// WarehouseFood ... +type WarehouseFood struct { + ForceClosed bool `json:"forceClosed"` + IsClosed bool `json:"isClosed"` + TimeRange []TimeRange `json:"timeRange"` +} + +// TimeRange ... +type TimeRange struct { + From int64 `json:"from"` + To int64 `json:"to"` } // WarehouseOther ... @@ -109,6 +123,7 @@ type ResponseLatLng struct { type WarehouseNatsResponse struct { ID string `json:"_id"` Staff string `json:"staff"` + BusinessType string `json:"businessType"` Name string `json:"name"` SearchString string `json:"searchString"` Slug string `json:"slug"` From 9f1f2faf9e1066b7fcf9fd76eb667e352493a5a5 Mon Sep 17 00:00:00 2001 From: trunglt251292 Date: Wed, 14 Sep 2022 14:39:16 +0700 Subject: [PATCH 02/23] [Update] Response supplier --- model/supplier_response.go | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/model/supplier_response.go b/model/supplier_response.go index a87a29e..975a8de 100644 --- a/model/supplier_response.go +++ b/model/supplier_response.go @@ -2,8 +2,9 @@ package model // ResponseSupplierInfo ... type ResponseSupplierInfo struct { - ID string `json:"id"` - Name string `json:"name"` + ID string `json:"id"` + Name string `json:"name"` + BusinessType string `json:"businessType"` } // ResponseSupplierContract ... @@ -16,11 +17,12 @@ type ResponseSupplierContract struct { // SupplierBrief ... type SupplierBrief struct { - ID string `json:"_id"` - Name string `json:"name"` - Status string `json:"status"` - CreatedAt string `json:"createdAt"` - UpdatedAt string `json:"updatedAt"` + 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 { From 40533e180544950fcb43b0d72c6f570ee821d455 Mon Sep 17 00:00:00 2001 From: Nguyen Minh Date: Thu, 15 Sep 2022 14:09:54 +0700 Subject: [PATCH 03/23] seller by id --- client/seller.go | 40 ++++++++++++++++++++++++++++++++++++++++ model/seller_request.go | 8 ++++++++ model/seller_response.go | 8 ++++++++ subject/config.go | 2 ++ subject/seller.go | 14 ++++++++++++++ 5 files changed, 72 insertions(+) create mode 100644 client/seller.go create mode 100644 model/seller_request.go create mode 100644 model/seller_response.go create mode 100644 subject/seller.go diff --git a/client/seller.go b/client/seller.go new file mode 100644 index 0000000..ec3ab83 --- /dev/null +++ b/client/seller.go @@ -0,0 +1,40 @@ +package client + +import ( + "encoding/json" + "errors" + "github.com/Selly-Modules/natsio" + "github.com/Selly-Modules/natsio/model" + "github.com/Selly-Modules/natsio/subject" +) + +// Seller ... +type Seller struct{} + +// GetSeller ... +func GetSeller() Seller { + return Seller{} +} + +// GetSellerInfoByID ... +func (s Seller) GetSellerInfoByID(p model.GetSellerByIDRequest) (*model.ResponseSellerInfo, error) { + msg, err := natsio.GetServer().Request(subject.Seller.GetSellerInfoByID, toBytes(p)) + if err != nil { + return nil, err + } + + var r struct { + Data *model.ResponseSellerInfo `json:"data"` + Error string `json:"error"` + } + + if err := json.Unmarshal(msg.Data, &r); err != nil { + return nil, err + } + + if r.Error != "" { + return nil, errors.New(r.Error) + } + + return r.Data, nil +} diff --git a/model/seller_request.go b/model/seller_request.go new file mode 100644 index 0000000..997cd97 --- /dev/null +++ b/model/seller_request.go @@ -0,0 +1,8 @@ +package model + +import "go.mongodb.org/mongo-driver/bson/primitive" + +// GetSellerByIDRequest ... +type GetSellerByIDRequest struct { + SellerID primitive.ObjectID `json:"sellerId"` +} diff --git a/model/seller_response.go b/model/seller_response.go new file mode 100644 index 0000000..6b7d698 --- /dev/null +++ b/model/seller_response.go @@ -0,0 +1,8 @@ +package model + +// ResponseSellerInfo ... +type ResponseSellerInfo struct { + ID string `json:"id"` + Name string `json:"name"` + Code string `json:"code"` +} diff --git a/subject/config.go b/subject/config.go index dfeea56..cb215bc 100644 --- a/subject/config.go +++ b/subject/config.go @@ -6,10 +6,12 @@ var prefixes = struct { Warehouse string Location string Supplier string + Seller string }{ Communication: "communication", Order: "order", Warehouse: "warehouse", Location: "location", Supplier: "supplier", + Seller: "seller", } diff --git a/subject/seller.go b/subject/seller.go new file mode 100644 index 0000000..033f993 --- /dev/null +++ b/subject/seller.go @@ -0,0 +1,14 @@ +package subject + +import "fmt" + +func getSellerValue(val string) string { + return fmt.Sprintf("%s.%s", prefixes.Seller, val) +} + +// Seller ... +var Seller = struct { + GetSellerInfoByID string +}{ + GetSellerInfoByID: getSellerValue("get_seller_info_by_id"), +} From fb8a8bd471bab82311c8356d2be2fab685d2afa1 Mon Sep 17 00:00:00 2001 From: trunglt251292 Date: Fri, 16 Sep 2022 14:49:53 +0700 Subject: [PATCH 04/23] [Update] Add request updateIsClosedSupplier --- client/warehouse.go | 18 ++++++++++++++++++ model/warehouse_request.go | 11 +++++++++++ subject/warehouse.go | 2 ++ 3 files changed, 31 insertions(+) diff --git a/client/warehouse.go b/client/warehouse.go index 6c04925..43b3168 100644 --- a/client/warehouse.go +++ b/client/warehouse.go @@ -17,6 +17,24 @@ func GetWarehouse() Warehouse { return Warehouse{} } +// UpdateIsClosedSupplier ... +func (w Warehouse) UpdateIsClosedSupplier(p model.WarehouseNatsResponse) error { + msg, err := natsio.GetServer().Request(subject.Warehouse.UpdateIsClosedSupplier, toBytes(p)) + if err != nil { + return err + } + var r struct { + Error string `json:"error"` + } + if err = json.Unmarshal(msg.Data, &r); err != nil { + return err + } + if r.Error != "" { + return errors.New(r.Error) + } + return nil +} + // AfterCreateWarehouse ... func (w Warehouse) AfterCreateWarehouse(p model.WarehouseNatsResponse) error { msg, err := natsio.GetServer().Request(subject.Warehouse.AfterCreateWarehouse, toBytes(p)) diff --git a/model/warehouse_request.go b/model/warehouse_request.go index 543fc68..b546725 100644 --- a/model/warehouse_request.go +++ b/model/warehouse_request.go @@ -69,3 +69,14 @@ type SyncORStatusRequest struct { ORCode string `json:"orCode"` OrderCode string `json:"orderCode"` } + +// UpdateSupplierIsClosedRequest ... +type UpdateSupplierIsClosedRequest struct { + Suppliers []SupplierIsClosed `json:"suppliers"` +} + +// SupplierIsClosed ... +type SupplierIsClosed struct { + Supplier string `json:"supplier"` + IsClosed bool `json:"isClosed"` +} diff --git a/subject/warehouse.go b/subject/warehouse.go index 5d0a81c..a0480ae 100644 --- a/subject/warehouse.go +++ b/subject/warehouse.go @@ -20,6 +20,7 @@ var Warehouse = struct { Count string AfterUpdateWarehouse string AfterCreateWarehouse string + UpdateIsClosedSupplier string }{ AfterCreateWarehouse: getWarehouseValue("after_create_warehouse"), AfterUpdateWarehouse: getWarehouseValue("after_update_warehouse"), @@ -34,4 +35,5 @@ var Warehouse = struct { FindByCondition: getWarehouseValue("find_all_by_condition"), Distinct: getWarehouseValue("distinct"), Count: getWarehouseValue("count"), + UpdateIsClosedSupplier: getWarehouseValue("update_is_closed_supplier"), } From 92040d0b9f453256437f88a03956e31c0835b1cd Mon Sep 17 00:00:00 2001 From: trunglt251292 Date: Fri, 16 Sep 2022 15:36:32 +0700 Subject: [PATCH 05/23] [Update] Payload --- client/warehouse.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/warehouse.go b/client/warehouse.go index 43b3168..fdb70b8 100644 --- a/client/warehouse.go +++ b/client/warehouse.go @@ -18,7 +18,7 @@ func GetWarehouse() Warehouse { } // UpdateIsClosedSupplier ... -func (w Warehouse) UpdateIsClosedSupplier(p model.WarehouseNatsResponse) error { +func (w Warehouse) UpdateIsClosedSupplier(p model.UpdateSupplierIsClosedRequest) error { msg, err := natsio.GetServer().Request(subject.Warehouse.UpdateIsClosedSupplier, toBytes(p)) if err != nil { return err From 89967955ea2af42c918b213a4183f2d3a471db93 Mon Sep 17 00:00:00 2001 From: phuanbui Date: Mon, 19 Sep 2022 11:48:30 +0700 Subject: [PATCH 06/23] get list seller by ids --- client/seller.go | 25 +++++++++++++++++++++++++ model/seller_request.go | 5 +++++ model/seller_response.go | 5 +++++ subject/seller.go | 6 ++++-- 4 files changed, 39 insertions(+), 2 deletions(-) diff --git a/client/seller.go b/client/seller.go index ec3ab83..5944bdb 100644 --- a/client/seller.go +++ b/client/seller.go @@ -3,6 +3,7 @@ package client import ( "encoding/json" "errors" + "github.com/Selly-Modules/natsio" "github.com/Selly-Modules/natsio/model" "github.com/Selly-Modules/natsio/subject" @@ -38,3 +39,27 @@ func (s Seller) GetSellerInfoByID(p model.GetSellerByIDRequest) (*model.Response return r.Data, nil } + +// GetListSellerInfoByIDs ... +func (s Seller) GetListSellerInfoByIDs(p model.GetListSellerByIDsRequest) (*model.ResponseListSellerInfo, error) { + msg, err := natsio.GetServer().Request(subject.Seller.GetListSellerInfoByIDs, toBytes(p)) + + if err != nil { + return nil, err + } + + var r struct { + Data *model.ResponseListSellerInfo `json:"data"` + Error string `json:"error"` + } + + if err := json.Unmarshal(msg.Data, &r); err != nil { + return nil, err + } + + if r.Error != "" { + return nil, errors.New(r.Error) + + } + return r.Data, nil +} diff --git a/model/seller_request.go b/model/seller_request.go index 997cd97..29732b9 100644 --- a/model/seller_request.go +++ b/model/seller_request.go @@ -6,3 +6,8 @@ import "go.mongodb.org/mongo-driver/bson/primitive" type GetSellerByIDRequest struct { SellerID primitive.ObjectID `json:"sellerId"` } + +// GetListSellerByIDsRequest ... +type GetListSellerByIDsRequest struct { + SellerIDs []primitive.ObjectID `json:"sellerIds"` +} diff --git a/model/seller_response.go b/model/seller_response.go index 6b7d698..5dd5271 100644 --- a/model/seller_response.go +++ b/model/seller_response.go @@ -6,3 +6,8 @@ type ResponseSellerInfo struct { Name string `json:"name"` Code string `json:"code"` } + +// ResponseListSellerInfo ... +type ResponseListSellerInfo struct { + Sellers []ResponseSellerInfo `json:"sellers"` +} diff --git a/subject/seller.go b/subject/seller.go index 033f993..ab3ac20 100644 --- a/subject/seller.go +++ b/subject/seller.go @@ -8,7 +8,9 @@ func getSellerValue(val string) string { // Seller ... var Seller = struct { - GetSellerInfoByID string + GetSellerInfoByID string + GetListSellerInfoByIDs string }{ - GetSellerInfoByID: getSellerValue("get_seller_info_by_id"), + GetSellerInfoByID: getSellerValue("get_seller_info_by_id"), + GetListSellerInfoByIDs: getSellerValue("get_list_seller_info_by_ids"), } From 35a811886b1113bda8683c1063da558766ae49ac Mon Sep 17 00:00:00 2001 From: phuanbui Date: Mon, 19 Sep 2022 14:52:26 +0700 Subject: [PATCH 07/23] edit type id --- model/seller_response.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/seller_response.go b/model/seller_response.go index 5dd5271..21f2693 100644 --- a/model/seller_response.go +++ b/model/seller_response.go @@ -2,7 +2,7 @@ package model // ResponseSellerInfo ... type ResponseSellerInfo struct { - ID string `json:"id"` + ID string `json:"_id"` Name string `json:"name"` Code string `json:"code"` } From 1d58e55af736b32c7526d711161ef9509d6bb83f Mon Sep 17 00:00:00 2001 From: trunglt251292 Date: Tue, 20 Sep 2022 10:28:35 +0700 Subject: [PATCH 08/23] [Update] Request news --- client/news.go | 28 ++++++++++++++++++++++++++++ model/news_request.go | 6 ++++++ model/news_response.go | 38 ++++++++++++++++++++++++++++++++++++++ subject/config.go | 2 ++ subject/news.go | 13 +++++++++++++ 5 files changed, 87 insertions(+) create mode 100644 client/news.go create mode 100644 model/news_request.go create mode 100644 model/news_response.go create mode 100644 subject/news.go diff --git a/client/news.go b/client/news.go new file mode 100644 index 0000000..162162d --- /dev/null +++ b/client/news.go @@ -0,0 +1,28 @@ +package client + +import ( + "encoding/json" + "errors" + "github.com/Selly-Modules/natsio" + "github.com/Selly-Modules/natsio/model" + "github.com/Selly-Modules/natsio/subject" +) + +// GetProductNoticesByInventory ... +func (w Warehouse) GetProductNoticesByInventory(p model.GetProductNoticesByInventoryRequest) (*model.GetProductNoticesByInventoryResponse, error) { + msg, err := natsio.GetServer().Request(subject.News.GetProductNoticesByInventory, bsonToBytes(p)) + if err != nil { + return nil, err + } + var r struct { + Data *model.GetProductNoticesByInventoryResponse `json:"data"` + Error string `json:"error"` + } + if err = json.Unmarshal(msg.Data, &r); err != nil { + return nil, err + } + if r.Error != "" { + return nil, errors.New(r.Error) + } + return r.Data, nil +} diff --git a/model/news_request.go b/model/news_request.go new file mode 100644 index 0000000..fb886e3 --- /dev/null +++ b/model/news_request.go @@ -0,0 +1,6 @@ +package model + +// GetProductNoticesByInventoryRequest .... +type GetProductNoticesByInventoryRequest struct { + InventoryIds []string `json:"inventoryIds"` +} diff --git a/model/news_response.go b/model/news_response.go new file mode 100644 index 0000000..4b496c4 --- /dev/null +++ b/model/news_response.go @@ -0,0 +1,38 @@ +package model + +// GetProductNoticesByInventoryResponse .... +type GetProductNoticesByInventoryResponse struct { + Notices []NewsAppResponse `json:"notices"` +} + +// NewsAppResponse ... +type NewsAppResponse struct { + ID string `json:"_id"` + Title string `json:"title,omitempty"` + Target *TargetNewDoc `json:"target,omitempty"` + ActionType *ActionType `json:"action"` + ShortDesc string `json:"shortDesc,omitempty"` + Type string `json:"type"` + ShortTitle string `json:"shortTitle,omitempty"` + Color string `json:"color"` + Options *NewsOptions `json:"options,omitempty"` + DisplayStyle string `json:"displayStyle"` +} + +// NewsOptions ... +type NewsOptions struct { + Category string `json:"category"` +} + +// TargetNewDoc ... +type TargetNewDoc struct { + Type string `json:"type,omitempty"` + Value string `json:"value,omitempty"` +} + +// ActionType ... +type ActionType struct { + Type string `json:"type"` + Value string `json:"value"` + Text string `json:"text,omitempty"` +} diff --git a/subject/config.go b/subject/config.go index dfeea56..259e7ba 100644 --- a/subject/config.go +++ b/subject/config.go @@ -3,12 +3,14 @@ package subject var prefixes = struct { Communication string Order string + News string Warehouse string Location string Supplier string }{ Communication: "communication", Order: "order", + News: "news", Warehouse: "warehouse", Location: "location", Supplier: "supplier", diff --git a/subject/news.go b/subject/news.go new file mode 100644 index 0000000..3e96d25 --- /dev/null +++ b/subject/news.go @@ -0,0 +1,13 @@ +package subject + +import "fmt" + +func getNewsValue(val string) string { + return fmt.Sprintf("%s.%s", prefixes.Order, val) +} + +var News = struct { + GetProductNoticesByInventory string +}{ + GetProductNoticesByInventory: getNewsValue("get_product_notices_by_inventory"), +} From 34c61ccfcc7d2ab95cd27969f54ed0a0eb460190 Mon Sep 17 00:00:00 2001 From: trunglt251292 Date: Tue, 20 Sep 2022 10:56:45 +0700 Subject: [PATCH 09/23] [Update] --- client/news.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/client/news.go b/client/news.go index 162162d..4167c0a 100644 --- a/client/news.go +++ b/client/news.go @@ -8,8 +8,16 @@ import ( "github.com/Selly-Modules/natsio/subject" ) +// News ... +type News struct{} + +// GetNews ... +func GetNews() News { + return News{} +} + // GetProductNoticesByInventory ... -func (w Warehouse) GetProductNoticesByInventory(p model.GetProductNoticesByInventoryRequest) (*model.GetProductNoticesByInventoryResponse, error) { +func (n News) GetProductNoticesByInventory(p model.GetProductNoticesByInventoryRequest) (*model.GetProductNoticesByInventoryResponse, error) { msg, err := natsio.GetServer().Request(subject.News.GetProductNoticesByInventory, bsonToBytes(p)) if err != nil { return nil, err From 4452be147432ae722cf941b3b7b223ee0af0d7c0 Mon Sep 17 00:00:00 2001 From: trunglt251292 Date: Tue, 20 Sep 2022 13:49:58 +0700 Subject: [PATCH 10/23] [Update] Add subjects --- subject/news.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subject/news.go b/subject/news.go index 3e96d25..bfec6cf 100644 --- a/subject/news.go +++ b/subject/news.go @@ -3,7 +3,7 @@ package subject import "fmt" func getNewsValue(val string) string { - return fmt.Sprintf("%s.%s", prefixes.Order, val) + return fmt.Sprintf("%s.%s", prefixes.News, val) } var News = struct { From 952c09ccba634573b47c9ed6faca0004b400426d Mon Sep 17 00:00:00 2001 From: trunglt251292 Date: Tue, 20 Sep 2022 14:46:29 +0700 Subject: [PATCH 11/23] fix news to bytes --- client/news.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/news.go b/client/news.go index 4167c0a..6bacf54 100644 --- a/client/news.go +++ b/client/news.go @@ -18,7 +18,7 @@ func GetNews() News { // GetProductNoticesByInventory ... func (n News) GetProductNoticesByInventory(p model.GetProductNoticesByInventoryRequest) (*model.GetProductNoticesByInventoryResponse, error) { - msg, err := natsio.GetServer().Request(subject.News.GetProductNoticesByInventory, bsonToBytes(p)) + msg, err := natsio.GetServer().Request(subject.News.GetProductNoticesByInventory, toBytes(p)) if err != nil { return nil, err } From 583f2abda5476a5b6f8c92f7b9e678eb663242e6 Mon Sep 17 00:00:00 2001 From: Nguyen Minh Date: Wed, 21 Sep 2022 10:19:17 +0700 Subject: [PATCH 12/23] get seller info support chat --- client/seller.go | 23 ++++++++++++++ model/seller_request.go | 5 +++ model/seller_response.go | 68 ++++++++++++++++++++++++++++++++++++++++ subject/seller.go | 10 +++--- 4 files changed, 102 insertions(+), 4 deletions(-) diff --git a/client/seller.go b/client/seller.go index 5944bdb..56a9d7c 100644 --- a/client/seller.go +++ b/client/seller.go @@ -63,3 +63,26 @@ func (s Seller) GetListSellerInfoByIDs(p model.GetListSellerByIDsRequest) (*mode } return r.Data, nil } + +// GetListSellerInfoSupportChatByIDs ... +func (s Seller) GetListSellerInfoSupportChatByIDs(p model.GetListSellerSupportChatByIDsRequest) (*model.ResponseListSellerInfoSupportChat, error) { + msg, err := natsio.GetServer().Request(subject.Seller.GetListSellerInfoSupportChatByIDs, toBytes(p)) + if err != nil { + return nil, err + } + + var r struct { + Data *model.ResponseListSellerInfoSupportChat `json:"data"` + Error string `json:"error"` + } + + if err := json.Unmarshal(msg.Data, &r); err != nil { + return nil, err + } + + if r.Error != "" { + return nil, errors.New(r.Error) + + } + return r.Data, nil +} diff --git a/model/seller_request.go b/model/seller_request.go index 29732b9..a54996c 100644 --- a/model/seller_request.go +++ b/model/seller_request.go @@ -11,3 +11,8 @@ type GetSellerByIDRequest struct { type GetListSellerByIDsRequest struct { SellerIDs []primitive.ObjectID `json:"sellerIds"` } + +// GetListSellerSupportChatByIDsRequest ... +type GetListSellerSupportChatByIDsRequest struct { + SellerIDs []primitive.ObjectID `json:"sellerIds"` +} diff --git a/model/seller_response.go b/model/seller_response.go index 21f2693..aec57b9 100644 --- a/model/seller_response.go +++ b/model/seller_response.go @@ -1,5 +1,7 @@ package model +import "time" + // ResponseSellerInfo ... type ResponseSellerInfo struct { ID string `json:"_id"` @@ -11,3 +13,69 @@ type ResponseSellerInfo struct { type ResponseListSellerInfo struct { Sellers []ResponseSellerInfo `json:"sellers"` } + +// ResponseListSellerInfoSupportChat ... +type ResponseListSellerInfoSupportChat struct { + Sellers []ResponseSellerInfoSupportChat `json:"sellers"` +} + +// ResponseSellerInfoSupportChat ... +type ResponseSellerInfoSupportChat struct { + ID string `json:"_id"` + Name string `json:"name"` + Code string `json:"code"` + Membership SellerMembershipInfo `json:"membership"` + Info SellerContactInfo `json:"info"` + Team *TeamInfo `json:"team,omitempty"` + Statistic SellerStatistic `json:"statistic"` + TrackingTime *SellerTrackingTime `json:"trackingTime"` + Invitee *InviteeInfo `json:"invitee"` + CreatedAt time.Time `json:"createdAt"` +} + +// SellerTrackingTime ... +type SellerTrackingTime struct { + FirstOrderDeliveredAt time.Time `json:"firstOrderDeliveredAt,omitempty"` + ThirdOrderDeliveredAt time.Time `json:"thirdOrderDeliveredAt,omitempty"` +} + +// SellerStatistic ... +type SellerStatistic struct { + ThisMonthSale float64 `bson:"thisMonthSale" json:"thisMonthSale"` + LastMonthSale float64 `bson:"lastMonthSale" json:"lastMonthSale"` + Sale float64 `bson:"sale" json:"sale"` + TransactionTotal int `json:"transactionTotal"` + TransactionPaymentProcessing int `json:"transactionPaymentProcessing"` + TransactionWaitingApprove int `json:"transactionWaitingApprove"` + TransactionPending int `json:"transactionPending"` + TransactionSuccess int `json:"transactionSuccess"` + TransactionRejected int `json:"transactionRejected"` + TransactionDelivering int `json:"transactionDelivering"` + TransactionDelivered int `json:"transactionDelivered"` +} + +// TeamInfo ... +type TeamInfo struct { + ID string `json:"_id"` + Name string `json:"name"` + Role string `json:"role"` +} + +// InviteeInfo ... +type InviteeInfo struct { + ID string `json:"_id"` + Name string `json:"name"` +} + +// SellerContactInfo ... +type SellerContactInfo struct { + City int `json:"cityCode"` + CityName string `json:"cityName"` + Gender string `json:"gender"` +} + +// SellerMembershipInfo ... +type SellerMembershipInfo struct { + Level int `json:"level"` + Name string `json:"name"` +} diff --git a/subject/seller.go b/subject/seller.go index ab3ac20..6ef730e 100644 --- a/subject/seller.go +++ b/subject/seller.go @@ -8,9 +8,11 @@ func getSellerValue(val string) string { // Seller ... var Seller = struct { - GetSellerInfoByID string - GetListSellerInfoByIDs string + GetSellerInfoByID string + GetListSellerInfoByIDs string + GetListSellerInfoSupportChatByIDs string }{ - GetSellerInfoByID: getSellerValue("get_seller_info_by_id"), - GetListSellerInfoByIDs: getSellerValue("get_list_seller_info_by_ids"), + GetSellerInfoByID: getSellerValue("get_seller_info_by_id"), + GetListSellerInfoByIDs: getSellerValue("get_list_seller_info_by_ids"), + GetListSellerInfoSupportChatByIDs: getSellerValue("get_list_seller_info_support_chat_by_ids"), } From 4ac7ec3b0ceb1a29519d680da717ec5547c4652f Mon Sep 17 00:00:00 2001 From: Nguyen Minh Date: Thu, 22 Sep 2022 13:49:11 +0700 Subject: [PATCH 13/23] support chat get seller info --- client/seller.go | 2 +- subject/seller.go | 15 ++++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/client/seller.go b/client/seller.go index 56a9d7c..1d06208 100644 --- a/client/seller.go +++ b/client/seller.go @@ -66,7 +66,7 @@ func (s Seller) GetListSellerInfoByIDs(p model.GetListSellerByIDsRequest) (*mode // GetListSellerInfoSupportChatByIDs ... func (s Seller) GetListSellerInfoSupportChatByIDs(p model.GetListSellerSupportChatByIDsRequest) (*model.ResponseListSellerInfoSupportChat, error) { - msg, err := natsio.GetServer().Request(subject.Seller.GetListSellerInfoSupportChatByIDs, toBytes(p)) + msg, err := natsio.GetServer().Request(subject.SupportChat.GetListSellerInfoSupportChatByIDs, toBytes(p)) if err != nil { return nil, err } diff --git a/subject/seller.go b/subject/seller.go index 6ef730e..eba9131 100644 --- a/subject/seller.go +++ b/subject/seller.go @@ -8,11 +8,16 @@ func getSellerValue(val string) string { // Seller ... var Seller = struct { - GetSellerInfoByID string - GetListSellerInfoByIDs string + GetSellerInfoByID string + GetListSellerInfoByIDs string +}{ + GetSellerInfoByID: getSellerValue("get_seller_info_by_id"), + GetListSellerInfoByIDs: getSellerValue("get_list_seller_info_by_ids"), +} + +// SupportChat ... +var SupportChat = struct { GetListSellerInfoSupportChatByIDs string }{ - GetSellerInfoByID: getSellerValue("get_seller_info_by_id"), - GetListSellerInfoByIDs: getSellerValue("get_list_seller_info_by_ids"), - GetListSellerInfoSupportChatByIDs: getSellerValue("get_list_seller_info_support_chat_by_ids"), + GetListSellerInfoSupportChatByIDs: "SELLY_CHAT.REQUEST.SELLER_INFO", } From b718162cd439fd67487b695f48d4a9f7f90a4469 Mon Sep 17 00:00:00 2001 From: Nguyen Minh Date: Fri, 23 Sep 2022 10:13:14 +0700 Subject: [PATCH 14/23] jestream-push-notification --- jestream/config.go | 8 ++++++++ jestream/notification.go | 8 ++++++++ model/notification_request.go | 14 ++++++++++++++ 3 files changed, 30 insertions(+) create mode 100644 jestream/config.go create mode 100644 jestream/notification.go create mode 100644 model/notification_request.go diff --git a/jestream/config.go b/jestream/config.go new file mode 100644 index 0000000..41d28bb --- /dev/null +++ b/jestream/config.go @@ -0,0 +1,8 @@ +package jestream + +// StreamConfig ... +var StreamConfig = struct { + Notification string +}{ + Notification: "Service_Notification", +} diff --git a/jestream/notification.go b/jestream/notification.go new file mode 100644 index 0000000..fe48a8b --- /dev/null +++ b/jestream/notification.go @@ -0,0 +1,8 @@ +package jestream + +// SubjectNotification ... +var SubjectNotification = struct { + PushNotifications string +}{ + PushNotifications: "selly.pull.notification.push_notifications", +} diff --git a/model/notification_request.go b/model/notification_request.go new file mode 100644 index 0000000..ed2c36c --- /dev/null +++ b/model/notification_request.go @@ -0,0 +1,14 @@ +package model + +// PayloadPushNotification ... +type PayloadPushNotification struct { + User string `json:"user"` + Type string `json:"type"` + TargetId string `json:"targetId"` + IsFromAdmin bool `json:"isFromAdmin"` + Category string `json:"category"` + Options struct { + Title string `json:"title"` + Content string `json:"content"` + } `json:"options"` +} From f80f89e79396a477b721814ac8be0e19922d4928 Mon Sep 17 00:00:00 2001 From: Nguyen Minh Date: Fri, 23 Sep 2022 11:17:03 +0700 Subject: [PATCH 15/23] jestream --- jestream/config.go | 8 -------- jestream/notification.go | 8 -------- .../model/selly.go | 8 ++++---- js/subject/config.go | 10 ++++++++++ js/subject/selly.go | 19 +++++++++++++++++++ 5 files changed, 33 insertions(+), 20 deletions(-) delete mode 100644 jestream/config.go delete mode 100644 jestream/notification.go rename model/notification_request.go => js/model/selly.go (68%) create mode 100644 js/subject/config.go create mode 100644 js/subject/selly.go diff --git a/jestream/config.go b/jestream/config.go deleted file mode 100644 index 41d28bb..0000000 --- a/jestream/config.go +++ /dev/null @@ -1,8 +0,0 @@ -package jestream - -// StreamConfig ... -var StreamConfig = struct { - Notification string -}{ - Notification: "Service_Notification", -} diff --git a/jestream/notification.go b/jestream/notification.go deleted file mode 100644 index fe48a8b..0000000 --- a/jestream/notification.go +++ /dev/null @@ -1,8 +0,0 @@ -package jestream - -// SubjectNotification ... -var SubjectNotification = struct { - PushNotifications string -}{ - PushNotifications: "selly.pull.notification.push_notifications", -} diff --git a/model/notification_request.go b/js/model/selly.go similarity index 68% rename from model/notification_request.go rename to js/model/selly.go index ed2c36c..053a3be 100644 --- a/model/notification_request.go +++ b/js/model/selly.go @@ -1,10 +1,10 @@ -package model +package jsmodel -// PayloadPushNotification ... -type PayloadPushNotification struct { +// PushNotification ... +type PushNotification struct { User string `json:"user"` Type string `json:"type"` - TargetId string `json:"targetId"` + TargetID string `json:"targetId"` IsFromAdmin bool `json:"isFromAdmin"` Category string `json:"category"` Options struct { diff --git a/js/subject/config.go b/js/subject/config.go new file mode 100644 index 0000000..3f77205 --- /dev/null +++ b/js/subject/config.go @@ -0,0 +1,10 @@ +package jssubject + +var root = "js" + +// prefixes ... +var prefixes = struct { + Selly string +}{ + Selly: "selly", +} diff --git a/js/subject/selly.go b/js/subject/selly.go new file mode 100644 index 0000000..e6a344b --- /dev/null +++ b/js/subject/selly.go @@ -0,0 +1,19 @@ +package jssubject + +import ( + "fmt" +) + +// getSellyValue ... +func getSellyValue(val string) string { + return fmt.Sprintf("%s.%s.%s", root, prefixes.Selly, val) +} + +// Selly ... +var Selly = struct { + Stream string + PushNotification string +}{ + Stream: prefixes.Selly, + PushNotification: getSellyValue("push_notifications"), +} From 047037f12303c601b49fa7431eb311901c48c176 Mon Sep 17 00:00:00 2001 From: Nguyen Minh Date: Fri, 23 Sep 2022 11:57:19 +0700 Subject: [PATCH 16/23] stream name --- jestream_name.go | 4 ++++ js/subject/selly.go | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 jestream_name.go diff --git a/jestream_name.go b/jestream_name.go new file mode 100644 index 0000000..1f2ea4d --- /dev/null +++ b/jestream_name.go @@ -0,0 +1,4 @@ +package natsio + +// StreamNameSelly ... +const StreamNameSelly = "selly" diff --git a/js/subject/selly.go b/js/subject/selly.go index e6a344b..bdd4ce8 100644 --- a/js/subject/selly.go +++ b/js/subject/selly.go @@ -11,9 +11,7 @@ func getSellyValue(val string) string { // Selly ... var Selly = struct { - Stream string PushNotification string }{ - Stream: prefixes.Selly, PushNotification: getSellyValue("push_notifications"), } From 547b3b8dd911df5bb2664e8374d4a96b6874ef7b Mon Sep 17 00:00:00 2001 From: Nguyen Minh Date: Fri, 23 Sep 2022 14:47:00 +0700 Subject: [PATCH 17/23] update js stream --- js/consumer/selly.go | 8 ++++++++ js/model/selly.go | 21 ++++++++++++--------- 2 files changed, 20 insertions(+), 9 deletions(-) create mode 100644 js/consumer/selly.go diff --git a/js/consumer/selly.go b/js/consumer/selly.go new file mode 100644 index 0000000..380927c --- /dev/null +++ b/js/consumer/selly.go @@ -0,0 +1,8 @@ +package jsconsumer + +// Selly ... +var Selly = struct { + PushNotification string +}{ + PushNotification: "PULL_PUSH_NOTIFICATION", +} diff --git a/js/model/selly.go b/js/model/selly.go index 053a3be..ab8d021 100644 --- a/js/model/selly.go +++ b/js/model/selly.go @@ -2,13 +2,16 @@ package jsmodel // PushNotification ... type PushNotification struct { - User string `json:"user"` - Type string `json:"type"` - TargetID string `json:"targetId"` - IsFromAdmin bool `json:"isFromAdmin"` - Category string `json:"category"` - Options struct { - Title string `json:"title"` - Content string `json:"content"` - } `json:"options"` + User string `json:"user"` + Type string `json:"type"` + TargetID string `json:"targetId"` + IsFromAdmin bool `json:"isFromAdmin"` + Category string `json:"category"` + Options NotificationOptions `json:"options"` +} + +// NotificationOptions ... +type NotificationOptions struct { + Title string `json:"title"` + Content string `json:"content"` } From d9763edd75d48c0d20b7ce5aff940b47fb44eb67 Mon Sep 17 00:00:00 2001 From: Nguyen Minh Date: Fri, 23 Sep 2022 22:11:24 +0700 Subject: [PATCH 18/23] pull js seller affiliate statistic --- js/consumer/selly.go | 6 ++++-- js/model/selly.go | 19 +++++++++++++++++++ js/subject/selly.go | 6 ++++-- 3 files changed, 27 insertions(+), 4 deletions(-) diff --git a/js/consumer/selly.go b/js/consumer/selly.go index 380927c..b13c5f6 100644 --- a/js/consumer/selly.go +++ b/js/consumer/selly.go @@ -2,7 +2,9 @@ package jsconsumer // Selly ... var Selly = struct { - PushNotification string + PushNotification string + UpdateSellerStatistic string }{ - PushNotification: "PULL_PUSH_NOTIFICATION", + PushNotification: "PULL_PUSH_NOTIFICATION", + UpdateSellerStatistic: "PULL_UPDATE_SELLER_STATISTIC", } diff --git a/js/model/selly.go b/js/model/selly.go index ab8d021..412e62d 100644 --- a/js/model/selly.go +++ b/js/model/selly.go @@ -15,3 +15,22 @@ type NotificationOptions struct { Title string `json:"title"` Content string `json:"content"` } + +// PayloadUpdateSellerAffiliateStatistic ... +type PayloadUpdateSellerAffiliateStatistic struct { + SellerID string `json:"sellerId"` + Statistic SellerAffiliateStatistic `json:"statistic"` +} + +// SellerAffiliateStatistic ... +type SellerAffiliateStatistic struct { + TransactionTotal int `json:"transactionTotal"` + TransactionCashback int `json:"transactionCashback"` + TransactionPending int `json:"transactionPending"` + TransactionApproved int `json:"transactionApproved"` + TransactionRejected int `json:"transactionRejected"` + CommissionTransactionTotal float64 `json:"commissionTransactionTotal"` + CommissionTransactionCashback float64 `json:"commissionTransactionCashback"` + CommissionTransactionApproved float64 `json:"commissionTransactionApproved"` + CommissionTransactionRejected float64 `json:"commissionTransactionRejected"` +} diff --git a/js/subject/selly.go b/js/subject/selly.go index bdd4ce8..204e781 100644 --- a/js/subject/selly.go +++ b/js/subject/selly.go @@ -11,7 +11,9 @@ func getSellyValue(val string) string { // Selly ... var Selly = struct { - PushNotification string + PushNotification string + UpdateSellerStatistic string }{ - PushNotification: getSellyValue("push_notifications"), + PushNotification: getSellyValue("push_notifications"), + UpdateSellerStatistic: getSellyValue("update_seller_statistic"), } From 68b9cab1e2f9733947cf3709f54ee0ae53289f04 Mon Sep 17 00:00:00 2001 From: Nguyen Minh Date: Fri, 23 Sep 2022 22:11:28 +0700 Subject: [PATCH 19/23] pull js seller affiliate statistic --- js/consumer/selly.go | 8 ++++---- js/subject/selly.go | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/js/consumer/selly.go b/js/consumer/selly.go index b13c5f6..0305c7c 100644 --- a/js/consumer/selly.go +++ b/js/consumer/selly.go @@ -2,9 +2,9 @@ package jsconsumer // Selly ... var Selly = struct { - PushNotification string - UpdateSellerStatistic string + PushNotification string + UpdateSellerAffiliateStatistic string }{ - PushNotification: "PULL_PUSH_NOTIFICATION", - UpdateSellerStatistic: "PULL_UPDATE_SELLER_STATISTIC", + PushNotification: "PULL_PUSH_NOTIFICATION", + UpdateSellerAffiliateStatistic: "PULL_UPDATE_SELLER_AFFILIATE_STATISTIC", } diff --git a/js/subject/selly.go b/js/subject/selly.go index 204e781..71ca355 100644 --- a/js/subject/selly.go +++ b/js/subject/selly.go @@ -11,9 +11,9 @@ func getSellyValue(val string) string { // Selly ... var Selly = struct { - PushNotification string - UpdateSellerStatistic string + PushNotification string + UpdateSellerAffiliateStatistic string }{ - PushNotification: getSellyValue("push_notifications"), - UpdateSellerStatistic: getSellyValue("update_seller_statistic"), + PushNotification: getSellyValue("push_notifications"), + UpdateSellerAffiliateStatistic: getSellyValue("update_seller_affiliate_statistic"), } From dcea3798f881cc096b5c6c3e51cad6d186e58ea6 Mon Sep 17 00:00:00 2001 From: Nguyen Minh Date: Fri, 23 Sep 2022 23:32:23 +0700 Subject: [PATCH 20/23] js cashflow seller --- js/consumer/selly.go | 2 ++ js/model/selly.go | 23 +++++++++++++++++++++++ js/subject/selly.go | 2 ++ 3 files changed, 27 insertions(+) diff --git a/js/consumer/selly.go b/js/consumer/selly.go index 0305c7c..975cb5b 100644 --- a/js/consumer/selly.go +++ b/js/consumer/selly.go @@ -4,7 +4,9 @@ package jsconsumer var Selly = struct { PushNotification string UpdateSellerAffiliateStatistic string + CheckAnDInsertCashflowBySeller string }{ PushNotification: "PULL_PUSH_NOTIFICATION", UpdateSellerAffiliateStatistic: "PULL_UPDATE_SELLER_AFFILIATE_STATISTIC", + CheckAnDInsertCashflowBySeller: "PULL_CHECK_AND_INSERT_CASHFLOW_BY_SELLER", } diff --git a/js/model/selly.go b/js/model/selly.go index 412e62d..c521660 100644 --- a/js/model/selly.go +++ b/js/model/selly.go @@ -34,3 +34,26 @@ type SellerAffiliateStatistic struct { CommissionTransactionApproved float64 `json:"commissionTransactionApproved"` CommissionTransactionRejected float64 `json:"commissionTransactionRejected"` } + +// PayloadCashflowsBySeller ... +type PayloadCashflowsBySeller struct { + SellerID string `json:"sellerId"` + List []CashflowSeller `json:"list"` +} + +// CashflowSeller ... +type CashflowSeller struct { + Value float64 `json:"value"` + Action string `json:"action"` + Category string `json:"category"` + TargetID string `json:"targetId"` + TargetType string `json:"targetType"` + Options *CashFlowOptions `json:"options"` +} + +// CashFlowOptions ... +type CashFlowOptions struct { + AffiliateTransactionCode string `json:"affiliateTransactionCode,omitempty"` + AffiliateCampaignID string `json:"affiliateCampaignId,omitempty"` + AffiliateCampaignName string `json:"affiliateCampaignName,omitempty"` +} diff --git a/js/subject/selly.go b/js/subject/selly.go index 71ca355..2f665bb 100644 --- a/js/subject/selly.go +++ b/js/subject/selly.go @@ -13,7 +13,9 @@ func getSellyValue(val string) string { var Selly = struct { PushNotification string UpdateSellerAffiliateStatistic string + CheckAnDInsertCashflowBySeller string }{ PushNotification: getSellyValue("push_notifications"), UpdateSellerAffiliateStatistic: getSellyValue("update_seller_affiliate_statistic"), + CheckAnDInsertCashflowBySeller: getSellyValue("check_and_insert_cashflow_statistic"), } From 57d6cb18a9daf626b4e23200d62d6ec14bec4c45 Mon Sep 17 00:00:00 2001 From: Sinh Date: Wed, 28 Sep 2022 08:59:18 +0700 Subject: [PATCH 21/23] update global care - integrate car insurance --- model/warehouse_request.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/model/warehouse_request.go b/model/warehouse_request.go index b546725..5990487 100644 --- a/model/warehouse_request.go +++ b/model/warehouse_request.go @@ -17,6 +17,7 @@ type OutboundRequestPayload struct { // InsuranceOpts ... type InsuranceOpts struct { + InsuranceType string `json:"insuranceType"` VehicleTypeID string `json:"vehicleTypeId"` VehicleTypeName string `json:"vehicleTypeName"` InsuranceTypeID string `json:"insuranceTypeId"` @@ -25,6 +26,12 @@ type InsuranceOpts struct { Chassis string `json:"chassis"` Engine string `json:"engine"` BeginDate string `json:"beginDate"` + + // For car insurance + NumberOfSeatsCarOccupantAccidentInsurance int `json:"numberOfSeatsCarOccupantAccidentInsurance"` + NumberOfSeats int `json:"numberOfSeats"` + NumberOfSeatsOrTonnageId string `json:"numberOfSeatsOrTonnageId"` + NumberOfSeatsOrTonnageName string `json:"numberOfSeatsOrTonnageName"` } // OutboundRequestItem ... From e6b620ca6c97a067ca94f48d6187a50b0ccb52fc Mon Sep 17 00:00:00 2001 From: trunglt251292 Date: Fri, 30 Sep 2022 10:29:14 +0700 Subject: [PATCH 22/23] CommissionTransactionPending --- js/model/selly.go | 1 + 1 file changed, 1 insertion(+) diff --git a/js/model/selly.go b/js/model/selly.go index c521660..a8e0a60 100644 --- a/js/model/selly.go +++ b/js/model/selly.go @@ -32,6 +32,7 @@ type SellerAffiliateStatistic struct { CommissionTransactionTotal float64 `json:"commissionTransactionTotal"` CommissionTransactionCashback float64 `json:"commissionTransactionCashback"` CommissionTransactionApproved float64 `json:"commissionTransactionApproved"` + CommissionTransactionPending float64 `json:"commissionTransactionPending"` CommissionTransactionRejected float64 `json:"commissionTransactionRejected"` } From aab1103fc809404f66b571f60802ed78ac6eb82a Mon Sep 17 00:00:00 2001 From: Sinh Date: Fri, 30 Sep 2022 10:32:33 +0700 Subject: [PATCH 23/23] define warehouse method --- client/warehouse.go | 19 +++++++++++++++++++ model/warehouse_request.go | 11 +++++++++++ model/warehouse_response.go | 27 +++++++++++++++++++++++++++ subject/warehouse.go | 2 ++ 4 files changed, 59 insertions(+) diff --git a/client/warehouse.go b/client/warehouse.go index fdb70b8..5ae07db 100644 --- a/client/warehouse.go +++ b/client/warehouse.go @@ -144,3 +144,22 @@ func (w Warehouse) GetConfigByWarehouseID(warehouseID string) (*model.WarehouseC } return r.Data, nil } + +// GetWarehouses ... +func (w Warehouse) GetWarehouses(p model.GetWarehousesRequest) (*model.GetWarehousesResponse, error) { + msg, err := natsio.GetServer().Request(subject.Warehouse.GetWarehouses, toBytes(p)) + if err != nil { + return nil, err + } + var r struct { + Data *model.GetWarehousesResponse `json:"data"` + Error string `json:"error"` + } + if err = json.Unmarshal(msg.Data, &r); err != nil { + return nil, err + } + if r.Error != "" { + return nil, errors.New(r.Error) + } + return r.Data, nil +} diff --git a/model/warehouse_request.go b/model/warehouse_request.go index b546725..fc52b78 100644 --- a/model/warehouse_request.go +++ b/model/warehouse_request.go @@ -80,3 +80,14 @@ type SupplierIsClosed struct { Supplier string `json:"supplier"` IsClosed bool `json:"isClosed"` } + +// GetWarehousesRequest ... +type GetWarehousesRequest struct { + Keyword string `json:"keyword"` + Status string `json:"status"` + Supplier string `json:"supplier"` + BusinessType string `json:"businessType"` + + Page int64 `json:"page"` + Limit int64 `json:"limit"` +} diff --git a/model/warehouse_response.go b/model/warehouse_response.go index f2d60a9..88ba2f1 100644 --- a/model/warehouse_response.go +++ b/model/warehouse_response.go @@ -135,3 +135,30 @@ type WarehouseNatsResponse struct { CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` } + +// WarehouseInfo ... +type WarehouseInfo struct { + ID string `json:"_id"` + Name string `json:"name"` + BusinessType string `json:"businessType"` + Status string `json:"status"` + Slug string `json:"slug"` + Supplier WarehouseSupplierInfo `json:"supplier"` + Location ResponseWarehouseLocation `json:"location"` + Contact ResponseWarehouseContact `json:"contact"` + CreatedAt string `json:"createdAt"` + UpdatedAt string `json:"updatedAt"` +} + +// WarehouseSupplierInfo ... +type WarehouseSupplierInfo struct { + ID string `json:"_id"` + Name string `json:"name"` +} + +// GetWarehousesResponse ... +type GetWarehousesResponse struct { + Total int64 `json:"total"` + Limit int64 `json:"limit"` + List []WarehouseInfo `json:"list"` +} diff --git a/subject/warehouse.go b/subject/warehouse.go index a0480ae..378e1a8 100644 --- a/subject/warehouse.go +++ b/subject/warehouse.go @@ -21,6 +21,7 @@ var Warehouse = struct { AfterUpdateWarehouse string AfterCreateWarehouse string UpdateIsClosedSupplier string + GetWarehouses string }{ AfterCreateWarehouse: getWarehouseValue("after_create_warehouse"), AfterUpdateWarehouse: getWarehouseValue("after_update_warehouse"), @@ -36,4 +37,5 @@ var Warehouse = struct { Distinct: getWarehouseValue("distinct"), Count: getWarehouseValue("count"), UpdateIsClosedSupplier: getWarehouseValue("update_is_closed_supplier"), + GetWarehouses: getWarehouseValue("get_warehouses"), }