-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodels.go
37 lines (33 loc) · 930 Bytes
/
models.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
package main
import "time"
// Trade trade model
type Trade struct {
TradeNo string `order:"0" header:"trade_no"`
AccountNo string `order:"1" header:"account_no"`
Type string `order:"2" header:"type"`
Amount float64 `order:"3" header:"amount"`
Terms int `order:"4" header:"terms"`
InterestRate float64 `order:"5" header:"interest_rate"`
TradeTime time.Time `order:"7" header:"trade_time"`
Status string `order:"6" header:"status"`
}
// RepayPlan repay plan model
type RepayPlan struct {
Id int64
AccountNo string
LoanNo string
Term int
Principal float64
Interest float64
InitDate time.Time
RepayDate time.Time
RepayState string
CreateTime time.Time
UpdateTime time.Time
}
// RepayPlanStats repay plan stats model
type RepayPlanStats struct {
Term int
TotalPrincipal float64
TotalInterest float64
}