aboutsummaryrefslogtreecommitdiffstats
path: root/packages/pipeline/src/entities/sra_order.ts
diff options
context:
space:
mode:
authorAlex Browne <stephenalexbrowne@gmail.com>2018-11-09 02:15:09 +0800
committerFred Carlsen <fred@sjelfull.no>2018-12-06 19:04:24 +0800
commit012134001a3f0f60c938c453dc34d78e83e195c1 (patch)
tree337d99b3236e700f8163e01f146d29095d3e041c /packages/pipeline/src/entities/sra_order.ts
parent0f869b0545d18863414ba4d5cc0c2aeb4da700db (diff)
downloaddexon-sol-tools-012134001a3f0f60c938c453dc34d78e83e195c1.tar.gz
dexon-sol-tools-012134001a3f0f60c938c453dc34d78e83e195c1.tar.zst
dexon-sol-tools-012134001a3f0f60c938c453dc34d78e83e195c1.zip
Reorganize entities. Make scripts work from any directory.
Diffstat (limited to 'packages/pipeline/src/entities/sra_order.ts')
-rw-r--r--packages/pipeline/src/entities/sra_order.ts41
1 files changed, 41 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..a22f7c4e5
--- /dev/null
+++ b/packages/pipeline/src/entities/sra_order.ts
@@ -0,0 +1,41 @@
+import { Column, Entity, PrimaryColumn } from 'typeorm';
+
+import { AssetType } from '../types';
+
+@Entity()
+export class SraOrder {
+ @PrimaryColumn() public exchangeAddress!: string;
+ @PrimaryColumn() public orderHashHex!: string;
+
+ @Column() public sourceUrl!: 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;
+}