import { BelongsTo, Column, DataType, ForeignKey, Index, Model, Table } from 'sequelize-typescript'; import { Address } from './address'; import { Tx } from './tx'; @Table export class MultisendTx extends Model { @Index({ name: 'multisendTx-txId-index', using: 'HASH', }) @ForeignKey(() => Tx) @Column({ type: DataType.INTEGER, allowNull: false }) txId: number; @BelongsTo(() => Tx) tx: Tx; @Index({ name: 'multisendTx-to-index', using: 'HASH', }) @ForeignKey(() => Address) @Column({ type: DataType.INTEGER, allowNull: false }) toAddressId: number; @BelongsTo(() => Address) toAddress: Address; @Column(DataType.STRING) coin: string; @Column(DataType.STRING) amount: string; }