Files
spend-sparrow/types/treasure_chest.go
Tim Wundenberg 128a2fc4d7
All checks were successful
Build Docker Image / Build-Docker-Image (push) Successful in 5m22s
Build and Push Docker Image / Build-And-Push-Docker-Image (push) Successful in 5m26s
fix: lint errors
2025-05-26 08:39:32 +02:00

28 lines
745 B
Go

package types
import (
"time"
"github.com/google/uuid"
)
// The TreasureChest is a fictional account.
// The money it "holds" distributed across all accounts
//
// At the time of writing this, linking it to a specific account doesn't really make sense
// Imagine a TreasureChest for free time activities, where some money is spend in cash and some other with credit card.
type TreasureChest struct {
Id uuid.UUID `db:"id"`
ParentId *uuid.UUID `db:"parent_id"`
UserId uuid.UUID `db:"user_id"`
Name string `db:"name"`
CurrentBalance int64 `db:"current_balance"`
CreatedAt time.Time `db:"created_at"`
CreatedBy uuid.UUID `db:"created_by"`
UpdatedAt *time.Time `db:"updated_at"`
UpdatedBy *uuid.UUID `db:"updated_by"`
}