aboutsummaryrefslogtreecommitdiffstats
path: root/packages/pipeline/src/entities/sra_order.ts
diff options
context:
space:
mode:
authorAlex Browne <stephenalexbrowne@gmail.com>2018-11-15 07:58:36 +0800
committerAlex Browne <stephenalexbrowne@gmail.com>2018-12-05 06:24:48 +0800
commit303bbc42f4322448998f3fde202574335d1190e6 (patch)
treeb0a45e28d54fef51d237ff32352dd82c891419cf /packages/pipeline/src/entities/sra_order.ts
parent10e93bb01ffcf029821430781ef582a24901a461 (diff)
downloaddexon-sol-tools-303bbc42f4322448998f3fde202574335d1190e6.tar
dexon-sol-tools-303bbc42f4322448998f3fde202574335d1190e6.tar.gz
dexon-sol-tools-303bbc42f4322448998f3fde202574335d1190e6.tar.bz2
dexon-sol-tools-303bbc42f4322448998f3fde202574335d1190e6.tar.lz
dexon-sol-tools-303bbc42f4322448998f3fde202574335d1190e6.tar.xz
dexon-sol-tools-303bbc42f4322448998f3fde202574335d1190e6.tar.zst
dexon-sol-tools-303bbc42f4322448998f3fde202574335d1190e6.zip
Change some column types from varchar to numeric
Diffstat (limited to 'packages/pipeline/src/entities/sra_order.ts')
-rw-r--r--packages/pipeline/src/entities/sra_order.ts26
1 files changed, 14 insertions, 12 deletions
diff --git a/packages/pipeline/src/entities/sra_order.ts b/packages/pipeline/src/entities/sra_order.ts
index 4b7f652d3..9c730a0bb 100644
--- a/packages/pipeline/src/entities/sra_order.ts
+++ b/packages/pipeline/src/entities/sra_order.ts
@@ -1,6 +1,8 @@
+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 {
@@ -19,18 +21,18 @@ export class SraOrder {
public feeRecipientAddress!: string;
@Column({ name: 'sender_address' })
public senderAddress!: string;
- @Column({ name: 'maker_asset_amount' })
- public makerAssetAmount!: string;
- @Column({ name: 'taker_asset_amount' })
- public takerAssetAmount!: string;
- @Column({ name: 'maker_fee' })
- public makerFee!: string;
- @Column({ name: 'taker_fee' })
- public takerFee!: string;
- @Column({ name: 'expiration_time_seconds' })
- public expirationTimeSeconds!: string;
- @Column({ name: 'salt' })
- public salt!: 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;