Files
spend-sparrow/types/savings_plan.go
Tim Wundenberg 0792d8e01a
All checks were successful
Build Docker Image / Build-Docker-Image (push) Successful in 4m27s
feat: extract types to seperate files
2025-05-10 23:22:09 +02:00

27 lines
606 B
Go

package types
import (
"time"
"github.com/google/uuid"
)
// The SavingsPlan is applied every interval to the TreasureChest/Account as a transaction
type SavingsPlan struct {
Id uuid.UUID
UserId uuid.UUID `db:"user_id"`
TreasureChestId uuid.UUID `db:"treasure_chest_id"`
MonthlySaving int64 `db:"monthly_saving"`
ValidFrom time.Time `db:"valid_from"`
/// nil means it is valid indefinitely
ValidTo *time.Time `db:"valid_to"`
CreatedAt time.Time `db:"created_at"`
CreatedBy uuid.UUID `db:"created_by"`
UpdatedAt *time.Time `db:"updated_at"`
UpdatedBy *uuid.UUID `db:"updated_by"`
}