Users Repository
Component Detail
Data Layer
low complexity
backend
0
Dependencies
1
Dependents
1
Entities
0
Integrations
Description
Data access layer encapsulating all PostgreSQL queries against the users table and its joins with organization_memberships. Provides typed query methods with soft-delete, pagination, and filtering support, keeping raw SQL out of service-layer code.
users-repository
Responsibilities
- Provide typed query methods for user CRUD against the PostgreSQL users table
- Implement soft-delete semantics via deactivated_at timestamp reads and writes
- Support paginated, filtered queries with optional joins to organization_memberships
Interfaces
findById(id)
findByOrg(orgId, filters, page)
create(data)
update(id, data)
softDelete(id)
restore(id)
findByEmail(email)