33 lines
893 B
GraphQL
33 lines
893 B
GraphQL
type Player @entity {
|
|
id: ID! # player address
|
|
createdAt: BigInt!
|
|
lastRaidedAt: BigInt!
|
|
totalMinted: BigInt!
|
|
currentBalance: BigInt!
|
|
numberOfRaids: Int!
|
|
army: Army! @derivedFrom(field: "player")
|
|
armyStrength: BigInt! # Calculated field for total army power
|
|
rank: Int # Position in leaderboard, can be updated periodically
|
|
}
|
|
|
|
type Army @entity {
|
|
id: ID! # player address
|
|
player: Player!
|
|
molochDenierLevel: Int!
|
|
apprenticeLevel: Int!
|
|
anointedLevel: Int!
|
|
championLevel: Int!
|
|
profitPerSecond: BigInt!
|
|
projectedDailyEarnings: BigInt! # Derived from profitPerSecond
|
|
totalUnitsPurchased: Int!
|
|
lastUnitPurchaseTime: BigInt
|
|
}
|
|
|
|
type GlobalStat @entity {
|
|
id: ID! # Can be "1" as we only need one instance
|
|
totalPlayers: Int!
|
|
totalGeldMinted: BigInt!
|
|
totalArmyUnits: Int!
|
|
lastUpdateTime: BigInt!
|
|
topEarnerProfit: BigInt! # Track highest profit per second
|
|
} |