From 302d5c570d7330e34575ddc0967d63483aae952e Mon Sep 17 00:00:00 2001 From: "github-classroom[bot]" <66690702+github-classroom[bot]@users.noreply.github.com> Date: Tue, 6 Jan 2026 18:02:40 +0000 Subject: [PATCH 1/3] Setting up GitHub Classroom Feedback From a3edf790e3b9c7e6bb7f2ed1319059aa838a00f7 Mon Sep 17 00:00:00 2001 From: "github-classroom[bot]" <66690702+github-classroom[bot]@users.noreply.github.com> Date: Tue, 6 Jan 2026 18:02:42 +0000 Subject: [PATCH 2/3] add deadline --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index cab3c08..76507d5 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ +[![Review Assignment Due Date](https://classroom.github.com/assets/deadline-readme-button-22041afd0340ce965d47ae6ef1cefeee28c7c493a6346c4f15d667ab976d596c.svg)](https://classroom.github.com/a/W3nV4mdD) # Banking management ## Overview From 6fefb2d28c7985e8ed2ff6f7a924700b93f5d3b9 Mon Sep 17 00:00:00 2001 From: Rishang Date: Thu, 8 Jan 2026 19:12:39 +0530 Subject: [PATCH 3/3] initialized the common file with bank-account ,bank.ts,user.ts , 3 more initial file also added initial structure and able to pass the simple.test.ts --- src/models/bank-account.ts | 3 +++ src/models/bank.ts | 25 +++++++++++++++++++++++++ src/models/user.ts | 18 ++++++++++++++++++ src/services/GlobalRegistry.ts | 3 +++ src/services/TransactionService.ts | 3 +++ src/types/Common.ts | 14 ++++++++++++++ 6 files changed, 66 insertions(+) create mode 100644 src/models/bank-account.ts create mode 100644 src/models/bank.ts create mode 100644 src/models/user.ts create mode 100644 src/services/GlobalRegistry.ts create mode 100644 src/services/TransactionService.ts create mode 100644 src/types/Common.ts diff --git a/src/models/bank-account.ts b/src/models/bank-account.ts new file mode 100644 index 0000000..132bea9 --- /dev/null +++ b/src/models/bank-account.ts @@ -0,0 +1,3 @@ +export default class BankAccount{ + +} \ No newline at end of file diff --git a/src/models/bank.ts b/src/models/bank.ts new file mode 100644 index 0000000..59227b6 --- /dev/null +++ b/src/models/bank.ts @@ -0,0 +1,25 @@ +let globalBankId=0; +import { BankOptions } from "@/types/Common"; + +export default class Bank { + private bankId:string + private accounts:string[] + private isNegativeAlloed:boolean + + constructor(bankId:string,options?:BankOptions){ + this.bankId=bankId + this.isNegativeAlloed=options?.isNegativeAllowed ?? false; + this.accounts=[]; + } + + public static create(options?:BankOptions){ + return new Bank((globalBankId++)+ "" ,options); + } + public createAccount(val:number){ + return this; + } + + public getId(){ + return this.bankId; + } +} diff --git a/src/models/user.ts b/src/models/user.ts new file mode 100644 index 0000000..e27325c --- /dev/null +++ b/src/models/user.ts @@ -0,0 +1,18 @@ +export default class User { + userName: string; + bankaAcs: string[]; + userId: string; + + constructor(name: string, bankAcs: string[]) { + this.userName = name; + this.bankaAcs = bankAcs; + } + + static create(name: string, bandAcs: string[]) { + return new User(name, bandAcs); + } + + getId() { + return this.userId; + } +} diff --git a/src/services/GlobalRegistry.ts b/src/services/GlobalRegistry.ts new file mode 100644 index 0000000..a7499f4 --- /dev/null +++ b/src/services/GlobalRegistry.ts @@ -0,0 +1,3 @@ +export default class GlobalRegistry{ + static clear(){} +} \ No newline at end of file diff --git a/src/services/TransactionService.ts b/src/services/TransactionService.ts new file mode 100644 index 0000000..aa3a48c --- /dev/null +++ b/src/services/TransactionService.ts @@ -0,0 +1,3 @@ +export default class TransactionService{ + +} \ No newline at end of file diff --git a/src/types/Common.ts b/src/types/Common.ts new file mode 100644 index 0000000..8eec73e --- /dev/null +++ b/src/types/Common.ts @@ -0,0 +1,14 @@ +import Bank from "@/models/bank"; +import BankAccount from "@/models/bank-account"; +import User from "@/models/user"; + +export type BankOptions = { + isNegativeAllowed?: boolean; +}; +export type BankAccountId = string; +export type UserId = string; +export type BankId = string; +export type UserAccountsDeatails = Record; +export type UserDeatails = Record; +export type BanksDeatails = Record; +export type BankAccountsDeatails = Record;