26 lines
856 B
Markdown
26 lines
856 B
Markdown
|
|
# Task ID: 123
|
||
|
|
|
||
|
|
**Title:** Epic repository layer
|
||
|
|
|
||
|
|
**Status:** pending
|
||
|
|
|
||
|
|
**Dependencies:** 117
|
||
|
|
|
||
|
|
**Priority:** medium
|
||
|
|
|
||
|
|
**Description:** Create EpicRepository in src/mcpd/src/repositories/ following existing repository patterns
|
||
|
|
|
||
|
|
**Details:**
|
||
|
|
|
||
|
|
Create src/mcpd/src/repositories/epic.repository.ts:
|
||
|
|
1. Export EpicRepository class following agent.repository.ts pattern
|
||
|
|
2. Methods: create, findById, findByName, findByProjectId, findAll, update, delete
|
||
|
|
3. update must increment version (optimistic concurrency)
|
||
|
|
4. Include relations in queries where needed (epicTasks, project, owner)
|
||
|
|
5. Add type exports for CreateEpicData, UpdateEpicData
|
||
|
|
6. Register in repository index file
|
||
|
|
|
||
|
|
**Test Strategy:**
|
||
|
|
|
||
|
|
Unit tests in src/mcpd/tests/repositories/: test CRUD operations, test optimistic concurrency version increment, test findByProjectId filtering, test cascade behavior.
|