-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #472 from KEEPER31337/feature/ctf_카테고리_여러개로_설정되도록_변경
Feature/ctf 카테고리 여러개로 설정되도록 변경
- Loading branch information
Showing
22 changed files
with
423 additions
and
128 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
35 changes: 35 additions & 0 deletions
35
...in/java/keeper/project/homepage/ctf/entity/CtfChallengeHasCtfChallengeCategoryEntity.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package keeper.project.homepage.ctf.entity; | ||
|
||
import java.io.Serializable; | ||
import javax.persistence.Entity; | ||
import javax.persistence.FetchType; | ||
import javax.persistence.Id; | ||
import javax.persistence.IdClass; | ||
import javax.persistence.JoinColumn; | ||
import javax.persistence.ManyToOne; | ||
import javax.persistence.Table; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Builder | ||
@Entity | ||
@Getter | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@IdClass(CtfChallengeHasCtfChallengeCategoryEntityPK.class) // 정의한 idclass 주입 | ||
@Table(name = "ctf_challenge_has_ctf_challenge_category") | ||
public class CtfChallengeHasCtfChallengeCategoryEntity implements Serializable { | ||
|
||
@Id | ||
@ManyToOne(targetEntity = CtfChallengeEntity.class, fetch = FetchType.LAZY) | ||
@JoinColumn(name = "ctf_challenge_id") | ||
private CtfChallengeEntity challenge; | ||
|
||
@Id | ||
@ManyToOne(targetEntity = CtfChallengeCategoryEntity.class, fetch = FetchType.LAZY) | ||
@JoinColumn(name = "ctf_challenge_category_id") | ||
private CtfChallengeCategoryEntity category; | ||
|
||
} |
19 changes: 19 additions & 0 deletions
19
.../java/keeper/project/homepage/ctf/entity/CtfChallengeHasCtfChallengeCategoryEntityPK.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package keeper.project.homepage.ctf.entity; | ||
|
||
import java.io.Serializable; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Getter | ||
@EqualsAndHashCode | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Builder | ||
public class CtfChallengeHasCtfChallengeCategoryEntityPK implements Serializable { | ||
|
||
private Long challenge; | ||
private Long category; | ||
} |
10 changes: 10 additions & 0 deletions
10
...keeper/project/homepage/ctf/repository/CtfChallengeHasCtfChallengeCategoryRepository.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package keeper.project.homepage.ctf.repository; | ||
|
||
import keeper.project.homepage.ctf.entity.CtfChallengeHasCtfChallengeCategoryEntity; | ||
import keeper.project.homepage.ctf.entity.CtfChallengeHasCtfChallengeCategoryEntityPK; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
public interface CtfChallengeHasCtfChallengeCategoryRepository extends | ||
JpaRepository<CtfChallengeHasCtfChallengeCategoryEntity, CtfChallengeHasCtfChallengeCategoryEntityPK> { | ||
|
||
} |
This file contains 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
Oops, something went wrong.