Feature/#155 ContestSubmission entity repository 추가#156
Merged
Hidden character warning
The head ref may contain hidden characters: "Feature/ContestSubmission_entity_repository_\ucd94\uac00"
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds persistence primitives for contest submissions by introducing ContestSubmission / ContestSubmissionItem JPA entities and repositories, along with schema updates to create the backing tables (noting this PR currently includes #154-related ContestSubmissionItem changes due to branch base).
Changes:
- Add
ContestSubmissionandContestSubmissionItementities with soft-delete filtering (@SQLRestriction) and delete behavior (@SQLDelete). - Add Spring Data JPA repositories for the new entities, including an existence check for duplicate submissions.
- Update
schema.sqlto drop/create the new submission-related tables and supporting enum tables.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/main/resources/schema.sql | Adds DDL for contest submission/item tables and drop statements for clean initialization |
| src/main/java/com/opus/opus/modules/contest/domain/SubmissionVisibility.java | Introduces visibility enum used by submission items |
| src/main/java/com/opus/opus/modules/contest/domain/SubmissionFileFormat.java | Introduces allowed file format enum for submission items |
| src/main/java/com/opus/opus/modules/contest/domain/dao/ContestSubmissionRepository.java | Adds repository with duplicate-submission existence query |
| src/main/java/com/opus/opus/modules/contest/domain/dao/ContestSubmissionItemRepository.java | Adds repository for submission items |
| src/main/java/com/opus/opus/modules/contest/domain/ContestSubmissionItem.java | Adds submission item entity (time window, formats, contest/track association, soft delete) |
| src/main/java/com/opus/opus/modules/contest/domain/ContestSubmission.java | Adds submission entity (teamId, firstSubmittedAt, submissionItem association, soft delete) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+121
to
+124
| `team_id` bigint NOT NULL, | ||
| `contest_submission_item_id` bigint NOT NULL, | ||
| PRIMARY KEY (`id`) | ||
| ); |
JJimini
approved these changes
Jun 16, 2026
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.
🔥 연관된 이슈
close: #155
📜 작업 내용
설계 요약
-
teamId: 교차 모듈(team)이라TeamContestAward관례를 따라 plainLong으로 두었습니다.submissionItem: 같은 contest 모듈이라@ManyToOne연관관계로 연결했습니다.firstSubmittedAt(최초 제출일시),isDeleted(소프트 삭제)status(조회 시점 계산값)files(File이referenceId로 느슨 연결)version(현 명세상 불필요하여 보류)contest(submissionItem경유 도달)existsByTeamIdAndSubmissionItem만 추가했습니다.💬 리뷰 요구사항
✨ 기타