Feature/add symbol profile model (#148)
* Add symbol profile model and positions by country chart * Add positions by continent chart * Fix tests * Extend seed * Update changelog
This commit is contained in:
6
libs/common/src/lib/interfaces/country.interface.ts
Normal file
6
libs/common/src/lib/interfaces/country.interface.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
export interface Country {
|
||||
code: string;
|
||||
continent: string;
|
||||
name: string;
|
||||
weight: number;
|
||||
}
|
@@ -1,12 +1,15 @@
|
||||
import { MarketState } from '@ghostfolio/api/services/interfaces/interfaces';
|
||||
import { Currency } from '@prisma/client';
|
||||
|
||||
import { Country } from './country.interface';
|
||||
|
||||
export interface PortfolioPosition {
|
||||
accounts: {
|
||||
[name: string]: { current: number; original: number };
|
||||
};
|
||||
allocationCurrent: number;
|
||||
allocationInvestment: number;
|
||||
countries: Country[];
|
||||
currency: Currency;
|
||||
exchange?: string;
|
||||
grossPerformance: number;
|
||||
@@ -24,4 +27,5 @@ export interface PortfolioPosition {
|
||||
symbol: string;
|
||||
type?: string;
|
||||
url?: string;
|
||||
value: number;
|
||||
}
|
||||
|
@@ -1,5 +1,8 @@
|
||||
import { Account, Order, Platform } from '@prisma/client';
|
||||
import { Account, Order, Platform, SymbolProfile } from '@prisma/client';
|
||||
|
||||
type AccountWithPlatform = Account & { Platform?: Platform };
|
||||
|
||||
export type OrderWithAccount = Order & { Account?: AccountWithPlatform };
|
||||
export type OrderWithAccount = Order & {
|
||||
Account?: AccountWithPlatform;
|
||||
SymbolProfile?: SymbolProfile;
|
||||
};
|
||||
|
Reference in New Issue
Block a user