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

Description

Data access layer that performs batched database queries for bulk user operations. Handles multi-row updates within transactions, validates user existence and organization membership, and persists audit log records for each affected user.

Feature: Bulk Actions

bulk-operation-repository

Responsibilities

  • Execute batched user status updates within a single transaction
  • Validate user IDs exist and belong to the requesting organization
  • Persist audit log entries for each individual user affected by the bulk action
  • Query user data for pre-operation validation and post-operation result assembly

Interfaces

updateUserStatuses(userIds: string[], status: string, txn: Transaction)
updateUserRoles(userIds: string[], roleId: string, txn: Transaction)
getUsersByIds(userIds: string[], organizationId: string)
insertAuditLogs(entries: AuditLogEntry[], txn: Transaction)
getPendingInvitationUsers(userIds: string[], organizationId: string)

Relationships

Dependents (1)

Components that depend on this component

Related Data Entities (2)

Data entities managed by this component