Files
lcbp3/specs/99-archives/tasks/TASK-BE-018-v170-refactor.md
admin c90a664f53
All checks were successful
Build and Deploy / deploy (push) Successful in 1m0s
260222:1053 20260222 refactor specs/ #1 03-Data-and-Storage
2026-02-22 10:53:23 +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