import { Column, DataType, ForeignKey, Model, Table } from 'sequelize-typescript'; import { LegacyCoinInfo } from '../utils/interfaces'; import { Address } from './address'; @Table export class Legacy extends Model { @Column({ type: DataType.STRING, primaryKey: true }) legacyAddress: string; @ForeignKey(() => Address) @Column({ type: DataType.INTEGER, allowNull: false, unique: true }) addressId: number; @Column({ type: DataType.JSONB, defaultValue: null }) coins: LegacyCoinInfo[]; @Column({ type: DataType.JSONB, defaultValue: null }) nfts: string[]; @Column({ type: DataType.JSONB, defaultValue: null }) wallets: string[]; }