Files
lcbp3/specs/06-tasks/TASK-BE-018-v170-refactor.md
admin 7db6a003db
Some checks failed
Spec Validation / validate-markdown (push) Has been cancelled
Spec Validation / validate-diagrams (push) Has been cancelled
Spec Validation / check-todos (push) Has been cancelled
251223:1649 On going update to 1.7.0: Refoctory drawing Module & document number Module
2025-12-23 16:49:16 +07:00

38 lines
1.2 KiB
Markdown

---
title: 'Task: Backend Refactoring for Schema v1.7.0'
status: DONE
owner: Backend Team
created_at: 2025-12-23
related:
- specs/01-requirements/01-03.11-document-numbering.md
- specs/07-database/lcbp3-v1.7.0-schema.sql
- specs/07-database/data-dictionary-v1.7.0.md
---
## Objective
Update backend entities and logic to align with schema v1.7.0 and revised document numbering specifications.
## Scope of Work
### 1. Drawing Module
- **Contract Drawings:**
- Update `ContractDrawing` entity (map_cat_id, volume_page)
- Create `ContractDrawingSubcatCatMap` entity
- **Shop Drawings:**
- Update `ShopDrawingMainCategory` (add project_id)
- Update `ShopDrawingSubCategory` (add project_id, remove main_cat_id)
- Update `ShopDrawing` (remove title)
- Update `ShopDrawingRevision` (add title, legacy_number)
- **As Built Drawings (New):**
- Create entities for `asbuilt_drawings` and related tables.
### 2. Document Numbering Module
- **Counters:**
- Update `DocumentNumberCounter` entity to match 8-part Composite Key.
- Ensure strict typing for `reset_scope`.
## Definition of Done
- [x] All entities match v1.7.0 schema
- [x] Application compiles without type errors
- [x] Document Numbering service supports new key structure