From 5ca473ffc1e3d8bf3402b464c0c15b3179d9a251 Mon Sep 17 00:00:00 2001 From: Sinh Date: Fri, 26 Aug 2022 10:28:49 +0700 Subject: [PATCH 01/10] define model --- model/warehouse_request.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/model/warehouse_request.go b/model/warehouse_request.go index 5612532..51bc667 100644 --- a/model/warehouse_request.go +++ b/model/warehouse_request.go @@ -12,6 +12,19 @@ type OutboundRequestPayload struct { TPLCode string `json:"tplCode"` Customer CustomerInfo `json:"customer"` Items []OutboundRequestItem `json:"items"` + Insurance *InsuranceOpts +} + +// InsuranceOpts ... +type InsuranceOpts struct { + VehicleTypeID string `json:"vehicleTypeId"` + VehicleTypeName string `json:"vehicleTypeName"` + InsuranceTypeID string `json:"insuranceTypeId"` + YearsOfInsurance int `json:"yearsOfInsurance"` + License string `json:"license"` + Chassis string `json:"chassis"` + Engine string `json:"engine"` + BeginDate string `json:"beginDate"` } // OutboundRequestItem ... @@ -25,6 +38,7 @@ type OutboundRequestItem struct { type CustomerInfo struct { Name string `json:"name"` PhoneNumber string `json:"phoneNumber"` + Email string `json:"email"` Address AddressDetail `json:"address"` } -- 2.34.1 From 43aa67fa2e6ccd6dbb3a8f4ea9631d21c78bc568 Mon Sep 17 00:00:00 2001 From: Sinh Date: Mon, 29 Aug 2022 15:55:17 +0700 Subject: [PATCH 02/10] update GC --- model/order_request.go | 9 +++++---- model/warehouse_request.go | 6 ++++++ model/warehouse_response.go | 8 ++++++++ subject/communication.go | 12 ++++-------- subject/order.go | 6 ++---- subject/warehouse.go | 6 ++++++ 6 files changed, 31 insertions(+), 16 deletions(-) diff --git a/model/order_request.go b/model/order_request.go index da9d4fe..f8dfde0 100644 --- a/model/order_request.go +++ b/model/order_request.go @@ -2,10 +2,11 @@ package model // OrderUpdateORStatus ... type OrderUpdateORStatus struct { - OrderCode string `json:"orderCode"` - ORCode string `json:"orCode"` - Status string `json:"status"` - Reason string `json:"reason"` + OrderCode string `json:"orderCode"` + ORCode string `json:"orCode"` + Status string `json:"status"` + DeliveryStatus string `json:"deliveryStatus"` + Reason string `json:"reason"` } // OrderCancelDelivery ... diff --git a/model/warehouse_request.go b/model/warehouse_request.go index 51bc667..f63b135 100644 --- a/model/warehouse_request.go +++ b/model/warehouse_request.go @@ -63,3 +63,9 @@ type CancelOutboundRequest struct { ORCode string `json:"orCode"` Note string `json:"note"` } + +// SyncORStatusRequest ... +type SyncORStatusRequest struct { + ORCode string `json:"orCode"` + OrderCode string `json:"orderCode"` +} diff --git a/model/warehouse_response.go b/model/warehouse_response.go index 493a921..cb78ae0 100644 --- a/model/warehouse_response.go +++ b/model/warehouse_response.go @@ -59,3 +59,11 @@ type WarehousePartner struct { Enabled bool `json:"enabled"` Authentication string `json:"authentication"` } + +// SyncORStatusResponse ... +type SyncORStatusResponse struct { + ORCode string `json:"orCode"` + OrderCode string `json:"orderCode"` + Status string `json:"status"` + DeliveryStatus string `json:"deliveryStatus"` +} diff --git a/subject/communication.go b/subject/communication.go index bcbbe31..80926f2 100644 --- a/subject/communication.go +++ b/subject/communication.go @@ -7,13 +7,9 @@ func getCommunicationValue(val string) string { } var Communication = struct { - RequestHTTP string - ResponseHTTP string - WebhookTNC string - WebhookGlobalCare string + RequestHTTP string + ResponseHTTP string }{ - RequestHTTP: getCommunicationValue("request_http"), - ResponseHTTP: getCommunicationValue("response_http"), - WebhookTNC: getCommunicationValue("webhook_tnc"), - WebhookGlobalCare: getCommunicationValue("webhook_global_care"), + RequestHTTP: getCommunicationValue("request_http"), + ResponseHTTP: getCommunicationValue("response_http"), } diff --git a/subject/order.go b/subject/order.go index 846cee5..309f76f 100644 --- a/subject/order.go +++ b/subject/order.go @@ -7,10 +7,8 @@ func getOrderValue(val string) string { } var Order = struct { - UpdateORStatus string - CancelDelivery string - WebhookTNC string - WebhookGlobalCare string + UpdateORStatus string + CancelDelivery string }{ UpdateORStatus: getOrderValue("update_outbound_request_status"), CancelDelivery: getOrderValue("cancel_delivery"), diff --git a/subject/warehouse.go b/subject/warehouse.go index b0801b9..b6e5878 100644 --- a/subject/warehouse.go +++ b/subject/warehouse.go @@ -11,9 +11,15 @@ var Warehouse = struct { UpdateOutboundRequestLogistic string CancelOutboundRequest string GetConfiguration string + SyncORStatus string + WebhookTNC string + WebhookGlobalCare string }{ CreateOutboundRequest: getWarehouseValue("create_outbound_request"), UpdateOutboundRequestLogistic: getWarehouseValue("update_outbound_request_logistic_info"), CancelOutboundRequest: getWarehouseValue("cancel_outbound_request"), GetConfiguration: getWarehouseValue("get_configuration"), + SyncORStatus: getWarehouseValue("sync_or_status"), + WebhookTNC: getWarehouseValue("webhook_tnc"), + WebhookGlobalCare: getWarehouseValue("webhook_global_care"), } -- 2.34.1 From 01c28e1ee3f1b0e17e282d6bcc2210b6c6ba7be1 Mon Sep 17 00:00:00 2001 From: Sinh Date: Tue, 30 Aug 2022 15:55:20 +0700 Subject: [PATCH 03/10] add err log --- server_reqres.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server_reqres.go b/server_reqres.go index 841f9ef..8979ab0 100644 --- a/server_reqres.go +++ b/server_reqres.go @@ -18,7 +18,11 @@ func (sv Server) Request(subject string, payload []byte) (*nats.Msg, error) { if sv.Config.RequestTimeout > 0 { timeout = sv.Config.RequestTimeout } - return sv.instance.Request(subject, payload, timeout) + msg, err := sv.instance.Request(subject, payload, timeout) + if errors.Is(err, nats.ErrNoResponders) { + log.Printf("[NATS SERVER]: request - no responders for subject: %s", subject) + } + return msg, err } // Reply ... -- 2.34.1 From 12afbd81fe117b9ca644544f205402f0dc8e944e Mon Sep 17 00:00:00 2001 From: Sinh Date: Wed, 31 Aug 2022 10:53:51 +0700 Subject: [PATCH 04/10] add order func --- client/order.go | 16 ++++++++++++++++ model/common_request.go | 5 +++++ model/order_request.go | 7 +++++++ subject/order.go | 10 ++++++---- 4 files changed, 34 insertions(+), 4 deletions(-) diff --git a/client/order.go b/client/order.go index 4379747..5400f52 100644 --- a/client/order.go +++ b/client/order.go @@ -50,3 +50,19 @@ func (o Order) CancelDelivery(p model.OrderCancelDelivery) error { } return nil } + +// ChangeDeliveryStatus ... +func (o Order) ChangeDeliveryStatus(p model.OrderChangeDeliveryStatus) error { + msg, err := natsio.GetServer().Request(subject.Order.ChangeDeliveryStatus, toBytes(p)) + if err != nil { + return err + } + var r model.CommonResponseData + if err = json.Unmarshal(msg.Data, &r); err != nil { + return err + } + if r.Error != "" { + return errors.New(r.Error) + } + return nil +} diff --git a/model/common_request.go b/model/common_request.go index 4d6a719..0ce5163 100644 --- a/model/common_request.go +++ b/model/common_request.go @@ -15,3 +15,8 @@ type DistinctWithField struct { Conditions interface{} `json:"conditions"` Filed string `json:"filed"` } + +type ActionBy struct { + ID string `json:"id"` + Name string `json:"name"` +} diff --git a/model/order_request.go b/model/order_request.go index f8dfde0..553d870 100644 --- a/model/order_request.go +++ b/model/order_request.go @@ -13,3 +13,10 @@ type OrderUpdateORStatus struct { type OrderCancelDelivery struct { OrderID string `json:"orderId"` } + +// OrderChangeDeliveryStatus ... +type OrderChangeDeliveryStatus struct { + OrderID string `json:"orderId"` + DeliveryStatus string `json:"deliveryStatus"` + ActionBy ActionBy `json:"actionBy"` +} diff --git a/subject/order.go b/subject/order.go index 309f76f..7ba7886 100644 --- a/subject/order.go +++ b/subject/order.go @@ -7,9 +7,11 @@ func getOrderValue(val string) string { } var Order = struct { - UpdateORStatus string - CancelDelivery string + UpdateORStatus string + CancelDelivery string + ChangeDeliveryStatus string }{ - UpdateORStatus: getOrderValue("update_outbound_request_status"), - CancelDelivery: getOrderValue("cancel_delivery"), + UpdateORStatus: getOrderValue("update_outbound_request_status"), + CancelDelivery: getOrderValue("cancel_delivery"), + ChangeDeliveryStatus: getOrderValue("change_delivery_status"), } -- 2.34.1 From 9295a8e13f9181cc4546151114f7e1edb387d4e1 Mon Sep 17 00:00:00 2001 From: nguyenphamquangtue <44862367+nguyenphamquangtue@users.noreply.github.com> Date: Wed, 31 Aug 2022 14:48:24 +0700 Subject: [PATCH 05/10] Intergrate model for supplier (#15) * build nats supplier * build nats supplier * build nats supplier * build nats supplier --- client/supplier.go | 21 +++++++++++++++++++++ model/supplier_request.go | 10 ++++++++++ model/supplier_response.go | 14 ++++++++++++++ subject/supplier.go | 2 ++ 4 files changed, 47 insertions(+) diff --git a/client/supplier.go b/client/supplier.go index 5b4881a..700d714 100644 --- a/client/supplier.go +++ b/client/supplier.go @@ -58,3 +58,24 @@ func (s Supplier) GetSupplierContractBySupplierID(p model.GetSupplierContractReq return r.Data, nil } + +func (s Supplier) FindAll(supplierID model.SupplierRequestPayload) (*model.SupplierAll, error) { + msg, err := natsio.GetServer().Request(subject.Supplier.FindAll, toBytes(supplierID)) + if err != nil { + return nil, err + } + + var r struct { + Data *model.SupplierAll `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/supplier_request.go b/model/supplier_request.go index 8372569..04d15d5 100644 --- a/model/supplier_request.go +++ b/model/supplier_request.go @@ -12,3 +12,13 @@ type GetSupplierRequest struct { type GetSupplierContractRequest struct { SupplierID primitive.ObjectID `json:"supplierID"` } + +// SupplierRequestPayload ... +type SupplierRequestPayload struct { + Limit int + Page int + Keyword string + Status string + PIC string + ContractStatus string +} diff --git a/model/supplier_response.go b/model/supplier_response.go index da33a9f..a87a29e 100644 --- a/model/supplier_response.go +++ b/model/supplier_response.go @@ -13,3 +13,17 @@ type ResponseSupplierContract struct { Name string `json:"name"` Status string `json:"status"` } + +// SupplierBrief ... +type SupplierBrief struct { + ID string `json:"_id"` + Name string `json:"name"` + Status string `json:"status"` + CreatedAt string `json:"createdAt"` + UpdatedAt string `json:"updatedAt"` +} + +type SupplierAll struct { + Suppliers []SupplierBrief `json:"suppliers"` + Total int64 `json:"total"` +} diff --git a/subject/supplier.go b/subject/supplier.go index b2505cf..17ca8d0 100644 --- a/subject/supplier.go +++ b/subject/supplier.go @@ -9,7 +9,9 @@ func getSupplierValue(val string) string { var Supplier = struct { GetListSupplierInfo string GetSupplierContractBySupplierID string + FindAll string }{ GetListSupplierInfo: getSupplierValue("get_list_supplier_info"), GetSupplierContractBySupplierID: getSupplierValue("get_supplier_contract_by_supplier_id"), + FindAll: getSupplierValue("find_all"), } -- 2.34.1 From af6e0843b90cdc5b4985837d90d8e62246f0ff88 Mon Sep 17 00:00:00 2001 From: Sinh Date: Tue, 6 Sep 2022 11:09:52 +0700 Subject: [PATCH 06/10] update order OR model --- model/order_request.go | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/model/order_request.go b/model/order_request.go index 553d870..2bba161 100644 --- a/model/order_request.go +++ b/model/order_request.go @@ -2,11 +2,12 @@ package model // OrderUpdateORStatus ... type OrderUpdateORStatus struct { - OrderCode string `json:"orderCode"` - ORCode string `json:"orCode"` - Status string `json:"status"` - DeliveryStatus string `json:"deliveryStatus"` - Reason string `json:"reason"` + OrderCode string `json:"orderCode"` + ORCode string `json:"orCode"` + Status string `json:"status"` + DeliveryStatus string `json:"deliveryStatus"` + Reason string `json:"reason"` + Data OrderORData `json:"data"` } // OrderCancelDelivery ... @@ -20,3 +21,8 @@ type OrderChangeDeliveryStatus struct { DeliveryStatus string `json:"deliveryStatus"` ActionBy ActionBy `json:"actionBy"` } + +// OrderORData ... +type OrderORData struct { + Link string `json:"link"` +} -- 2.34.1 From 367dc7edd979e79712ffb9cd653fff4bf465dabf Mon Sep 17 00:00:00 2001 From: Sinh Date: Wed, 7 Sep 2022 12:00:40 +0700 Subject: [PATCH 07/10] add order func --- client/order.go | 16 ++++++++++++++++ model/order_request.go | 7 +++++++ subject/order.go | 14 ++++++++------ 3 files changed, 31 insertions(+), 6 deletions(-) diff --git a/client/order.go b/client/order.go index 5400f52..8834495 100644 --- a/client/order.go +++ b/client/order.go @@ -66,3 +66,19 @@ func (o Order) ChangeDeliveryStatus(p model.OrderChangeDeliveryStatus) error { } return nil } + +// UpdateLogisticInfoFailed ... +func (o Order) UpdateLogisticInfoFailed(p model.OrderUpdateLogisticInfoFailed) error { + msg, err := natsio.GetServer().Request(subject.Order.UpdateLogisticInfoFailed, toBytes(p)) + if err != nil { + return err + } + var r model.CommonResponseData + if err = json.Unmarshal(msg.Data, &r); err != nil { + return err + } + if r.Error != "" { + return errors.New(r.Error) + } + return nil +} diff --git a/model/order_request.go b/model/order_request.go index 2bba161..48bbb79 100644 --- a/model/order_request.go +++ b/model/order_request.go @@ -26,3 +26,10 @@ type OrderChangeDeliveryStatus struct { type OrderORData struct { Link string `json:"link"` } + +// OrderUpdateLogisticInfoFailed ... +type OrderUpdateLogisticInfoFailed struct { + OrderID string `json:"orderId"` + ORCode string `json:"orCode"` + Reason string `json:"reason"` +} diff --git a/subject/order.go b/subject/order.go index 7ba7886..40f190e 100644 --- a/subject/order.go +++ b/subject/order.go @@ -7,11 +7,13 @@ func getOrderValue(val string) string { } var Order = struct { - UpdateORStatus string - CancelDelivery string - ChangeDeliveryStatus string + UpdateORStatus string + CancelDelivery string + ChangeDeliveryStatus string + UpdateLogisticInfoFailed string }{ - UpdateORStatus: getOrderValue("update_outbound_request_status"), - CancelDelivery: getOrderValue("cancel_delivery"), - ChangeDeliveryStatus: getOrderValue("change_delivery_status"), + UpdateORStatus: getOrderValue("update_outbound_request_status"), + CancelDelivery: getOrderValue("cancel_delivery"), + ChangeDeliveryStatus: getOrderValue("change_delivery_status"), + UpdateLogisticInfoFailed: getOrderValue("update_logistic_info_failed"), } -- 2.34.1 From 9b40f5f9ba519d08d818ec01e81a67f00557b474 Mon Sep 17 00:00:00 2001 From: phuanbui Date: Wed, 7 Sep 2022 14:01:29 +0700 Subject: [PATCH 08/10] fix get-location-warehouse --- client/location.go | 68 ++++++++++++++++++++++++++++++++++++++ model/location_request.go | 15 +++++++++ model/location_response.go | 15 +++++++++ subject/location.go | 10 ++++-- 4 files changed, 106 insertions(+), 2 deletions(-) diff --git a/client/location.go b/client/location.go index 7fc3474..2e8d30e 100644 --- a/client/location.go +++ b/client/location.go @@ -17,6 +17,7 @@ func GetLocation() Location { return Location{} } +// GetLocationByCode ... func (l Location) GetLocationByCode(payload model.LocationRequestPayload) (*model.ResponseLocationAddress, error) { msg, err := natsio.GetServer().Request(subject.Location.GetLocationByCode, toBytes(payload)) if err != nil { @@ -36,3 +37,70 @@ func (l Location) GetLocationByCode(payload model.LocationRequestPayload) (*mode } return r.Data, nil } + +// GetProvincesByCodes ... ... +func (l Location) GetProvincesByCodes(p model.ProvinceRequestPayload) (*model.LocationProvinceResponse, error) { + msg, err := natsio.GetServer().Request(subject.Location.GetProvincesByCodes, toBytes(p)) + if err != nil { + return nil, err + } + + var r struct { + Data *model.LocationProvinceResponse `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 +} + +// GetDistrictsByCodes ... +func (l Location) GetDistrictsByCodes(p model.DistrictRequestPayload) (*model.LocationDistrictResponse, error) { + msg, err := natsio.GetServer().Request(subject.Location.GetDistrictsByCodes, toBytes(p)) + if err != nil { + return nil, err + } + var r struct { + Data *model.LocationDistrictResponse `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 +} + +// GetWardsByCodes ... +func (l Location) GetWardsByCodes(p model.WardRequestPayload) (*model.LocationWardResponse, error) { + msg, err := natsio.GetServer().Request(subject.Location.GetWardsByCodes, toBytes(p)) + if err != nil { + return nil, err + } + + var r struct { + Data *model.LocationWardResponse `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/location_request.go b/model/location_request.go index e6781ca..0d55d1d 100644 --- a/model/location_request.go +++ b/model/location_request.go @@ -6,3 +6,18 @@ type LocationRequestPayload struct { District int `json:"district"` Ward int `json:"ward"` } + +// ProvinceRequestPayload ... +type ProvinceRequestPayload struct { + Codes []int `json:"Codes"` +} + +// DistrictRequestPayload ... +type DistrictRequestPayload struct { + Codes []int `json:"Codes"` +} + +// WardRequestPayload ... +type WardRequestPayload struct { + Codes []int `json:"Codes"` +} diff --git a/model/location_response.go b/model/location_response.go index 436d1f7..49e3cbd 100644 --- a/model/location_response.go +++ b/model/location_response.go @@ -26,3 +26,18 @@ type LocationWard struct { Name string `json:"name"` Code int `json:"code"` } + +// LocationProvinceResponse ... +type LocationProvinceResponse struct { + Province []LocationProvince `json:"province"` +} + +// LocationDistrictResponse ... +type LocationDistrictResponse struct { + District []LocationDistrict `json:"district"` +} + +// LocationWardResponse ... +type LocationWardResponse struct { + Ward []LocationWard `json:"ward"` +} diff --git a/subject/location.go b/subject/location.go index 1989df3..22141ad 100644 --- a/subject/location.go +++ b/subject/location.go @@ -7,7 +7,13 @@ func getLocationValue(val string) string { } var Location = struct { - GetLocationByCode string + GetLocationByCode string + GetProvincesByCodes string + GetDistrictsByCodes string + GetWardsByCodes string }{ - GetLocationByCode: getLocationValue("get_location_warehouse"), + GetLocationByCode: getLocationValue("get_location_warehouse"), + GetProvincesByCodes: getLocationValue("get_provinces_warehouse"), + GetDistrictsByCodes: getLocationValue("get_districts_warehouse"), + GetWardsByCodes: getLocationValue("get_wards_warehouse"), } -- 2.34.1 From 218123ccfbd1ac6a8233446139c4de4edd8cae8f Mon Sep 17 00:00:00 2001 From: phuanbui Date: Wed, 7 Sep 2022 14:10:23 +0700 Subject: [PATCH 09/10] fix --- model/location_request.go | 6 +++--- model/location_response.go | 6 +++--- subject/location.go | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/model/location_request.go b/model/location_request.go index 0d55d1d..4533db7 100644 --- a/model/location_request.go +++ b/model/location_request.go @@ -9,15 +9,15 @@ type LocationRequestPayload struct { // ProvinceRequestPayload ... type ProvinceRequestPayload struct { - Codes []int `json:"Codes"` + Codes []int `json:"codes"` } // DistrictRequestPayload ... type DistrictRequestPayload struct { - Codes []int `json:"Codes"` + Codes []int `json:"codes"` } // WardRequestPayload ... type WardRequestPayload struct { - Codes []int `json:"Codes"` + Codes []int `json:"codes"` } diff --git a/model/location_response.go b/model/location_response.go index 49e3cbd..484d89e 100644 --- a/model/location_response.go +++ b/model/location_response.go @@ -29,15 +29,15 @@ type LocationWard struct { // LocationProvinceResponse ... type LocationProvinceResponse struct { - Province []LocationProvince `json:"province"` + Provinces []LocationProvince `json:"provinces"` } // LocationDistrictResponse ... type LocationDistrictResponse struct { - District []LocationDistrict `json:"district"` + Districts []LocationDistrict `json:"districts"` } // LocationWardResponse ... type LocationWardResponse struct { - Ward []LocationWard `json:"ward"` + Wards []LocationWard `json:"wards"` } diff --git a/subject/location.go b/subject/location.go index 22141ad..b19a59b 100644 --- a/subject/location.go +++ b/subject/location.go @@ -13,7 +13,7 @@ var Location = struct { GetWardsByCodes string }{ GetLocationByCode: getLocationValue("get_location_warehouse"), - GetProvincesByCodes: getLocationValue("get_provinces_warehouse"), - GetDistrictsByCodes: getLocationValue("get_districts_warehouse"), - GetWardsByCodes: getLocationValue("get_wards_warehouse"), + GetProvincesByCodes: getLocationValue("get_provinces_by_codes"), + GetDistrictsByCodes: getLocationValue("get_districts_by_codes"), + GetWardsByCodes: getLocationValue("get_wards_by_codes"), } -- 2.34.1 From 6059889551d4ef14608dac1c56f52ae30150f6ee Mon Sep 17 00:00:00 2001 From: trunglt251292 Date: Wed, 7 Sep 2022 17:03:29 +0700 Subject: [PATCH 10/10] [Update] WarehouseNatsResponse --- model/warehouse_response.go | 1 + 1 file changed, 1 insertion(+) diff --git a/model/warehouse_response.go b/model/warehouse_response.go index b19ade9..f394770 100644 --- a/model/warehouse_response.go +++ b/model/warehouse_response.go @@ -100,6 +100,7 @@ type ResponseLatLng struct { // WarehouseNatsResponse ... type WarehouseNatsResponse struct { ID string `json:"_id"` + Staff string `json:"staff"` Name string `json:"name"` SearchString string `json:"searchString"` Slug string `json:"slug"` -- 2.34.1