diff options
Diffstat (limited to 'packages/pipeline/src/entities/exchange_cancel_event.ts')
-rw-r--r-- | packages/pipeline/src/entities/exchange_cancel_event.ts | 62 |
1 files changed, 23 insertions, 39 deletions
diff --git a/packages/pipeline/src/entities/exchange_cancel_event.ts b/packages/pipeline/src/entities/exchange_cancel_event.ts index 38f99c903..698b9e2ec 100644 --- a/packages/pipeline/src/entities/exchange_cancel_event.ts +++ b/packages/pipeline/src/entities/exchange_cancel_event.ts @@ -1,51 +1,35 @@ import { Column, Entity, PrimaryColumn } from 'typeorm'; import { AssetType } from '../types'; -import { numberToBigIntTransformer } from '../utils'; -@Entity({ name: 'exchange_cancel_events', schema: 'raw' }) +@Entity() export class ExchangeCancelEvent { - @PrimaryColumn({ name: 'contract_address' }) - public contractAddress!: string; - @PrimaryColumn({ name: 'log_index' }) - public logIndex!: number; - @PrimaryColumn({ name: 'block_number', transformer: numberToBigIntTransformer }) - public blockNumber!: number; + @PrimaryColumn() public contractAddress!: string; + @PrimaryColumn() public logIndex!: number; + @PrimaryColumn() public blockNumber!: number; - @Column({ name: 'raw_data' }) - public rawData!: string; + @Column() public rawData!: string; - @Column({ name: 'transaction_hash' }) - public transactionHash!: string; - @Column({ name: 'maker_address' }) - public makerAddress!: string; - @Column({ nullable: true, type: String, name: 'taker_address' }) + // TODO(albrow): Include transaction hash + @Column() public makerAddress!: string; + @Column({ nullable: true, type: String }) public takerAddress!: string; - @Column({ name: 'fee_recipient_address' }) - public feeRecipientAddress!: string; - @Column({ name: 'sender_address' }) - public senderAddress!: string; - @Column({ name: 'order_hash' }) - public orderHash!: string; + @Column() public feeRecepientAddress!: string; + @Column() public senderAddress!: string; + @Column() public orderHash!: string; - @Column({ name: 'raw_maker_asset_data' }) - public rawMakerAssetData!: string; - @Column({ name: 'maker_asset_type' }) - public makerAssetType!: AssetType; - @Column({ name: 'maker_asset_proxy_id' }) - public makerAssetProxyId!: string; - @Column({ name: 'maker_token_address' }) - public makerTokenAddress!: string; - @Column({ nullable: true, type: String, name: 'maker_token_id' }) + @Column() public rawMakerAssetData!: string; + @Column() public makerAssetType!: AssetType; + @Column() public makerAssetProxyId!: string; + @Column() public makerTokenAddress!: string; + @Column({ nullable: true, type: String }) public makerTokenId!: string | null; - @Column({ name: 'raw_taker_asset_data' }) - public rawTakerAssetData!: string; - @Column({ name: 'taker_asset_type' }) - public takerAssetType!: AssetType; - @Column({ name: 'taker_asset_proxy_id' }) - public takerAssetProxyId!: string; - @Column({ name: 'taker_token_address' }) - public takerTokenAddress!: string; - @Column({ nullable: true, type: String, name: 'taker_token_id' }) + @Column() public rawTakerAssetData!: string; + @Column() public takerAssetType!: AssetType; + @Column() public takerAssetProxyId!: string; + @Column() public takerTokenAddress!: string; + @Column({ nullable: true, type: String }) public takerTokenId!: string | null; + + // TODO(albrow): Include topics? } |