From 84e0e7406ab75ae175f95994b146f917319c326c Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Sun, 26 Jan 2025 20:25:14 +0800 Subject: [PATCH] :bug: Bug fixes --- pkg/internal/models/transaction.go | 8 ++++---- pkg/main.go | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/internal/models/transaction.go b/pkg/internal/models/transaction.go index de4dcc1..7d03faa 100644 --- a/pkg/internal/models/transaction.go +++ b/pkg/internal/models/transaction.go @@ -12,10 +12,10 @@ type Transaction struct { Remark string `json:"remark"` // The usage of this transaction Amount decimal.Decimal `json:"amount" type:"decimal(30,2);"` - Payer *Wallet `json:"payer"` // Who give the money - Payee *Wallet `json:"payee"` // Who get the money - PayerID *uint `json:"payer_id"` // Leave this field as nil means pay from the system - PayeeID *uint `json:"payee_id"` // Leave this field as nil means pay to the system + Payer *Wallet `json:"payer" foreignKey:"PayerID"` // Who give the money + Payee *Wallet `json:"payee" foreignKey:"PayeeID"` // Who get the money + PayerID *uint `json:"payer_id"` // Leave this field as nil means pay from the system + PayeeID *uint `json:"payee_id"` // Leave this field as nil means pay to the system } func (v *Transaction) ToTransactionInfo() *proto.TransactionInfo { diff --git a/pkg/main.go b/pkg/main.go index 1ac0163..06c1d83 100644 --- a/pkg/main.go +++ b/pkg/main.go @@ -31,9 +31,9 @@ func init() { func main() { // Booting screen - fmt.Println(color.YellowString(" ____ _\n| _ \\ ___ __ _ __| | ___ _ __\n| |_) / _ \\/ _` |/ _` |/ _ \\ '__|\n| _ < __/ (_| | (_| | __/ |\n|_| \\_\\___|\\__,_|\\__,_|\\___|_|")) + fmt.Println(color.YellowString("__ __ _ _ _\n\\ \\ / /_ _| | | ___| |_\n \\ \\ /\\ / / _` | | |/ _ \\ __|\n \\ V V / (_| | | | __/ |_\n \\_/\\_/ \\__,_|_|_|\\___|\\__|")) fmt.Printf("%s v%s\n", color.New(color.FgHiYellow).Add(color.Bold).Sprintf("Hypernet.Wallet"), pkg.AppVersion) - fmt.Printf("The scraper in the Solar Network\n") + fmt.Printf("The payment system for Hypernet.\n") color.HiBlack("=====================================================\n") // Configure settings