feat: added models
This commit is contained in:
24
server/models/wallet/model.go
Normal file
24
server/models/wallet/model.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package wallet
|
||||
|
||||
type CreateWalletRequest struct {
|
||||
Label *string `json:"label,omitempty"`
|
||||
Password string `json:"password"`
|
||||
}
|
||||
|
||||
type WalletResponse struct {
|
||||
Address string `json:"address"` // Format: "random_word:123456" (e.g. "cave:595462")
|
||||
Balance float64 `json:"balance"`
|
||||
Label *string `json:"label,omitempty"`
|
||||
PasswordHash string `json:"password_hash"`
|
||||
CreatedAt int64 `json:"created_at"`
|
||||
LastActivity *int64 `json:"last_activity,omitempty"`
|
||||
}
|
||||
|
||||
type BalanceResponse struct {
|
||||
Address string `json:"address"`
|
||||
Balance float64 `json:"balance"`
|
||||
}
|
||||
|
||||
type UpdateWalletRequest struct {
|
||||
Label *string `json:"label,omitempty"`
|
||||
}
|
||||
Reference in New Issue
Block a user