mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-19 09:14:27 +08:00
add transaction statistics api
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package models
|
||||
|
||||
// TransactionStatisticRequest represents all parameters of transaction statistic request
|
||||
type TransactionStatisticRequest struct {
|
||||
StartTime int64 `form:"start_time" binding:"min=0"`
|
||||
EndTime int64 `form:"end_time" binding:"min=0"`
|
||||
}
|
||||
|
||||
// TransactionStatisticResponse represents an item of transaction overview
|
||||
type TransactionStatisticResponse struct {
|
||||
StartTime int64 `json:"startTime"`
|
||||
EndTime int64 `json:"endTime"`
|
||||
Items []*TransactionStatisticResponseItem `json:"items"`
|
||||
}
|
||||
|
||||
// TransactionStatisticResponseItem represents total amount item for an response
|
||||
type TransactionStatisticResponseItem struct {
|
||||
CategoryId int64 `json:"categoryId,string"`
|
||||
AccountId int64 `json:"accountId,string"`
|
||||
TotalAmount int64 `json:"amount"`
|
||||
}
|
||||
Reference in New Issue
Block a user