Skip to content

Schema #1

@nenadjaja

Description

@nenadjaja
type Token {
    id: ID! @id
    symbol: String!
    description: String!
    image: String
    decimals: Int
    address: String

    owner: User
    isChallenged: Boolean
    challenges: [Challenge]
    isWhitelistedMember: Boolean
 
    totalVotes: Int
    reputation: Int

    votes: [Vote] @derivedFrom(field: "tokenID")
    createdAt: DateTime! @createdAt
}

type Challenge {
    id: ID! @id
    description: String
    createdAt: DateTime! @createdAt
    votesFor: Int
    votesAgainst: Int
    token: Token
    owner: String
    resolved: Boolean
    votes: [Vote] @derivedFrom(field: "challengeID")
}

type Vote {
    id: ID! @id
    challenge: Challenge!
    choice: Choice!
}

type User {
  id: ID! @id
  name: String
  bio: String
  tokens: [Token]
  challenges: [Challenge] 
  votes: [Vote] @relation(name: "UserVote")
}

enum Choice {
  RemoveToken
  KeepToken
}

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions