1 2 3 4 5 6 7 8 9 10
import { Column, Entity, PrimaryColumn } from 'typeorm'; @Entity({ name: 'blocks', schema: 'raw' }) export class Block { @PrimaryColumn() public hash!: string; @PrimaryColumn() public number!: number; @Column({ name: 'timestamp' }) public timestamp!: number; }