Refactor positions

This commit is contained in:
Thomas
2021-07-24 10:53:15 +02:00
parent fdc89f7182
commit 1226c26a9d
12 changed files with 77 additions and 66 deletions

View File

@@ -1,12 +1,23 @@
import {
MarketState,
Type
} from '@ghostfolio/api/services/interfaces/interfaces';
import { Currency } from '@prisma/client';
export interface Position {
averagePrice: number;
currency: Currency;
firstBuyDate: string;
grossPerformance?: number;
grossPerformancePercentage?: number;
investment: number;
investmentInOriginalCurrency?: number;
marketPrice?: number;
marketState?: MarketState;
name?: string;
quantity: number;
symbol: string;
transactionCount: number;
type?: Type;
url?: string;
}

View File

@@ -1,7 +1,3 @@
import {
MarketState,
Type
} from '@ghostfolio/api/services/interfaces/interfaces';
import { Currency } from '@prisma/client';
import Big from 'big.js';
@@ -9,15 +5,11 @@ export interface TimelinePosition {
averagePrice: Big;
currency: Currency;
firstBuyDate: string;
marketState: MarketState;
grossPerformance: Big;
grossPerformancePercentage: Big;
investment: Big;
marketPrice: number;
quantity: Big;
symbol: string;
investment: Big;
grossPerformancePercentage: Big | number; // TODO
grossPerformance: Big | number; // TODO
marketPrice: number;
transactionCount: number;
name: string;
url: string;
type: Type;
}