Files
spend-sparrow/types/treasure_chest.go
Tim Wundenberg 96ca636fbb
All checks were successful
Build Docker Image / Build-Docker-Image (push) Successful in 4m4s
Build and Push Docker Image / Build-And-Push-Docker-Image (push) Successful in 5m6s
feat(treasurechest): #64 implement hirarchical treasure chests
2025-05-13 12:45:05 +02:00

28 lines
718 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
// Imagne 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
ParentId uuid.UUID `db:"parent_id"`
UserId uuid.UUID `db:"user_id"`
Name string
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"`
}