feat(events): GET /api/events 서버사이드 search 파라미터 추가#26
Merged
Hidden character warning
The head ref may contain hidden characters: "feature/\uc870\uc218\uadfc-events-search"
Conversation
팀원 요청 — 페이지네이션 적용된 클라이언트 측 필터가 아니라 전체에서
서버사이드 검색이 필요. frontend(EventsFilter) 의 검색 박스 placeholder
와 동일한 대상으로 백엔드에서도 매칭.
검색 대상:
- EV-{id}, CAM-{id} 패턴 → Event.id / Event.camera_id 정확 매칭
- 숫자만 입력 → Event.id 매칭
- 부분 일치(ILIKE %s%): Camera.station_name, Camera.location,
Event.event_type, Event.reason
다른 필터(status, type, date_from/to)와는 AND 결합.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
팀원 요청 — 페이지네이션 적용 상태에서 현재 페이지만 보는 게 아니라 전체에서 검색하고 싶음.
추가
GET /api/events/에search쿼리 파라미터 추가.매칭 규칙
EV-{id}/CAM-{id}패턴 → Event.id / Event.camera_id 정확 매칭%search%):Camera.station_name,Camera.location,Event.event_type,Event.reasonfrontend(EventsFilter.tsx) 의 검색 박스 placeholder ("EV-번호, 역이름, 게이트, CAM-번호 검색...") 그대로 백엔드에서 처리. 다른 필터(status, type, date_from/to)와는 AND.
예