import { Column, Entity, OneToMany, PrimaryGeneratedColumn } from 'typeorm';
import { BankAccountEntity } from './bank-account.entity';

@Entity('banks')
export class BankEntity {
    @PrimaryGeneratedColumn() id: number;
    @Column({ type: 'varchar', length: 64 }) name: string;

    @OneToMany(() => BankAccountEntity, (account) => account.bank)
    accounts: BankAccountEntity[];
}
