mirror of
https://github.com/FJurmanovic/wallet-go-api.git
synced 2026-02-06 06:08:16 +00:00
added transaction status to model
This commit is contained in:
@@ -34,6 +34,7 @@ type TransactionEdit struct {
|
|||||||
WalletID string `json:"walletId" form:"walletId"`
|
WalletID string `json:"walletId" form:"walletId"`
|
||||||
TransactionTypeID string `json:"transactionTypeId" form:"transactionTypeId"`
|
TransactionTypeID string `json:"transactionTypeId" form:"transactionTypeId"`
|
||||||
TransactionDate time.Time `json:"transactionDate" form:"transactionDate"`
|
TransactionDate time.Time `json:"transactionDate" form:"transactionDate"`
|
||||||
|
TransactionStatusID string `json:"transactionStatusId" form:"transactionStatusId"`
|
||||||
Description string `json:"description" form:"description"`
|
Description string `json:"description" form:"description"`
|
||||||
Amount json.Number `json:"amount" form:"amount"`
|
Amount json.Number `json:"amount" form:"amount"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -158,6 +158,7 @@ func (as *TransactionService) Edit(ctx context.Context, body *models.Transaction
|
|||||||
tm.WalletID = body.WalletID
|
tm.WalletID = body.WalletID
|
||||||
tm.TransactionTypeID = body.TransactionTypeID
|
tm.TransactionTypeID = body.TransactionTypeID
|
||||||
tm.TransactionDate = body.TransactionDate
|
tm.TransactionDate = body.TransactionDate
|
||||||
|
tm.TransactionStatusID = body.TransactionStatusID
|
||||||
tm.Amount = float32(math.Round(amount*100) / 100)
|
tm.Amount = float32(math.Round(amount*100) / 100)
|
||||||
|
|
||||||
tx, _ := db.Begin()
|
tx, _ := db.Begin()
|
||||||
|
|||||||
Reference in New Issue
Block a user