diff options
Diffstat (limited to 'packages/pipeline/src/entities')
-rw-r--r-- | packages/pipeline/src/entities/index.ts | 3 | ||||
-rw-r--r-- | packages/pipeline/src/entities/ohlcv_external.ts | 18 | ||||
-rw-r--r-- | packages/pipeline/src/entities/token_metadata.ts | 19 | ||||
-rw-r--r-- | packages/pipeline/src/entities/token_on_chain_metadata.ts | 22 | ||||
-rw-r--r-- | packages/pipeline/src/entities/trusted_tokens.ts | 7 |
5 files changed, 29 insertions, 40 deletions
diff --git a/packages/pipeline/src/entities/index.ts b/packages/pipeline/src/entities/index.ts index 769efb092..a8f159a2a 100644 --- a/packages/pipeline/src/entities/index.ts +++ b/packages/pipeline/src/entities/index.ts @@ -9,8 +9,7 @@ export { ExchangeFillEvent } from './exchange_fill_event'; 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 { TokenMetadata } from './token_metadata'; export { SraOrdersObservedTimeStamp, createObservedTimestampForOrder } from './sra_order_observed_timestamp'; export { OHLCVExternal } from './ohlcv_external'; diff --git a/packages/pipeline/src/entities/ohlcv_external.ts b/packages/pipeline/src/entities/ohlcv_external.ts index 3fbb4c499..95cd4f2f5 100644 --- a/packages/pipeline/src/entities/ohlcv_external.ts +++ b/packages/pipeline/src/entities/ohlcv_external.ts @@ -3,18 +3,18 @@ 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; - + @PrimaryColumn() public fromSymbol!: string; + @PrimaryColumn() public toSymbol!: string; + @PrimaryColumn() public startTime!: number; + @PrimaryColumn() public endTime!: 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; + @Column() public volumeFrom!: number; + @Column() public volumeTo!: number; @PrimaryColumn() public source!: string; - @PrimaryColumn() public observed_timestamp!: number; -}
\ No newline at end of file + @PrimaryColumn() public observedTimestamp!: number; +} diff --git a/packages/pipeline/src/entities/token_metadata.ts b/packages/pipeline/src/entities/token_metadata.ts new file mode 100644 index 000000000..4a0bceefe --- /dev/null +++ b/packages/pipeline/src/entities/token_metadata.ts @@ -0,0 +1,19 @@ +import { Column, Entity, PrimaryColumn } from 'typeorm'; + +@Entity({ name: 'token_metadata', schema: 'raw' }) +export class TokenMetadata { + @PrimaryColumn({ type: 'varchar', nullable: false }) + public address!: string; + + @PrimaryColumn({ type: 'varchar', nullable: false }) + public authority!: string; + + @Column({ type: 'integer', nullable: true }) + public decimals!: number; + + @Column({ type: 'varchar', nullable: true }) + public symbol!: string; + + @Column({ type: 'varchar', nullable: true }) + public name!: string; +} diff --git a/packages/pipeline/src/entities/token_on_chain_metadata.ts b/packages/pipeline/src/entities/token_on_chain_metadata.ts deleted file mode 100644 index ca1f1827b..000000000 --- a/packages/pipeline/src/entities/token_on_chain_metadata.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { Column, Entity, PrimaryColumn } from 'typeorm'; - -@Entity({ name: 'token_on_chain_metadata', schema: 'raw' }) -export class TokenOnChainMetadata { - @PrimaryColumn({ type: 'nvarchar', nullable: false }) - public address!: string; - - @Column({ type: 'integer', nullable: false }) - public decimals!: number; - - @Column({ type: 'nvarchar', nullable: false }) - public symbol!: string; - - @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 deleted file mode 100644 index 6ec27c963..000000000 --- a/packages/pipeline/src/entities/trusted_tokens.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Column, Entity, PrimaryColumn } from 'typeorm'; - -@Entity({ name: 'trusted_tokens', schema: 'raw' }) -export class TrustedToken { - @PrimaryColumn() public address!: string; - @PrimaryColumn() public authority!: string; -} |