diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-12-11 08:10:49 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-12-11 08:10:49 +0800 |
commit | e72742f1f76dd3b46976ed3d0f272b539bdfb229 (patch) | |
tree | 968debeda7e6efcabd58c7218d5dff05dc24f357 /packages/pipeline/src/entities/block.ts | |
parent | 928b253c81971eb6f59efd09ab6a9063d4e6e4ca (diff) | |
parent | 253bf4df6a6909d8bd65361c0d115e9d1a8e489e (diff) | |
download | dexon-sol-tools-e72742f1f76dd3b46976ed3d0f272b539bdfb229.tar dexon-sol-tools-e72742f1f76dd3b46976ed3d0f272b539bdfb229.tar.gz dexon-sol-tools-e72742f1f76dd3b46976ed3d0f272b539bdfb229.tar.bz2 dexon-sol-tools-e72742f1f76dd3b46976ed3d0f272b539bdfb229.tar.lz dexon-sol-tools-e72742f1f76dd3b46976ed3d0f272b539bdfb229.tar.xz dexon-sol-tools-e72742f1f76dd3b46976ed3d0f272b539bdfb229.tar.zst dexon-sol-tools-e72742f1f76dd3b46976ed3d0f272b539bdfb229.zip |
Merge branch 'development' into feature/contracts-monorepo-7
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; +} |