azimuth-watcher-ts/packages/censures-watcher/src/entity/BlockProgress.ts
Nabarun Gogoi ba4ed24296
Regenerate censures-watcher with latest changes in watcher-ts and run in active mode (#31)
* Regenerate censures watcher

* Update config data

* Update ports in config

---------

Co-authored-by: neeraj <neeraj.rtly@gmail.com>
2023-11-23 10:18:27 +05:30

49 lines
1007 B
TypeScript

//
// Copyright 2021 Vulcanize, Inc.
//
import { Entity, PrimaryGeneratedColumn, Column, Index, CreateDateColumn } from 'typeorm';
import { BlockProgressInterface } from '@cerc-io/util';
@Entity()
@Index(['blockHash'], { unique: true })
@Index(['blockNumber'])
@Index(['parentHash'])
export class BlockProgress implements BlockProgressInterface {
@PrimaryGeneratedColumn()
id!: number;
@Column('varchar', { nullable: true })
cid!: string | null;
@Column('varchar', { length: 66 })
blockHash!: string;
@Column('varchar', { length: 66 })
parentHash!: string;
@Column('integer')
blockNumber!: number;
@Column('integer')
blockTimestamp!: number;
@Column('integer')
numEvents!: number;
@Column('integer')
numProcessedEvents!: number;
@Column('integer')
lastProcessedEventIndex!: number;
@Column('boolean')
isComplete!: boolean;
@Column('boolean', { default: false })
isPruned!: boolean;
@CreateDateColumn()
createdAt!: Date;
}