diff --git a/packages/subgraph/schema.graphql b/packages/subgraph/schema.graphql index 36ec3194..da18f091 100644 --- a/packages/subgraph/schema.graphql +++ b/packages/subgraph/schema.graphql @@ -1,11 +1,11 @@ interface IPlugin { - id: ID! # PluginEntityID + id: ID! # Plugin Address daoAddress: Bytes! pluginAddress: Bytes! } type AdminPlugin implements IPlugin @entity { - id: ID! # plugin address + id: ID! # Plugin Address daoAddress: Bytes! pluginAddress: Bytes! proposals: [AdminProposal!]! @derivedFrom(field: "plugin") @@ -13,7 +13,7 @@ type AdminPlugin implements IPlugin @entity { } type Administrator @entity(immutable: true) { - id: ID! # address + id: ID! # Administrator Address address: String # address as string to facilitate filtering by address on the UI proposals: [AdminProposal!]! @derivedFrom(field: "administrator") plugins: [AdministratorAdminPlugin!]! @derivedFrom(field: "administrator") @@ -21,13 +21,27 @@ type Administrator @entity(immutable: true) { type AdministratorAdminPlugin @entity { "for Many-to-Many" - id: ID! # Administrator + plugin + id: ID! # Plugin Address + Administrator Address administrator: Administrator! plugin: AdminPlugin! } +interface IProposal { + id: ID! # Plugin Address + proposalId + daoAddress: Bytes! + creator: Bytes! + metadata: String + actions: [Action!]! @derivedFrom(field: "proposal") + allowFailureMap: BigInt! + executed: Boolean! + createdAt: BigInt! + startDate: BigInt! + endDate: BigInt! + executionTxHash: Bytes +} + type AdminProposal implements IProposal @entity { - id: ID! # plugin + proposalId + id: ID! # Plugin Address + proposalId daoAddress: Bytes! creator: Bytes! # Administrator address metadata: String @@ -44,7 +58,7 @@ type AdminProposal implements IProposal @entity { } interface IAction { - id: ID! # ActionEntityId + id: ID! # Plugin Address + DAO Address + Plugin Proposal ID + action idx to: Bytes! value: BigInt! data: Bytes! @@ -52,7 +66,7 @@ interface IAction { } type Action implements IAction @entity(immutable: true) { - id: ID! # ActionEntityId + id: ID! # Plugin Address + DAO Address + Plugin Proposal ID + action idx to: Bytes! value: BigInt! data: Bytes! @@ -61,17 +75,3 @@ type Action implements IAction @entity(immutable: true) { # proposal data proposal: IProposal! } - -interface IProposal { - id: ID! # ProposalEntityId - daoAddress: Bytes! - creator: Bytes! - metadata: String - actions: [Action!]! @derivedFrom(field: "proposal") - allowFailureMap: BigInt! - executed: Boolean! - createdAt: BigInt! - startDate: BigInt! - endDate: BigInt! - executionTxHash: Bytes -}