From 99894963e61c5b58ae6103ab48c510682ecd2c69 Mon Sep 17 00:00:00 2001 From: tuannt20 <105765641+tuannt20@users.noreply.github.com> Date: Mon, 5 Dec 2022 12:04:43 +0700 Subject: [PATCH 1/2] add response --- model/campaign_response.go | 39 ++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/model/campaign_response.go b/model/campaign_response.go index db8a90b..9619035 100644 --- a/model/campaign_response.go +++ b/model/campaign_response.go @@ -11,22 +11,24 @@ type ResponseCampaignTransactionAll struct { // ResponseNatsCampaignTransaction ... type ResponseNatsCampaignTransaction struct { - ID string `json:"_id"` - Cash float64 `json:"cash"` - Campaign ResponseCampaignShortInfo `json:"campaign"` - Options ResponseCampaignTransactionOptions `json:"options"` - Seller primitive.ObjectID `json:"seller"` - Type string `json:"type"` - Status string `json:"status"` - RejectedReason string `json:"rejectedReason"` - CreatedAt string `json:"createdAt"` - UpdatedAt string `json:"updatedAt"` - Item *ResponseCampaignItemShortInfo `json:"item"` - ApprovedBy primitive.ObjectID `json:"approvedBy,omitempty"` - RejectedBy primitive.ObjectID `json:"rejectedBy,omitempty"` - ApprovedAt string `json:"approvedAt,omitempty"` - RejectedAt string `json:"rejectedAt,omitempty"` - CompletedAt string `json:"completedAt,omitempty"` + ID string `json:"_id"` + Cash float64 `json:"cash"` + Campaign ResponseCampaignShortInfo `json:"campaign"` + Options ResponseCampaignTransactionOptions `json:"options"` + Seller primitive.ObjectID `json:"seller"` + Type string `json:"type"` + Status string `json:"status"` + RejectedReason string `json:"rejectedReason"` + CreatedAt string `json:"createdAt"` + UpdatedAt string `json:"updatedAt"` + Item *ResponseCampaignItemShortInfo `json:"item"` + ApprovedBy primitive.ObjectID `json:"approvedBy,omitempty"` + RejectedBy primitive.ObjectID `json:"rejectedBy,omitempty"` + ApprovedAt string `json:"approvedAt,omitempty"` + RejectedAt string `json:"rejectedAt,omitempty"` + CompletedAt string `json:"completedAt,omitempty"` + RejectReason string `json:"rejectReason,omitempty"` + AdminConfirmData *ResponseCampaignTransactionAdminConfirmData `json:"adminConfirmData,omitempty"` } // ResponseCampaignShortInfo ... @@ -50,3 +52,8 @@ type ResponseCampaignTransactionOptions struct { Milestone int64 `json:"milestone"` MilestoneTitle string `json:"milestoneTitle"` } + +// ResponseCampaignTransactionAdminConfirmData ... +type ResponseCampaignTransactionAdminConfirmData struct { + FriendPublicTotal int64 `json:"friendPublicTotal"` +} -- 2.34.1 From aa3a201b1819006dc786a4b788adf6d58c03b609 Mon Sep 17 00:00:00 2001 From: anbuiselly <105765792+anbuiselly@users.noreply.github.com> Date: Mon, 12 Dec 2022 14:07:28 +0700 Subject: [PATCH 2/2] edit response warehouse --- model/warehouse_response.go | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/model/warehouse_response.go b/model/warehouse_response.go index c667290..79b02c4 100644 --- a/model/warehouse_response.go +++ b/model/warehouse_response.go @@ -129,19 +129,21 @@ type ResponseLatLng struct { // WarehouseNatsResponse ... 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"` - Status string `json:"status"` - Supplier string `json:"supplier"` - Contact ResponseWarehouseContact `json:"contact"` - Location ResponseWarehouseLocation `json:"location"` - Configurations WarehouseConfiguration `json:"configurations"` - CreatedAt time.Time `json:"createdAt"` - UpdatedAt time.Time `json:"updatedAt"` + ID string `json:"_id"` + Staff string `json:"staff"` + BusinessType string `json:"businessType"` + Name string `json:"name"` + SearchString string `json:"searchString"` + Slug string `json:"slug"` + Status string `json:"status"` + Supplier string `json:"supplier"` + Contact ResponseWarehouseContact `json:"contact"` + Location ResponseWarehouseLocation `json:"location"` + Configurations WarehouseConfiguration `json:"configurations"` + CreatedAt time.Time `json:"createdAt"` + UpdatedAt time.Time `json:"updatedAt"` + IsPendingActive bool `json:"isPendingActive"` + ReasonPendingInactive string `json:"reasonPendingInactive"` } // WarehouseInfo ... -- 2.34.1