feat(wallets): implement wallet management features including create, update, delete, deposit, transfer, and list movements
- Added createWallet, updateWallet, deleteWallet, depositWallet, transferWallet, and listMovements handlers. - Created corresponding routes for wallet operations. - Developed frontend components for wallet management including dialogs for creating, editing, depositing, adjusting balance, transferring, and viewing movements. - Integrated wallet management into the authenticated routes.
This commit is contained in:
@@ -129,6 +129,35 @@ enum PaymentStatus {
|
||||
PAYED
|
||||
}
|
||||
|
||||
model Wallet {
|
||||
id Int @id @default(autoincrement())
|
||||
name String @db.VarChar(100)
|
||||
currency String @db.VarChar(10)
|
||||
balance Decimal @db.Decimal(14, 4)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
movements WalletMovement[]
|
||||
|
||||
@@map("wallets")
|
||||
}
|
||||
|
||||
model WalletMovement {
|
||||
id Int @id @default(autoincrement())
|
||||
walletId Int
|
||||
wallet Wallet @relation(fields: [walletId], references: [id])
|
||||
type String @db.VarChar(20)
|
||||
amount Decimal @db.Decimal(14, 4)
|
||||
description String? @db.VarChar(255)
|
||||
referenceWalletId Int?
|
||||
transferGroupId String? @db.Uuid
|
||||
createdAt DateTime @default(now())
|
||||
|
||||
@@index([walletId])
|
||||
@@index([transferGroupId])
|
||||
@@map("wallet_movements")
|
||||
}
|
||||
|
||||
model PeriodicExpense {
|
||||
id Int @id @default(autoincrement())
|
||||
description String @db.VarChar(50)
|
||||
|
||||
Reference in New Issue
Block a user