Files
psp_api/prisma/schema/bank.prisma
T
ahasani d98507fc1f fix: update SupplierLedger model to use correct enum casing and adjust types
feat: enhance PosAccountsService to include inventoryBankAccount details in responses

refactor: modify PosService to return structured inventory and bank account data

chore: remove isSettled field from CreatePurchaseReceiptDto and adjust related logic

feat: add payments selection in SuppliersService for better payment tracking

chore: apply database migrations to adjust decimal types and enforce constraints

chore: create index on Pos_Accounts for improved query performance

feat: define Supplier and SupplierLedger models in Prisma schema for better data management
2025-12-26 22:09:46 +03:30

33 lines
1.2 KiB
Plaintext

model BankBranch {
id Int @id @default(autoincrement())
name String @db.VarChar(255)
code String @unique() @db.VarChar(10)
address String? @db.VarChar(500)
createdAt DateTime @default(now()) @db.Timestamp(0)
updatedAt DateTime @updatedAt @db.Timestamp(0)
deletedAt DateTime? @db.Timestamp(0)
bankId Int
bank Bank @relation("bank_branches", fields: [bankId], references: [id])
bankAccounts BankAccount[] @relation("Bank_Accounts_branchId_fkey")
@@map("Bank_Branches")
}
model BankAccount {
id Int @id @default(autoincrement())
accountNumber String? @unique @db.VarChar(20)
cardNumber String? @unique @db.VarChar(16)
name String @db.VarChar(255)
iban String? @unique @db.VarChar(34)
branchId Int
createdAt DateTime @default(now()) @db.Timestamp(0)
updatedAt DateTime @updatedAt @db.Timestamp(0)
deletedAt DateTime? @db.Timestamp(0)
branch BankBranch @relation("Bank_Accounts_branchId_fkey", fields: [branchId], references: [id])
inventoryBankAccounts InventoryBankAccount[]
@@map("Bank_Accounts")
}