Skip to content

Commit a7c8544

Browse files
authored
fix: sequelize field shadowing in models (#1122)
Signed-off-by: Tomás Migone <[email protected]>
1 parent 01784a3 commit a7c8544

File tree

3 files changed

+40
-40
lines changed

3 files changed

+40
-40
lines changed

packages/indexer-common/src/indexer-management/models/cost-model.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ export class CostModel
3939
extends Model<CostModelAttributes, CostModelCreationAttributes>
4040
implements CostModelAttributes
4141
{
42-
public id!: number
43-
public deployment!: string
44-
public model!: string | null
42+
declare id: number
43+
declare deployment: string
44+
declare model: string | null
4545
public variables!: CostModelVariables | null
4646

47-
public createdAt!: Date
48-
public updatedAt!: Date
47+
declare createdAt: Date
48+
declare updatedAt: Date
4949

5050
// eslint-disable-next-line @typescript-eslint/ban-types
5151
public toGraphQL(): object {

packages/indexer-common/src/indexer-management/models/indexing-rule.ts

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -66,26 +66,26 @@ export class IndexingRule
6666
extends Model<IndexingRuleAttributes, IndexingRuleCreationAttributes>
6767
implements IndexingRuleAttributes
6868
{
69-
public id!: number
70-
public identifier!: string
71-
public identifierType!: SubgraphIdentifierType
72-
public allocationAmount!: string | null
73-
public allocationLifetime!: number | null
74-
public autoRenewal!: boolean
75-
public parallelAllocations!: number | null
76-
public maxAllocationPercentage!: number | null
77-
public minSignal!: string | null
78-
public maxSignal!: string | null
79-
public minStake!: string | null
80-
public minAverageQueryFees!: string | null
81-
public custom!: string | null
82-
public decisionBasis!: IndexingDecisionBasis
83-
public requireSupported!: boolean
84-
public safety!: boolean
85-
public protocolNetwork!: string
69+
declare id: number
70+
declare identifier: string
71+
declare identifierType: SubgraphIdentifierType
72+
declare allocationAmount: string | null
73+
declare allocationLifetime: number | null
74+
declare autoRenewal: boolean
75+
declare parallelAllocations: number | null
76+
declare maxAllocationPercentage: number | null
77+
declare minSignal: string | null
78+
declare maxSignal: string | null
79+
declare minStake: string | null
80+
declare minAverageQueryFees: string | null
81+
declare custom: string | null
82+
declare decisionBasis: IndexingDecisionBasis
83+
declare requireSupported: boolean
84+
declare safety: boolean
85+
declare protocolNetwork: string
8686

87-
public createdAt!: Date
88-
public updatedAt!: Date
87+
declare createdAt: Date
88+
declare updatedAt: Date
8989

9090
// eslint-disable-next-line @typescript-eslint/ban-types
9191
public toGraphQL(): object {

packages/indexer-common/src/indexer-management/models/poi-dispute.ts

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -51,23 +51,23 @@ export class POIDispute
5151
extends Model<POIDisputeAttributes, POIDisputeCreationAttributes>
5252
implements POIDisputeAttributes
5353
{
54-
public allocationID!: string
55-
public subgraphDeploymentID!: string
56-
public allocationIndexer!: string
57-
public allocationAmount!: string
58-
public allocationProof!: string
59-
public closedEpoch!: number
60-
public closedEpochReferenceProof!: string | null
61-
public closedEpochStartBlockHash!: string
62-
public closedEpochStartBlockNumber!: number
63-
public previousEpochReferenceProof!: string | null
64-
public previousEpochStartBlockHash!: string
65-
public previousEpochStartBlockNumber!: number
66-
public status!: string
67-
public protocolNetwork!: string
54+
declare allocationID: string
55+
declare subgraphDeploymentID: string
56+
declare allocationIndexer: string
57+
declare allocationAmount: string
58+
declare allocationProof: string
59+
declare closedEpoch: number
60+
declare closedEpochReferenceProof: string | null
61+
declare closedEpochStartBlockHash: string
62+
declare closedEpochStartBlockNumber: number
63+
declare previousEpochReferenceProof: string | null
64+
declare previousEpochStartBlockHash: string
65+
declare previousEpochStartBlockNumber: number
66+
declare status: string
67+
declare protocolNetwork: string
6868

69-
public createdAt!: Date
70-
public updatedAt!: Date
69+
declare createdAt: Date
70+
declare updatedAt: Date
7171

7272
// eslint-disable-next-line @typescript-eslint/ban-types
7373
public toGraphQL(): object {

0 commit comments

Comments
 (0)