## Overview Implement a borrowing/check-out system that allows users to borrow assets for a set period inside `backend/contrib/`. ## Location All work must be inside `backend/contrib/src/borrowing/`. ## Acceptance Criteria - [ ] `Borrowing` entity: `id`, `assetId`, `borrowedBy` (FK → User), `checkedOutAt`, `expectedReturnAt`, `returnedAt` (nullable), `notes`, `status` (ACTIVE, RETURNED, OVERDUE) - [ ] `POST /assets/:id/checkout` — `CheckOutDto`: `expectedReturnAt*`, `notes?`; sets asset status to ASSIGNED - [ ] `POST /assets/:id/checkin` — marks borrowing as RETURNED, sets `returnedAt`, restores asset status to ACTIVE - [ ] `GET /borrowings` — lists all borrowing records with optional filters (`status`, `userId`) - [ ] All endpoints protected by `JwtAuthGuard`
Overview
Implement a borrowing/check-out system that allows users to borrow assets for a set period inside
backend/contrib/.Location
All work must be inside
backend/contrib/src/borrowing/.Acceptance Criteria
Borrowingentity:id,assetId,borrowedBy(FK → User),checkedOutAt,expectedReturnAt,returnedAt(nullable),notes,status(ACTIVE, RETURNED, OVERDUE)POST /assets/:id/checkout—CheckOutDto:expectedReturnAt*,notes?; sets asset status to ASSIGNEDPOST /assets/:id/checkin— marks borrowing as RETURNED, setsreturnedAt, restores asset status to ACTIVEGET /borrowings— lists all borrowing records with optional filters (status,userId)JwtAuthGuard