Description:
Track land ownership transfer events through a standalone module. Each transfer links two users (seller and buyer) to a document and is anchored on Stellar.
Tasks:
- Create
src/transfers/entities/transfer.entity.ts with fields: id, document_id (FK → Document), from_user_id (FK → User), to_user_id (FK → User), stellar_tx_hash, transferred_at, notes, created_at
- Create
src/transfers/transfers.module.ts, transfers.service.ts, transfers.controller.ts
- Implement
POST /api/transfers — validate both user IDs exist, call StellarService.anchorHash with a transfer-specific payload, persist the record
- Implement
GET /api/documents/:id/transfers — return the full transfer history for a document
- Protect both routes with
JwtAuthGuard
Acceptance Criteria:
- A transfer record is created and linked to the document and both users
- The transfer is anchored on Stellar and the tx hash is persisted
- Transfer history is returned in chronological order
Description:
Track land ownership transfer events through a standalone module. Each transfer links two users (seller and buyer) to a document and is anchored on Stellar.
Tasks:
src/transfers/entities/transfer.entity.tswith fields:id,document_id(FK → Document),from_user_id(FK → User),to_user_id(FK → User),stellar_tx_hash,transferred_at,notes,created_atsrc/transfers/transfers.module.ts,transfers.service.ts,transfers.controller.tsPOST /api/transfers— validate both user IDs exist, callStellarService.anchorHashwith a transfer-specific payload, persist the recordGET /api/documents/:id/transfers— return the full transfer history for a documentJwtAuthGuardAcceptance Criteria: