chore: format code
This commit is contained in:
parent
7c24a8302d
commit
2fd81394b3
2 changed files with 19 additions and 20 deletions
|
|
@ -55,29 +55,29 @@ type InvestmentTrade struct {
|
||||||
// average per-unit cost of remaining shares (reduced proportionally on sells).
|
// average per-unit cost of remaining shares (reduced proportionally on sells).
|
||||||
// RealizedPL is the cumulative realized profit/loss from sells.
|
// RealizedPL is the cumulative realized profit/loss from sells.
|
||||||
type HoldingPosition struct {
|
type HoldingPosition struct {
|
||||||
Holding InvestmentHolding
|
Holding InvestmentHolding
|
||||||
Quantity decimal.Decimal
|
Quantity decimal.Decimal
|
||||||
AvgCost decimal.Decimal
|
AvgCost decimal.Decimal
|
||||||
CostBasis decimal.Decimal
|
CostBasis decimal.Decimal
|
||||||
LastBuyPrice *decimal.Decimal
|
LastBuyPrice *decimal.Decimal
|
||||||
LastSellPrice *decimal.Decimal
|
LastSellPrice *decimal.Decimal
|
||||||
RealizedPL decimal.Decimal
|
RealizedPL decimal.Decimal
|
||||||
TotalBuyQty decimal.Decimal
|
TotalBuyQty decimal.Decimal
|
||||||
TotalSellQty decimal.Decimal
|
TotalSellQty decimal.Decimal
|
||||||
TotalFees decimal.Decimal
|
TotalFees decimal.Decimal
|
||||||
}
|
}
|
||||||
|
|
||||||
// InvestmentAccountSummary is the rolled-up view for an investment-flagged
|
// InvestmentAccountSummary is the rolled-up view for an investment-flagged
|
||||||
// account: contribution room and YTD cash flow plus aggregate cost basis across
|
// account: contribution room and YTD cash flow plus aggregate cost basis across
|
||||||
// holdings.
|
// holdings.
|
||||||
type InvestmentAccountSummary struct {
|
type InvestmentAccountSummary struct {
|
||||||
Account *Account
|
Account *Account
|
||||||
Year int
|
Year int
|
||||||
RoomAmount *decimal.Decimal // nil if room not yet set for the year
|
RoomAmount *decimal.Decimal // nil if room not yet set for the year
|
||||||
YTDContributions decimal.Decimal
|
YTDContributions decimal.Decimal
|
||||||
YTDWithdrawals decimal.Decimal
|
YTDWithdrawals decimal.Decimal
|
||||||
RoomRemaining *decimal.Decimal // nil if RoomAmount is nil
|
RoomRemaining *decimal.Decimal // nil if RoomAmount is nil
|
||||||
NetContributions decimal.Decimal // lifetime: all deposits minus all withdrawals
|
NetContributions decimal.Decimal // lifetime: all deposits minus all withdrawals
|
||||||
TotalCostBasis decimal.Decimal
|
TotalCostBasis decimal.Decimal
|
||||||
HoldingCount int
|
HoldingCount int
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -71,4 +71,3 @@ func (r *investmentContributionRoomRepository) Delete(accountID string, year int
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue