-
Notifications
You must be signed in to change notification settings - Fork 1
/
transactionsbody.go
51 lines (39 loc) · 1.03 KB
/
transactionsbody.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
package httpadapters
import "time"
type TransactionBody struct {
ID int `json:"id"`
AccountID int `json:"account_id"`
OperationType int `json:"operation_type_id"`
Amount float64 `json:"amount"`
EventDate time.Time `json:"event_date"`
}
func (tb *TransactionBody) GetID() int {
return tb.ID
}
func (tb *TransactionBody) GetAccountID() int {
return tb.AccountID
}
func (tb *TransactionBody) GetOperationType() int {
return tb.OperationType
}
func (tb *TransactionBody) GetAmount() float64 {
return tb.Amount
}
func (tb *TransactionBody) GetEventDate() time.Time {
return tb.EventDate
}
func (tb *TransactionBody) SetID(id int) {
tb.ID = id
}
func (tb *TransactionBody) SetAccountID(accountId int) {
tb.AccountID = accountId
}
func (tb *TransactionBody) SetOperationType(operationType int) {
tb.OperationType = operationType
}
func (tb *TransactionBody) SetAmount(amount float64) {
tb.Amount = amount
}
func (tb *TransactionBody) SetEventDate(date time.Time) {
tb.EventDate = date
}