This repository has been archived by the owner on Nov 10, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
db_types.go
170 lines (155 loc) · 7.19 KB
/
db_types.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
package types
import (
"time"
"github.com/shopspring/decimal"
)
type Farm struct {
Id int64 `db:"id"`
Name string `db:"name"`
Description string `db:"description"`
SubAccountName string `db:"sub_account_name"`
RewardsFromPoolBtcWalletName string `db:"rewards_from_pool_btc_wallet_name"`
// Location string `db:"location"`
TotalHashPower float64 `db:"total_farm_hashrate"`
AddressForReceivingRewardsFromPool string `db:"address_for_receiving_rewards_from_pool"`
LeftoverRewardPayoutAddress string `db:"leftover_reward_payout_address"`
MaintenanceFeePayoutAddress string `db:"maintenance_fee_payout_address"`
MaintenanceFeeInBtc float64 `db:"maintenance_fee_in_btc"`
// Manufacturers []uint8 `db:"manufacturers"`
// MinerTypes []uint8 `db:"miner_types"`
// EnergySource []uint8 `db:"energy_source"`
// Status string `db:"status"`
// Images [][]uint8 `db:"images"`
// ProfileImage []uint8 `db:"profile_img"`
// CoverImage []uint8 `db:"cover_img"`
// PrimaryAccountOwnerName string `db:"primary_account_owner_name"`
// PrimaryAccountOwnerEmail string `db:"primary_account_owner_email"`
// CreatorId int `db:"creator_id"`
// DeletedAt int64 `db:"deleted_at"`
CreatedAt time.Time `db:"created_at"`
// UpdatedAt int64 `db:"updated_at"`
// ResaleFarmRoyaltiesCudosAddress string `db:"resale_farm_royalties_cudos_address"`
// CudosMintNftRoyaltiesPercent float64 `db:"cudos_mint_nft_royalties_percent"`
// CudosResaleNftRoyaltiesPercent float64 `db:"cudos_resale_nft_royalties_percent"`
FarmStartTime time.Time `db:"farm_start_time"`
}
type NFTStatistics struct {
Id string `db:"id"`
TokenId string `db:"token_id"`
DenomId string `db:"denom_id"`
FarmPaymentId int64 `db:"farm_payment_id"`
PayoutPeriodStart int64 `db:"payout_period_start"`
PayoutPeriodEnd int64 `db:"payout_period_end"`
Reward decimal.Decimal `db:"reward"`
MaintenanceFee decimal.Decimal `db:"maintenance_fee"`
CUDOPartOfMaintenanceFee decimal.Decimal `db:"cudo_part_of_maintenance_fee"`
NFTOwnersForPeriod []NFTOwnerInformation
TxHash string `db:"tx_hash"`
CreatedAt time.Time `db:"createdAt"`
UpdatedAt time.Time `db:"updatedAt"`
}
type NFTStatisticsRepo struct {
Id string `db:"id"`
TokenId string `db:"token_id"`
DenomId string `db:"denom_id"`
FarmPaymentId int64 `db:"farm_payment_id"`
PayoutPeriodStart int64 `db:"payout_period_start"`
PayoutPeriodEnd int64 `db:"payout_period_end"`
Reward string `db:"reward"`
MaintenanceFee string `db:"maintenance_fee"`
CUDOPartOfMaintenanceFee string `db:"cudo_part_of_maintenance_fee"`
NFTOwnersForPeriod []NFTOwnerInformationRepo
TxHash string `db:"tx_hash"`
CreatedAt time.Time `db:"createdAt"`
UpdatedAt time.Time `db:"updatedAt"`
}
type NFTOwnerInformation struct {
TimeOwnedFrom int64 `db:"time_owned_from"`
TimeOwnedTo int64 `db:"time_owned_to"`
TotalTimeOwned int64 `db:"total_time_owned"`
PercentOfTimeOwned float64 `db:"percent_of_time_owned"`
Owner string `db:"owner"`
PayoutAddress string `db:"payout_address"`
Reward decimal.Decimal `db:"reward"`
CreatedAt time.Time `db:"createdAt"`
UpdatedAt time.Time `db:"updatedAt"`
}
type NFTOwnerInformationRepo struct {
TimeOwnedFrom int64 `db:"time_owned_from"`
TimeOwnedTo int64 `db:"time_owned_to"`
TotalTimeOwned int64 `db:"total_time_owned"`
PercentOfTimeOwned float64 `db:"percent_of_time_owned"`
Owner string `db:"owner"`
PayoutAddress string `db:"payout_address"`
Reward string `db:"reward"`
CreatedAt time.Time `db:"createdAt"`
UpdatedAt time.Time `db:"updatedAt"`
}
type TransactionHashWithStatus struct {
Id string `db:"id"`
FarmPaymentId int64 `db:"farm_payment_id"`
TxHash string `db:"tx_hash"`
Status string `db:"status"`
TimeSent int64 `db:"time_sent"`
FarmBtcWalletName string `db:"farm_btc_wallet_name"`
RetryCount int `db:"retry_count"`
CreatedAt time.Time `db:"createdAt"`
UpdatedAt time.Time `db:"updatedAt"`
}
type RBFTransactionHistory struct {
Id string `db:"id"`
FarmId string `db:"farm_id"`
OldTxHash string `db:"old_tx_hash"`
NewTxHash string `db:"new_tx_hash"`
FarmBtcWalletName string `db:"farm_btc_wallet_name"`
CreatedAt time.Time `db:"createdAt"`
UpdatedAt time.Time `db:"updatedAt"`
}
type UTXOTransaction struct {
Id string `db:"id"`
FarmId string `db:"farm_id"`
TxHash string `db:"tx_hash"`
PaymentTimestamp int64 `db:"payment_timestamp"`
Processed bool `db:"processed"`
CreatedAt time.Time `db:"createdAt"`
UpdatedAt time.Time `db:"updatedAt"`
}
type AddressThresholdAmountByFarm struct {
Id string `db:"id"`
BTCAddress string `db:"btc_address"`
FarmId string `db:"farm_id"`
AmountBTC string `db:"amount_btc"`
CreatedAt time.Time `db:"createdAt"`
UpdatedAt time.Time `db:"updatedAt"`
}
type FarmPayment struct {
Id string `db:"id"`
FarmId int64 `db:"farm_id"`
AmountBTC decimal.Decimal `db:"amount_btc"`
CreatedAt time.Time `db:"createdAt"`
UpdatedAt time.Time `db:"updatedAt"`
}
type CollectionPaymentAllocation struct {
Id int64 `db:"id"`
FarmId int64 `db:"farm_id"`
FarmPaymentId int64 `db:"farm_payment_id"`
CollectionId int64 `db:"collection_id"`
CollectionAllocationAmount decimal.Decimal `db:"collection_allocation_amount_btc"`
CUDOGeneralFee decimal.Decimal `db:"cudo_general_fee_btc"`
CUDOMaintenanceFee decimal.Decimal `db:"cudo_maintenance_fee_btc"`
FarmUnsoldLeftovers decimal.Decimal `db:"farm_unsold_leftover_btc"`
FarmMaintenanceFee decimal.Decimal `db:"farm_maintenance_fee_btc"`
CreatedAt time.Time `db:"createdAt"`
UpdatedAt time.Time `db:"updatedAt"`
}
type AuraPoolCollection struct {
Id int64 `db:"id"`
DenomId string `db:"denom_id"`
HashingPower float64 `db:"hashing_power"`
}
const (
TransactionPending = "Pending"
TransactionCompleted = "Completed"
TransactionFailed = "Failed"
TransactionReplaced = "Replaced"
)