azimuth-watcher-ts/packages/censures-watcher/src/entity/Event.ts
Nabarun Gogoi 1e11139c9a
Add watcher in eth_call mode for Censures contract (#6)
* Create watcher in eth_call mode for Censures contract

* Update readme about unhandled queries

---------

Co-authored-by: Dhruv Srivastava <dhruvdhs.ds@gmail.com>
2023-04-12 12:39:30 +05:30

39 lines
763 B
TypeScript

//
// Copyright 2021 Vulcanize, Inc.
//
import { Entity, PrimaryGeneratedColumn, Column, Index, ManyToOne } from 'typeorm';
import { BlockProgress } from './BlockProgress';
@Entity()
@Index(['block', 'contract'])
@Index(['block', 'contract', 'eventName'])
export class Event {
@PrimaryGeneratedColumn()
id!: number;
@ManyToOne(() => BlockProgress, { onDelete: 'CASCADE' })
block!: BlockProgress;
@Column('varchar', { length: 66 })
txHash!: string;
@Column('integer')
index!: number;
@Column('varchar', { length: 42 })
contract!: string;
@Column('varchar', { length: 256 })
eventName!: string;
@Column('text')
eventInfo!: string;
@Column('text')
extraInfo!: string;
@Column('text')
proof!: string;
}