azimuth-watcher-ts/packages/azimuth-watcher/src/entity/GetManagerFor.ts
Nabarun Gogoi a44de433b7
Generate watchers with DB caching for array return types (#17)
* Generate LinearStarRelease watcher with array types DB caching

* Generate Polls watcher with array types DB caching

* Generate ConditionalStarRelease watcher with array types DB caching

* Generate Azimuth watcher with array types DB caching

* Generate Censures watcher with array types DB caching

* Fix array type in entity files for LinearStarRelease and Polls watchers
2023-04-27 17:37:54 +05:30

32 lines
720 B
TypeScript

//
// Copyright 2021 Vulcanize, Inc.
//
import { Entity, PrimaryGeneratedColumn, Column, Index } from 'typeorm';
import { bigintArrayTransformer } from '@cerc-io/util';
@Entity()
@Index(['blockHash', 'contractAddress', '_proxy'], { unique: true })
export class GetManagerFor {
@PrimaryGeneratedColumn()
id!: number;
@Column('varchar', { length: 66 })
blockHash!: string;
@Column('integer')
blockNumber!: number;
@Column('varchar', { length: 42 })
contractAddress!: string;
@Column('varchar', { length: 42 })
_proxy!: string;
@Column('numeric', { array: true, transformer: bigintArrayTransformer })
value!: bigint[];
@Column('text', { nullable: true })
proof!: string;
}