Skip to content

Instantly share code, notes, and snippets.

@schmidsi
Created June 30, 2018 14:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save schmidsi/7f199d758af0cdbf9685217c1aba21f4 to your computer and use it in GitHub Desktop.
Save schmidsi/7f199d758af0cdbf9685217c1aba21f4 to your computer and use it in GitHub Desktop.
enum ParticipationType {
INVEST
REDEEM
}
enum Opinion {
UnqualifiedOpinion
QualifiedOpinion
AdverseOpinion
DisclaimerOfOpinion
}
type Holding {
token: Token!
amount: String!
}
type Account {
id: ID! @unique
address: String!
name: String
comment: String
holdings: [Holding!]!
}
type Exchange {
id: ID! @unique
address: String!
name: String!
}
type Token {
id: ID! @unique
symbol: String! @unique
address: String! @unique
decimals: Int!
}
type Price {
timestamp: DateTime!
price: String!
baseToken: Token! @relation(name: "BaseToken")
quoteToken: Token! @relation(name: "QuoteToken")
transaction: String!
}
type Fund {
id: ID! @unique
name: String!
address: String! @unique
manager: Account!
quoteToken: Token!
inception: DateTime!
legalEntity: String
strategy: String
policy: Json
exchanges: [Exchange!]!
holdings: [Holding!]!
participations: [Participation!]!
trades: [Trade!]!
audits: [Audit!]!
}
type Participation {
id: ID! @unique
timestamp: DateTime!
owner: Account!
type: ParticipationType!
amount: String!
token: Token!
shares: String!
transaction: String!
}
type Trade {
id: ID! @unique
timestamp: DateTime!
fund: Fund!
owner: Account
exchange: Exchange!
buyToken: Token! @relation(name: "BuyToken")
buyAmount: String!
sellToken: Token! @relation(name: "SellToken")
sellAmount: String!
transaction: String!
}
type Audit {
id: ID! @unique
timestamp: DateTime!
timeSpanStart: DateTime!
timeSpanEnd: DateTime!
owner: Account!
dataHash: String!
opinion: Opinion!
transaction: String!
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment