aboutsummaryrefslogtreecommitdiffstats
path: root/packages/pipeline/src/entities/sra_order.ts
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-12-11 08:10:49 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-12-11 08:10:49 +0800
commite72742f1f76dd3b46976ed3d0f272b539bdfb229 (patch)
tree968debeda7e6efcabd58c7218d5dff05dc24f357 /packages/pipeline/src/entities/sra_order.ts
parent928b253c81971eb6f59efd09ab6a9063d4e6e4ca (diff)
parent253bf4df6a6909d8bd65361c0d115e9d1a8e489e (diff)
downloaddexon-sol-tools-e72742f1f76dd3b46976ed3d0f272b539bdfb229.tar
dexon-sol-tools-e72742f1f76dd3b46976ed3d0f272b539bdfb229.tar.gz
dexon-sol-tools-e72742f1f76dd3b46976ed3d0f272b539bdfb229.tar.bz2
dexon-sol-tools-e72742f1f76dd3b46976ed3d0f272b539bdfb229.tar.lz
dexon-sol-tools-e72742f1f76dd3b46976ed3d0f272b539bdfb229.tar.xz
dexon-sol-tools-e72742f1f76dd3b46976ed3d0f272b539bdfb229.tar.zst
dexon-sol-tools-e72742f1f76dd3b46976ed3d0f272b539bdfb229.zip
Merge branch 'development' into feature/contracts-monorepo-7
Diffstat (limited to 'packages/pipeline/src/entities/sra_order.ts')
-rw-r--r--packages/pipeline/src/entities/sra_order.ts63
1 files changed, 63 insertions, 0 deletions
diff --git a/packages/pipeline/src/entities/sra_order.ts b/packages/pipeline/src/entities/sra_order.ts
new file mode 100644
index 000000000..9c730a0bb
--- /dev/null
+++ b/packages/pipeline/src/entities/sra_order.ts
@@ -0,0 +1,63 @@
+import { BigNumber } from '@0x/utils';
+import { Column, Entity, PrimaryColumn } from 'typeorm';
+
+import { AssetType } from '../types';
+import { bigNumberTransformer } from '../utils';
+
+@Entity({ name: 'sra_orders', schema: 'raw' })
+export class SraOrder {
+ @PrimaryColumn({ name: 'exchange_address' })
+ public exchangeAddress!: string;
+ @PrimaryColumn({ name: 'order_hash_hex' })
+ public orderHashHex!: string;
+ @PrimaryColumn({ name: 'source_url' })
+ public sourceUrl!: string;
+
+ @Column({ name: 'maker_address' })
+ public makerAddress!: string;
+ @Column({ name: 'taker_address' })
+ public takerAddress!: string;
+ @Column({ name: 'fee_recipient_address' })
+ public feeRecipientAddress!: string;
+ @Column({ name: 'sender_address' })
+ public senderAddress!: string;
+ @Column({ name: 'maker_asset_amount', type: 'numeric', transformer: bigNumberTransformer })
+ public makerAssetAmount!: BigNumber;
+ @Column({ name: 'taker_asset_amount', type: 'numeric', transformer: bigNumberTransformer })
+ public takerAssetAmount!: BigNumber;
+ @Column({ name: 'maker_fee', type: 'numeric', transformer: bigNumberTransformer })
+ public makerFee!: BigNumber;
+ @Column({ name: 'taker_fee', type: 'numeric', transformer: bigNumberTransformer })
+ public takerFee!: BigNumber;
+ @Column({ name: 'expiration_time_seconds', type: 'numeric', transformer: bigNumberTransformer })
+ public expirationTimeSeconds!: BigNumber;
+ @Column({ name: 'salt', type: 'numeric', transformer: bigNumberTransformer })
+ public salt!: BigNumber;
+ @Column({ name: 'signature' })
+ public signature!: 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' })
+ 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' })
+ public takerTokenId!: string | null;
+
+ // TODO(albrow): Make this optional?
+ @Column({ name: 'metadata_json' })
+ public metadataJson!: string;
+}