goBlockchainDataAnalysis/mongoModels.go
mongoModels.goRaw
1package main
2
3type TxModel struct {
4 Txid string
5 From string
6 To string
7 Amount float64
8}
9type BlockModel struct {
10 Hash string
11 Height int64
12 Confirmations uint64
13 Amount float64
14 Fee float64
15 Tx []TxModel
16}
17
18type NodeModel struct {
19 Id string `json:"id"`
20 Label string `json:"label"`
21 Title string `json:"title"`
22 Group string `json:"group"`
23 Value int `json:"value"`
24 Shape string `json:"shape"`
25 Type string `json:"type"`
26}
27
28type EdgeModel struct {
29 Txid string `json:"txid"`
30 From string `json:"from"`
31 To string `json:"to"`
32 Label float64 `json:"label"` //the value of transaction
33 Arrows string `json:"arrows"`
34 BlockHeight int64 `json:"blockheight"`
35}
36type NetworkModel struct {
37 Nodes []NodeModel `json:"nodes"`
38 Edges []EdgeModel `json:"edges"`
39}
40
41type SankeyNodeModel struct {
42 //StringNode string `json:"stringnode"`
43 Node int `json:"node"`
44 Name string `json:"name"`
45}
46type SankeyLinkModel struct {
47 //StringSource string `json:"stringsource"`
48 Source int `json:"source"`
49 //StringTarget string `json:"stringtarget"`
50 Target int `json:"target"`
51 Value float64 `json:"value"`
52}
53type SankeyModel struct {
54 Nodes []SankeyNodeModel `json:"nodes"`
55 Links []SankeyLinkModel `json:"links"`
56}
57
58type HourCountModel struct {
59 Hour string `json:"hour"`
60 Count int `json:"count"`
61}
62type HourAnalysisResp struct {
63 Labels []string `json:"labels"`
64 Data []int `json:"data"`
65}
66type DateCountModel struct {
67 Time int64 `json:"time"`
68 Date string `json:"date"`
69 Count int `json:"count"`
70}