Created
October 24, 2017 03:23
-
-
Save rafaelcorreiapoli/c7625fad121396470e7f46ba54e91ee3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type User @model { | |
id: ID! @isUnique | |
name: String! | |
dateOfBirth: DateTime | |
} | |
type Sector @model { | |
id: ID! @isUnique | |
name: String! @isUnique | |
companies: [Company!]! @relation(name: "SectorCompanies") | |
} | |
type Company @model { | |
id: ID! @isUnique | |
name: String! @isUnique | |
shortName: String! @isUnique | |
sector: Sector! @relation(name: "SectorCompanies") | |
fundamentals: [Fundamental!]! @relation(name: "CompanyFundamentals") | |
tickers: [Ticker!]! @relation(name: "CompanyTinkers") | |
} | |
type Ticker @model { | |
id: ID! @isUnique | |
company: Company! @relation(name: "CompanyTinkers") | |
recommendationReasons: [RecommendationReason!]! @relation(name: "TickerRecommendationsReasons") | |
portfolioUps: [PortfolioUp!]! @relation(name: "PortfolioUpTicker") | |
values: [TickerValue!]! @relation(name: "TickerValueTicker") | |
} | |
type TickerValue @model { | |
id: ID! @isUnique | |
ticker: Ticker! @relation(name: "TickerValueTicker") | |
date: DateTime! | |
fairValue: Float! | |
currentValue: Float! | |
} | |
type PortfolioUp @model { | |
id: ID! @isUnique | |
ticker: Ticker! @relation(name: "PortfolioUpTicker") | |
expectedYield: Float! | |
committedDate: DateTime! | |
} | |
type Fundamental @model { | |
id: ID! @isUnique | |
company: Company! @relation(name: "CompanyFundamentals") | |
date: DateTime! | |
netRevenue: Float! | |
ebitda: Float! | |
marketCap: Float! | |
roe: Float! | |
roic: Float! | |
netMargin: Float! | |
netDebt: Float! | |
committedDate: DateTime! | |
} | |
type RecommendationReason @model { | |
id: ID! @isUnique | |
text: String! | |
tickers: [Ticker!]! @relation(name: "TickerRecommendationsReasons") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment