Documentation ¶
Index ¶
- Constants
- func Connect(settings db.ConnectionURL, conns int) error
- func InsertHistory(userID int64, describe string) error
- func InsertWithdraw(userID int64, to, assetID string, amount, fee uint32) (int64, error)
- func UpdateWithdraw(orderID int64, status WithdrawStatus, reason *string) error
- func UpdateWithdrawFee(orderID int64, fee uint32) error
- type History
- type Withdraw
- type WithdrawStatus
Constants ¶
View Source
const HistoryTableName = "history"
HistoryTableName 数据库表名
View Source
const WithdrawTableName = "withdraw"
WithdrawTableName 数据库表名
Variables ¶
This section is empty.
Functions ¶
func InsertWithdraw ¶
InsertWithdraw 插入提现记录
func UpdateWithdraw ¶
func UpdateWithdraw(orderID int64, status WithdrawStatus, reason *string) error
UpdateWithdraw 更新提现记录
func UpdateWithdrawFee ¶
UpdateWithdrawFee 更新手续费
Types ¶
type History ¶
type History struct { UserID int64 `db:"user_id"` // 用户ID Describe string `db:"describe"` // 描述信息 InsertedAt time.Time `db:"inserted_at"` // 插入日期 }
History 历史记录
type Withdraw ¶
type Withdraw struct { OrderID int64 `db:"id"` // 订单ID UserID int64 `db:"user_id"` // 用户ID To string `db:"to"` // 帐户名 AssetID string `db:"asset_id"` // 资产ID Amount uint32 `db:"amount"` // 资产金额(分) Fee uint32 `db:"fee"` // 手续费用(分) Real uint32 `db:"real"` // 真实手续费(分) Status WithdrawStatus `db:"status"` // 提现状态 Reason *string `db:"reason,omitempty"` // 错误原因 InsertedAt time.Time `db:"inserted_at"` // 插入日期 }
Withdraw 提现记录
func GetWithdrawOrder ¶
GetWithdrawOrder 获取提现订单
type WithdrawStatus ¶
type WithdrawStatus int
WithdrawStatus 提现状态
const ( // WithdrawStatusWaiting 等待提现 WithdrawStatusWaiting WithdrawStatus // WithdrawStatusProcessing 正在提现 WithdrawStatusProcessing // WithdrawStatusSuccessful 提现成功 WithdrawStatusSuccessful // WithdrawStatusFailure 提现失败 WithdrawStatusFailure )
Click to show internal directories.
Click to hide internal directories.