className: State
indexOn:
  - columns:
      - cid
    unique: true
  - columns:
      - block
      - contractAddress
  - columns:
      - block
      - contractAddress
      - kind
    unique: true
columns:
  - name: id
    tsType: number
    columnType: PrimaryGeneratedColumn
  - name: block
    tsType: BlockProgress
    columnType: ManyToOne
    lhs: ()
    rhs: BlockProgress
    columnOptions:
      - option: onDelete
        value: "'CASCADE'"
  - name: contractAddress
    pgType: varchar
    tsType: string
    columnType: Column
    columnOptions:
      - option: length
        value: 42
  - name: cid
    pgType: varchar
    tsType: string
    columnType: Column
  - name: kind
    tsType: StateKind
    columnType: Column
    columnOptions:
      - option: type
        value: "'enum'"
      - option: enum
        value: StateKind
  - name: data
    pgType: bytea
    tsType: Buffer
    columnType: Column
imports:
  - toImport:
      - Entity
      - PrimaryGeneratedColumn
      - Column
      - Index
      - ManyToOne
    from: typeorm
  - toImport:
      - StateKind
    from: '@cerc-io/util'
  - toImport:
      - BlockProgress
    from: ./BlockProgress
