-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: moved pojos to package pojo, totally refactor submission bu…
…siness
- Loading branch information
1 parent
dd6f299
commit 4a5d64f
Showing
27 changed files
with
334 additions
and
439 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
2 changes: 1 addition & 1 deletion
2
src/main/java/cn/kastner/oj/controller/JudgeServerRestController.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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,11 @@ | ||
package cn.kastner.oj.domain; | ||
|
||
import lombok.Data; | ||
import org.hibernate.annotations.Fetch; | ||
import org.hibernate.annotations.FetchMode; | ||
|
||
import javax.persistence.*; | ||
import java.util.ArrayList; | ||
import java.util.List; | ||
import java.util.UUID; | ||
|
||
@Entity | ||
@Data | ||
@Table(name = "ranking") | ||
public class Ranking { | ||
|
||
@Id | ||
@Column(length = 40) | ||
private String id; | ||
|
||
@OneToOne | ||
private Contest contest; | ||
|
||
@OneToMany( | ||
mappedBy = "ranking", | ||
fetch = FetchType.LAZY, | ||
cascade = {CascadeType.ALL}) | ||
@Fetch(FetchMode.SUBSELECT) | ||
private List<RankingUser> rankingUserList; | ||
|
||
@Fetch(FetchMode.SUBSELECT) | ||
@ManyToMany(fetch = FetchType.LAZY) | ||
@JoinTable( | ||
name = "ranking_user", | ||
joinColumns = {@JoinColumn(name = "ranking_id", referencedColumnName = "id")}, | ||
inverseJoinColumns = {@JoinColumn(name = "user_id", referencedColumnName = "id")}) | ||
private List<User> userListExcluded; | ||
|
||
public Ranking() { | ||
this.id = UUID.randomUUID().toString(); | ||
this.rankingUserList = new ArrayList<>(); | ||
this.userListExcluded = new ArrayList<>(); | ||
} | ||
private String id = UUID.randomUUID().toString(); | ||
} |
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.