Data Layer medium complexity backend
0
Dependencies
1
Dependents
2
Entities
0
Integrations

Description

Data access layer for the expenses and expense_types PostgreSQL tables. Provides typed CRUD operations and query methods used by the Expense Service, including filtering by user, date range, and approval status.

Feature: Travel & Expense Registration

expense-repository

Responsibilities

  • Persist new expense records to the expenses table
  • Fetch expense records by user, date, and status filters
  • Update expense approval status and reimbursement linkage
  • Retrieve expense type definitions from expense_types table

Interfaces

createExpense(data)
findExpenseById(id)
findExpensesByUser(userId, filters)
findExpensesByStatus(status)
updateExpenseStatus(id, status)
deleteExpense(id)
findAllExpenseTypes()
findExpenseTypeById(id)

Relationships

Dependents (1)

Components that depend on this component

Related Data Entities (2)

Data entities managed by this component