diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-12-06 04:33:34 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-12-06 04:33:34 +0800 |
commit | f9e73d2a6f6b7c3126c0c10286c2f79c4fd2a7ac (patch) | |
tree | e1b93ec089efa842372b885d51046c845728dd75 /packages/pipeline/src/entities/block.ts | |
parent | 5c29b918df4ac8b0f7914e8da10fa1ae530ff4e8 (diff) | |
parent | 08eb0b91b6d0f0dc90ae920a18ca5dd080bf235c (diff) | |
download | dexon-0x-contracts-f9e73d2a6f6b7c3126c0c10286c2f79c4fd2a7ac.tar.gz dexon-0x-contracts-f9e73d2a6f6b7c3126c0c10286c2f79c4fd2a7ac.tar.zst dexon-0x-contracts-f9e73d2a6f6b7c3126c0c10286c2f79c4fd2a7ac.zip |
Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/website/instant-configurator
Diffstat (limited to 'packages/pipeline/src/entities/block.ts')
-rw-r--r-- | packages/pipeline/src/entities/block.ts | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/packages/pipeline/src/entities/block.ts b/packages/pipeline/src/entities/block.ts new file mode 100644 index 000000000..398946622 --- /dev/null +++ b/packages/pipeline/src/entities/block.ts @@ -0,0 +1,13 @@ +import { Column, Entity, PrimaryColumn } from 'typeorm'; + +import { numberToBigIntTransformer } from '../utils'; + +@Entity({ name: 'blocks', schema: 'raw' }) +export class Block { + @PrimaryColumn() public hash!: string; + @PrimaryColumn({ transformer: numberToBigIntTransformer }) + public number!: number; + + @Column({ name: 'timestamp', transformer: numberToBigIntTransformer }) + public timestamp!: number; +} |