type OpeningAddedEvent @entity { ### GENERIC DATA ### "(network}-{blockNumber}-{indexInBlock}" id: ID! "Hash of the extrinsic which caused the event to be emitted" inExtrinsic: String "Blocknumber of the block in which the event was emitted." inBlock: Int! "Network the block was produced in" network: Network! "Index of event in block from which it was emitted." indexInBlock: Int! ### SPECIFIC DATA ### "Related group" group: WorkingGroup! "Related opening" opening: WorkingGroupOpening! # Other opening data like: metadata, type, staking policy, reward etc. is immutable, so can be read directly from Opening entity } type AppliedOnOpeningEvent @entity { ### GENERIC DATA ### "(network}-{blockNumber}-{indexInBlock}" id: ID! "Hash of the extrinsic which caused the event to be emitted" inExtrinsic: String "Blocknumber of the block in which the event was emitted." inBlock: Int! "Network the block was produced in" network: Network! "Index of event in block from which it was emitted." indexInBlock: Int! ### SPECIFIC DATA ### "Related group" group: WorkingGroup! "Related opening" opening: WorkingGroupOpening! "The application that was created" application: WorkingGroupApplication! # Same as with opening - application parameters are immutable and can be fetched from Application entity } type OpeningFilledEvent @entity { ### GENERIC DATA ### "(network}-{blockNumber}-{indexInBlock}" id: ID! "Hash of the extrinsic which caused the event to be emitted" inExtrinsic: String "Blocknumber of the block in which the event was emitted." inBlock: Int! "Network the block was produced in" network: Network! "Index of event in block from which it was emitted." indexInBlock: Int! ### SPECIFIC DATA ### "Related group" group: WorkingGroup! "Related opening" opening: WorkingGroupOpening! "Workers that have been hired as a result of filling the opening" workersHired: [Worker!] @derivedFrom(field: "entry") } type LeaderSetEvent @entity { ### GENERIC DATA ### "(network}-{blockNumber}-{indexInBlock}" id: ID! "Hash of the extrinsic which caused the event to be emitted" inExtrinsic: String "Blocknumber of the block in which the event was emitted." inBlock: Int! "Network the block was produced in" network: Network! "Index of event in block from which it was emitted." indexInBlock: Int! ### SPECIFIC DATA ### "Related group" group: WorkingGroup! # The field must be optional, because at the time the event is emitted the worker does not yet exist "Related Lead worker" worker: Worker } type WorkerRoleAccountUpdatedEvent @entity { ### GENERIC DATA ### "(network}-{blockNumber}-{indexInBlock}" id: ID! "Hash of the extrinsic which caused the event to be emitted" inExtrinsic: String "Blocknumber of the block in which the event was emitted." inBlock: Int! "Network the block was produced in" network: Network! "Index of event in block from which it was emitted." indexInBlock: Int! ### SPECIFIC DATA ### "Related group" group: WorkingGroup! "Related worker" worker: Worker! "New role account" newRoleAccount: String! } type LeaderUnsetEvent @entity { ### GENERIC DATA ### "(network}-{blockNumber}-{indexInBlock}" id: ID! "Hash of the extrinsic which caused the event to be emitted" inExtrinsic: String "Blocknumber of the block in which the event was emitted." inBlock: Int! "Network the block was produced in" network: Network! "Index of event in block from which it was emitted." indexInBlock: Int! ### SPECIFIC DATA ### "Related group" group: WorkingGroup! "A leader that was unset" leader: Worker! } type WorkerExitedEvent @entity { ### GENERIC DATA ### "(network}-{blockNumber}-{indexInBlock}" id: ID! "Hash of the extrinsic which caused the event to be emitted" inExtrinsic: String "Blocknumber of the block in which the event was emitted." inBlock: Int! "Network the block was produced in" network: Network! "Index of event in block from which it was emitted." indexInBlock: Int! ### SPECIFIC DATA ### "Related group" group: WorkingGroup! "Related worker" worker: Worker! } type TerminatedWorkerEvent @entity { ### GENERIC DATA ### "(network}-{blockNumber}-{indexInBlock}" id: ID! "Hash of the extrinsic which caused the event to be emitted" inExtrinsic: String "Blocknumber of the block in which the event was emitted." inBlock: Int! "Network the block was produced in" network: Network! "Index of event in block from which it was emitted." indexInBlock: Int! ### SPECIFIC DATA ### "Related group" group: WorkingGroup! "Related worker" worker: Worker! "Slash amount (if any)" penalty: BigInt "Optional rationale" rationale: String } type TerminatedLeaderEvent @entity { ### GENERIC DATA ### "(network}-{blockNumber}-{indexInBlock}" id: ID! "Hash of the extrinsic which caused the event to be emitted" inExtrinsic: String "Blocknumber of the block in which the event was emitted." inBlock: Int! "Network the block was produced in" network: Network! "Index of event in block from which it was emitted." indexInBlock: Int! ### SPECIFIC DATA ### "Related group" group: WorkingGroup! "Related worker" worker: Worker! "Slash amount (if any)" penalty: BigInt "Optional rationale" rationale: String } type WorkerStartedLeavingEvent @entity { ### GENERIC DATA ### "(network}-{blockNumber}-{indexInBlock}" id: ID! "Hash of the extrinsic which caused the event to be emitted" inExtrinsic: String "Blocknumber of the block in which the event was emitted." inBlock: Int! "Network the block was produced in" network: Network! "Index of event in block from which it was emitted." indexInBlock: Int! ### SPECIFIC DATA ### "Related group" group: WorkingGroup! "Related worker" worker: Worker! "Optional rationale" rationale: String } type StakeSlashedEvent @entity { ### GENERIC DATA ### "(network}-{blockNumber}-{indexInBlock}" id: ID! "Hash of the extrinsic which caused the event to be emitted" inExtrinsic: String "Blocknumber of the block in which the event was emitted." inBlock: Int! "Network the block was produced in" network: Network! "Index of event in block from which it was emitted." indexInBlock: Int! ### SPECIFIC DATA ### "Related group" group: WorkingGroup! "Related worker" worker: Worker! "Balance that was requested to be slashed" requestedAmount: BigInt! "Balance that was actually slashed" slashedAmount: BigInt! "Optional rationale" rationale: String } type StakeDecreasedEvent @entity { ### GENERIC DATA ### "(network}-{blockNumber}-{indexInBlock}" id: ID! "Hash of the extrinsic which caused the event to be emitted" inExtrinsic: String "Blocknumber of the block in which the event was emitted." inBlock: Int! "Network the block was produced in" network: Network! "Index of event in block from which it was emitted." indexInBlock: Int! ### SPECIFIC DATA ### "Related group" group: WorkingGroup! "Related worker" worker: Worker! "The amount of JOY the stake was decreased by" amount: BigInt! } type StakeIncreasedEvent @entity { ### GENERIC DATA ### "(network}-{blockNumber}-{indexInBlock}" id: ID! "Hash of the extrinsic which caused the event to be emitted" inExtrinsic: String "Blocknumber of the block in which the event was emitted." inBlock: Int! "Network the block was produced in" network: Network! "Index of event in block from which it was emitted." indexInBlock: Int! ### SPECIFIC DATA ### "Related group" group: WorkingGroup! "Related worker" worker: Worker! "The amount of JOY the stake was increased by" amount: BigInt! } type ApplicationWithdrawnEvent @entity { ### GENERIC DATA ### "(network}-{blockNumber}-{indexInBlock}" id: ID! "Hash of the extrinsic which caused the event to be emitted" inExtrinsic: String "Blocknumber of the block in which the event was emitted." inBlock: Int! "Network the block was produced in" network: Network! "Index of event in block from which it was emitted." indexInBlock: Int! ### SPECIFIC DATA ### "Related group" group: WorkingGroup! "Related application" application: WorkingGroupApplication! } type OpeningCanceledEvent @entity { ### GENERIC DATA ### "(network}-{blockNumber}-{indexInBlock}" id: ID! "Hash of the extrinsic which caused the event to be emitted" inExtrinsic: String "Blocknumber of the block in which the event was emitted." inBlock: Int! "Network the block was produced in" network: Network! "Index of event in block from which it was emitted." indexInBlock: Int! ### SPECIFIC DATA ### "Related group" group: WorkingGroup! "Related opening" opening: WorkingGroupOpening! } type BudgetSetEvent @entity { ### GENERIC DATA ### "(network}-{blockNumber}-{indexInBlock}" id: ID! "Hash of the extrinsic which caused the event to be emitted" inExtrinsic: String "Blocknumber of the block in which the event was emitted." inBlock: Int! "Network the block was produced in" network: Network! "Index of event in block from which it was emitted." indexInBlock: Int! ### SPECIFIC DATA ### "Related group" group: WorkingGroup! "New working group budget" newBudget: BigInt! } type WorkerRewardAccountUpdatedEvent @entity { ### GENERIC DATA ### "(network}-{blockNumber}-{indexInBlock}" id: ID! "Hash of the extrinsic which caused the event to be emitted" inExtrinsic: String "Blocknumber of the block in which the event was emitted." inBlock: Int! "Network the block was produced in" network: Network! "Index of event in block from which it was emitted." indexInBlock: Int! ### SPECIFIC DATA ### "Related group" group: WorkingGroup! "Related worker" worker: Worker! "New reward account" newRewardAccount: String! } type WorkerRewardAmountUpdatedEvent @entity { ### GENERIC DATA ### "(network}-{blockNumber}-{indexInBlock}" id: ID! "Hash of the extrinsic which caused the event to be emitted" inExtrinsic: String "Blocknumber of the block in which the event was emitted." inBlock: Int! "Network the block was produced in" network: Network! "Index of event in block from which it was emitted." indexInBlock: Int! ### SPECIFIC DATA ### "Related group" group: WorkingGroup! "Related worker" worker: Worker! "New worker reward per block" newRewardPerBlock: BigInt! } type UpcomingOpeningAdded @variant { upcomingOpeningId: ID! } type UpcomingOpeningRemoved @variant { upcomingOpeningId: ID! } type WorkingGroupMetadataSet @variant { "The new metadata snapshot resulting from the update" metadata: WorkingGroupMetadata! } type InvalidActionMetadata @variant { "Reason why the action metadata was considered invalid" reason: String! } union WorkingGroupMetadataActionResult = UpcomingOpeningAdded | UpcomingOpeningRemoved | WorkingGroupMetadataSet | InvalidActionMetadata type StatusTextChangedEvent @entity { ### GENERIC DATA ### "(network}-{blockNumber}-{indexInBlock}" id: ID! "Hash of the extrinsic which caused the event to be emitted" inExtrinsic: String "Blocknumber of the block in which the event was emitted." inBlock: Int! "Network the block was produced in" network: Network! "Index of event in block from which it was emitted." indexInBlock: Int! ### SPECIFIC DATA ### "Related group" group: WorkingGroup! "Original action metadata as hex string" metadata: String "Event result depeding on the metadata action type" result: WorkingGroupMetadataActionResult! } type BudgetSpendingEvent @entity { ### GENERIC DATA ### "(network}-{blockNumber}-{indexInBlock}" id: ID! "Hash of the extrinsic which caused the event to be emitted" inExtrinsic: String "Blocknumber of the block in which the event was emitted." inBlock: Int! "Network the block was produced in" network: Network! "Index of event in block from which it was emitted." indexInBlock: Int! ### SPECIFIC DATA ### "Related group" group: WorkingGroup! "Reciever account address" reciever: String! "Amount beeing spent" amount: BigInt! "Optional rationale" rationale: String } enum RewardPaymentType { "Regular reward payout" REGULAR "Payout of previously missed reward" MISSED } type RewardPaidEvent @entity { ### GENERIC DATA ### "(network}-{blockNumber}-{indexInBlock}" id: ID! "Hash of the extrinsic which caused the event to be emitted" inExtrinsic: String "Blocknumber of the block in which the event was emitted." inBlock: Int! "Network the block was produced in" network: Network! "Index of event in block from which it was emitted." indexInBlock: Int! ### SPECIFIC DATA ### "Related group" group: WorkingGroup! "Related worker" worker: Worker! "The account that recieved the reward" rewardAccount: String! "Amount recieved" amount: BigInt! "Type of the payment (REGULAR/MISSED)" type: RewardPaymentType! } type NewMissedRewardLevelReachedEvent @entity { ### GENERIC DATA ### "(network}-{blockNumber}-{indexInBlock}" id: ID! "Hash of the extrinsic which caused the event to be emitted" inExtrinsic: String "Blocknumber of the block in which the event was emitted." inBlock: Int! "Network the block was produced in" network: Network! "Index of event in block from which it was emitted." indexInBlock: Int! ### SPECIFIC DATA ### "Related group" group: WorkingGroup! "Related worker" worker: Worker! "New missed reward amount" newMissedRewardAmount: BigInt! }