feat: WorkerDocument-Task 연결 및 taskId 필터 지원 - #87
Merged
Conversation
krestar
approved these changes
Aug 5, 2026
krestar
left a comment
Contributor
There was a problem hiding this comment.
현재 운영 DB와 운영 트래픽이 없고, 후속 V16이 최초 배포 전에 함께 적용될 예정이므로 이 PR은 승인하겠습니다.
다만 현재 V15의 (task_id, company_id) FK만으로는 같은 사업장 내에서 다른 근로자의 Task를 WorkerDocument에 연결할 수 있습니다. 이 부분은 제가 진행 중인 V16 tenant 무결성 보강에서 다음과 같이 처리하겠습니다.
task(task_id, worker_id, company_id) 복합 UNIQUE 추가
worker_document(task_id, worker_id, company_id) 복합 FK로 교체
등록 시 Task 존재 여부와 Task–Worker 일치 검증
동일 사업장 다른 근로자, 타 사업장, 존재하지 않는 Task 연결 거부 테스트
hywznn
reviewed
Aug 5, 2026
| seed.documentId(), | ||
| seed.workerId(), | ||
| context.companyId(), | ||
| null, |
Contributor
There was a problem hiding this comment.
taskId 부분은 현재 null인 이유가 있을까요
Contributor
Author
There was a problem hiding this comment.
제가 섣불리 건드는 것 보다, 그 부분 체크 하고 싶어서 krestat 리뷰 요청드린건데 demo 머지 충돌 해결하면서 맞춘 임시 처리입니다!
따로 말씀드렸고 확인 픽스 주신다고 하셨습니다. 원래 본문에 추가했어야 했는데 리뷰 포인트로// 확인해주셔서 감사해욥!!
21 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
왜 필요한가요?
Closes #60
taskId 누락 이슈로, WorkerDocument 도메인 자체에 taskId 필드가 없어 근로자 서류를 특정 업무카드와 연결해 조회하는 기능을 추가합니다.
완료된 범위
결정 사항
검증
알려진 이슈 (후속 조치)
WorkerDocument에 연결하는 것을 막지 못함 -> krestar님이 chore: Worker Link tenant 무결성과 PostgreSQL RLS 보강 #90(V16)에서
(task_id, worker_id, company_id) 복합 FK로 보강 예정
처리됨 -> hywznn님이 #88에서 실제 Task 연결로 수정 완료