type OpeningAddedEvent implements Event @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 implements Event @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 implements Event @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 implements Event @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 implements Event @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 implements Event @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 implements Event @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 implements Event @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 implements Event @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 implements Event @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 implements Event @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 implements Event @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 implements Event @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 implements Event @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 implements Event @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 implements Event @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 BudgetUpdatedEvent implements Event @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! "Amount substracted from / added to the current budget" budgetChangeAmount: BigInt! } type WorkerRewardAccountUpdatedEvent implements Event @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 implements Event @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 implements Event @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 implements Event @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 implements Event @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)" paymentType: RewardPaymentType! } type NewMissedRewardLevelReachedEvent implements Event @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! }