Prathamesh Musale
b1b79c844a
Part of [Generate watchers for sushiswap subgraphs deployed in graph-node](https://www.notion.so/Generate-watchers-for-sushiswap-subgraphs-deployed-in-graph-node-b3f2e475373d4ab1887d9f8720bd5ae6) Reviewed-on: cerc-io/sushiswap-watcher-ts#2 Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com> Co-committed-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
39 lines
763 B
TypeScript
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;
|
|
}
|