From 2fd81394b39c26a02df5e0719074716508878969 Mon Sep 17 00:00:00 2001 From: juancwu Date: Fri, 22 May 2026 14:51:06 +0000 Subject: [PATCH] chore: format code --- internal/model/investment.go | 38 +++++++++---------- .../investment_contribution_room.go | 1 - 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/internal/model/investment.go b/internal/model/investment.go index 2cd227e..42603db 100644 --- a/internal/model/investment.go +++ b/internal/model/investment.go @@ -55,29 +55,29 @@ type InvestmentTrade struct { // average per-unit cost of remaining shares (reduced proportionally on sells). // RealizedPL is the cumulative realized profit/loss from sells. type HoldingPosition struct { - Holding InvestmentHolding - Quantity decimal.Decimal - AvgCost decimal.Decimal - CostBasis decimal.Decimal - LastBuyPrice *decimal.Decimal - LastSellPrice *decimal.Decimal - RealizedPL decimal.Decimal - TotalBuyQty decimal.Decimal - TotalSellQty decimal.Decimal - TotalFees decimal.Decimal + Holding InvestmentHolding + Quantity decimal.Decimal + AvgCost decimal.Decimal + CostBasis decimal.Decimal + LastBuyPrice *decimal.Decimal + LastSellPrice *decimal.Decimal + RealizedPL decimal.Decimal + TotalBuyQty decimal.Decimal + TotalSellQty decimal.Decimal + TotalFees decimal.Decimal } // InvestmentAccountSummary is the rolled-up view for an investment-flagged // account: contribution room and YTD cash flow plus aggregate cost basis across // holdings. type InvestmentAccountSummary struct { - Account *Account - Year int - RoomAmount *decimal.Decimal // nil if room not yet set for the year - YTDContributions decimal.Decimal - YTDWithdrawals decimal.Decimal - RoomRemaining *decimal.Decimal // nil if RoomAmount is nil - NetContributions decimal.Decimal // lifetime: all deposits minus all withdrawals - TotalCostBasis decimal.Decimal - HoldingCount int + Account *Account + Year int + RoomAmount *decimal.Decimal // nil if room not yet set for the year + YTDContributions decimal.Decimal + YTDWithdrawals decimal.Decimal + RoomRemaining *decimal.Decimal // nil if RoomAmount is nil + NetContributions decimal.Decimal // lifetime: all deposits minus all withdrawals + TotalCostBasis decimal.Decimal + HoldingCount int } diff --git a/internal/repository/investment_contribution_room.go b/internal/repository/investment_contribution_room.go index 420a318..3349d61 100644 --- a/internal/repository/investment_contribution_room.go +++ b/internal/repository/investment_contribution_room.go @@ -71,4 +71,3 @@ func (r *investmentContributionRoomRepository) Delete(accountID string, year int } return nil } -