From 7e433426cbf4c60151034a58a14dc2f5f121f42d Mon Sep 17 00:00:00 2001 From: Tue Date: Tue, 8 Nov 2022 14:02:07 +0700 Subject: [PATCH] build auth sms --- model/withdraw_request.go | 5 +++++ model/withdraw_response.go | 7 +++++++ subject/withdraw.go | 13 +++++++++++++ 3 files changed, 25 insertions(+) create mode 100644 model/withdraw_request.go create mode 100644 model/withdraw_response.go create mode 100644 subject/withdraw.go diff --git a/model/withdraw_request.go b/model/withdraw_request.go new file mode 100644 index 0000000..7eb4a3f --- /dev/null +++ b/model/withdraw_request.go @@ -0,0 +1,5 @@ +package model + +type WithdrawSupplierCashReq struct { + SupplierID string `json:"supplierId"` +} diff --git a/model/withdraw_response.go b/model/withdraw_response.go new file mode 100644 index 0000000..9c5adc5 --- /dev/null +++ b/model/withdraw_response.go @@ -0,0 +1,7 @@ +package model + +type WithdrawSupplierCashRes struct { + PendingCash float64 `json:"pendingCash"` + SuccessCash float64 `json:"successCash"` + RejectCash float64 `json:"rejectCash"` +} diff --git a/subject/withdraw.go b/subject/withdraw.go new file mode 100644 index 0000000..08f9a87 --- /dev/null +++ b/subject/withdraw.go @@ -0,0 +1,13 @@ +package subject + +import "fmt" + +func getWithdrawValue(val string) string { + return fmt.Sprintf("%s.%s", prefixes.Withdraw, val) +} + +var Withdraw = struct { + GetSupplierCash string +}{ + GetSupplierCash: getWithdrawValue("get_supplier_cash"), +}