diff options
Diffstat (limited to 'packages/pipeline/src/entities')
-rw-r--r-- | packages/pipeline/src/entities/index.ts | 2 | ||||
-rw-r--r-- | packages/pipeline/src/entities/ohlcv_external.ts | 20 | ||||
-rw-r--r-- | packages/pipeline/src/entities/token_on_chain_metadata.ts | 6 | ||||
-rw-r--r-- | packages/pipeline/src/entities/trusted_tokens.ts | 7 |
4 files changed, 35 insertions, 0 deletions
diff --git a/packages/pipeline/src/entities/index.ts b/packages/pipeline/src/entities/index.ts index d3c61bcb9..769efb092 100644 --- a/packages/pipeline/src/entities/index.ts +++ b/packages/pipeline/src/entities/index.ts @@ -10,6 +10,8 @@ export { Relayer } from './relayer'; export { SraOrder } from './sra_order'; export { Transaction } from './transaction'; export { TokenOnChainMetadata } from './token_on_chain_metadata'; +export { TrustedToken } from './trusted_tokens'; export { SraOrdersObservedTimeStamp, createObservedTimestampForOrder } from './sra_order_observed_timestamp'; +export { OHLCVExternal } from './ohlcv_external'; export type ExchangeEvent = ExchangeFillEvent | ExchangeCancelEvent | ExchangeCancelUpToEvent; diff --git a/packages/pipeline/src/entities/ohlcv_external.ts b/packages/pipeline/src/entities/ohlcv_external.ts new file mode 100644 index 000000000..3fbb4c499 --- /dev/null +++ b/packages/pipeline/src/entities/ohlcv_external.ts @@ -0,0 +1,20 @@ +import { Column, Entity, PrimaryColumn } from 'typeorm'; + +@Entity({ name: 'ohlcv_external', schema: 'raw' }) +export class OHLCVExternal { + @PrimaryColumn() public exchange!: string; + @PrimaryColumn() public from_symbol!: string; + @PrimaryColumn() public to_symbol!: string; + @PrimaryColumn() public start_time!: number; + @PrimaryColumn() public end_time!: number; + + @Column() public open!: number; + @Column() public close!: number; + @Column() public low!: number; + @Column() public high!: number; + @Column() public volume_from!: number; + @Column() public volume_to!: number; + + @PrimaryColumn() public source!: string; + @PrimaryColumn() public observed_timestamp!: number; +}
\ No newline at end of file diff --git a/packages/pipeline/src/entities/token_on_chain_metadata.ts b/packages/pipeline/src/entities/token_on_chain_metadata.ts index 325d28e91..ca1f1827b 100644 --- a/packages/pipeline/src/entities/token_on_chain_metadata.ts +++ b/packages/pipeline/src/entities/token_on_chain_metadata.ts @@ -14,3 +14,9 @@ export class TokenOnChainMetadata { @Column({ type: 'nvarchar', nullable: false }) public name!: string; } + +@Entity({ name: 'trusted_tokens', schema: 'raw' }) +export class TrustedTokens { + @PrimaryColumn() public address!: string; + @PrimaryColumn() public authority!: string; +} diff --git a/packages/pipeline/src/entities/trusted_tokens.ts b/packages/pipeline/src/entities/trusted_tokens.ts new file mode 100644 index 000000000..6ec27c963 --- /dev/null +++ b/packages/pipeline/src/entities/trusted_tokens.ts @@ -0,0 +1,7 @@ +import { Column, Entity, PrimaryColumn } from 'typeorm'; + +@Entity({ name: 'trusted_tokens', schema: 'raw' }) +export class TrustedToken { + @PrimaryColumn() public address!: string; + @PrimaryColumn() public authority!: string; +} |