Initial commit: ERP system with advance verification fixes
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
import { Entity, Column, PrimaryGeneratedColumn, CreateDateColumn, UpdateDateColumn, OneToMany } from 'typeorm';
|
||||
import { FinancialTransaction } from './financial-transaction.entity';
|
||||
|
||||
@Entity('bank_accounts')
|
||||
export class BankAccount {
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
id: string;
|
||||
|
||||
@Column({ type: 'varchar', length: 255, nullable: false })
|
||||
name: string;
|
||||
|
||||
@Column({ type: 'varchar', length: 255, nullable: false })
|
||||
bank_name: string;
|
||||
|
||||
@Column({ type: 'varchar', length: 100, unique: true, nullable: false })
|
||||
account_number: string;
|
||||
|
||||
@Column({ type: 'varchar', length: 10, nullable: false })
|
||||
currency: string;
|
||||
|
||||
@Column({ type: 'decimal', precision: 18, scale: 2, default: 0 })
|
||||
balance: number;
|
||||
|
||||
@CreateDateColumn()
|
||||
created_at: Date;
|
||||
|
||||
@UpdateDateColumn()
|
||||
updated_at: Date;
|
||||
|
||||
@OneToMany(() => FinancialTransaction, financialTransaction => financialTransaction.bank_account)
|
||||
financial_transactions: FinancialTransaction[];
|
||||
}
|
||||
Reference in New Issue
Block a user