feat: set up project
This commit is contained in:
10
internal/domain/coin.go
Normal file
10
internal/domain/coin.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package domain
|
||||
|
||||
type Coin string
|
||||
|
||||
const CoinBTC Coin = "coingecko:bitcoin"
|
||||
|
||||
type FiatCurrency string
|
||||
|
||||
const FiatCurrencyDollar = "USD"
|
||||
const FiatCurrencyEuro = "EUR"
|
||||
10
internal/domain/notification.go
Normal file
10
internal/domain/notification.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package domain
|
||||
|
||||
import "time"
|
||||
|
||||
type Notification struct {
|
||||
BlockHash string
|
||||
Tx string
|
||||
Amount float64
|
||||
DoneAt time.Time
|
||||
}
|
||||
19
internal/domain/order.go
Normal file
19
internal/domain/order.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package domain
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||
)
|
||||
|
||||
type Order struct {
|
||||
ID primitive.ObjectID `bson:"_id" json:"_id"`
|
||||
OrderID string `json:"order_id"`
|
||||
ClientID string `json:"client_id"`
|
||||
Amount float64 `bson:"amount" json:"amount"`
|
||||
Tx string `bson:"tx" json:"tx"`
|
||||
Block string `bson:"block" json:"block"`
|
||||
PaidAt time.Time `bson:"paid_at" json:"paid_at"`
|
||||
CreatedAt time.Time `bson:"created_at" json:"created_at"`
|
||||
ExpiresAt time.Time `bson:"expires_at" json:"expires_at"`
|
||||
}
|
||||
Reference in New Issue
Block a user