diff options
author | Alex Browne <stephenalexbrowne@gmail.com> | 2018-09-27 07:42:48 +0800 |
---|---|---|
committer | Fred Carlsen <fred@sjelfull.no> | 2018-12-13 01:12:18 +0800 |
commit | 4570bc2729cef550bacd168928ce1206ee06d3c2 (patch) | |
tree | 32968f727f7b49745347dc4e35b6ca878c5bc599 /packages/pipeline/src/entities/SraOrder.ts | |
parent | 8702a354678b08b81d40c3254efbfe71e11ea522 (diff) | |
download | dexon-sol-tools-4570bc2729cef550bacd168928ce1206ee06d3c2.tar dexon-sol-tools-4570bc2729cef550bacd168928ce1206ee06d3c2.tar.gz dexon-sol-tools-4570bc2729cef550bacd168928ce1206ee06d3c2.tar.bz2 dexon-sol-tools-4570bc2729cef550bacd168928ce1206ee06d3c2.tar.lz dexon-sol-tools-4570bc2729cef550bacd168928ce1206ee06d3c2.tar.xz dexon-sol-tools-4570bc2729cef550bacd168928ce1206ee06d3c2.tar.zst dexon-sol-tools-4570bc2729cef550bacd168928ce1206ee06d3c2.zip |
Add preliminary support for scraping orders from SRA endpoints (no pagination, only RR support for now)
Diffstat (limited to 'packages/pipeline/src/entities/SraOrder.ts')
-rw-r--r-- | packages/pipeline/src/entities/SraOrder.ts | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/packages/pipeline/src/entities/SraOrder.ts b/packages/pipeline/src/entities/SraOrder.ts new file mode 100644 index 000000000..c9a1f926d --- /dev/null +++ b/packages/pipeline/src/entities/SraOrder.ts @@ -0,0 +1,40 @@ +import { BaseEntity, Column, Entity, PrimaryColumn } from 'typeorm'; + +import { AssetType } from '../types'; + +@Entity() +export class SraOrder extends BaseEntity { + @PrimaryColumn() public exchangeAddress!: string; + @PrimaryColumn() public orderHashHex!: string; + + @Column() public lastUpdatedTimestamp!: number; + @Column() public firstSeenTimestamp!: number; + + @Column() public makerAddress!: string; + @Column() public takerAddress!: string; + @Column() public feeRecipientAddress!: string; + @Column() public senderAddress!: string; + @Column() public makerAssetAmount!: string; + @Column() public takerAssetAmount!: string; + @Column() public makerFee!: string; + @Column() public takerFee!: string; + @Column() public expirationTimeSeconds!: string; + @Column() public salt!: string; + @Column() public signature!: string; + + @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() 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): Make this optional? + @Column() public metaDataJson!: string; +} |