-
Notifications
You must be signed in to change notification settings - Fork 0
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 #20 from Leets-Official/19-fearture-tier
19 fearture Tier 객채 생성
- Loading branch information
Showing
30 changed files
with
221 additions
and
175 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
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 |
---|---|---|
|
@@ -68,4 +68,3 @@ public GitHubDto getGitHubDto() { | |
return new GitHubDto(this.githubId); | ||
} | ||
} | ||
|
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 |
---|---|---|
|
@@ -29,4 +29,3 @@ public UserDetails loadUserByUsername(String username) throws UsernameNotFoundEx | |
); | ||
} | ||
} | ||
|
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 |
---|---|---|
|
@@ -158,5 +158,3 @@ public String decrypt(String token) { | |
return new String(decrypted, StandardCharsets.UTF_8); | ||
} | ||
} | ||
|
||
|
25 changes: 5 additions & 20 deletions
25
src/main/java/com/leets/commitatobe/domain/tier/domain/Tier.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 |
---|---|---|
@@ -1,43 +1,28 @@ | ||
package com.leets.commitatobe.domain.tier.domain; | ||
|
||
import com.leets.commitatobe.domain.user.domain.User; | ||
import com.leets.commitatobe.global.shared.entity.BaseTimeEntity; | ||
import jakarta.persistence.*; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.util.List; | ||
import java.util.UUID; | ||
|
||
@Entity | ||
@Getter | ||
@Builder | ||
@NoArgsConstructor | ||
public class Tier extends BaseTimeEntity { | ||
public class Tier { | ||
|
||
@Id @GeneratedValue(strategy = GenerationType.UUID) | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.UUID) | ||
@Column(name = "tier_id") | ||
private UUID id; | ||
|
||
private String tierName; | ||
private String characterUrl; | ||
private String badgeUrl; | ||
|
||
@Column(nullable = false) | ||
private Integer requiredExp; | ||
|
||
@OneToMany(mappedBy = "tier") | ||
private List<User> userList; | ||
|
||
public Tier(UUID id,String tierName, String characterUrl, String badgeUrl, Integer requiredExp, List<User>userList){ | ||
this.id=id; | ||
this.tierName=tierName; | ||
this.characterUrl=characterUrl; | ||
this.badgeUrl=badgeUrl; | ||
this.requiredExp=requiredExp; | ||
this.userList=userList; | ||
public boolean isValid(Integer exp) { | ||
return this.getRequiredExp() != null && this.getRequiredExp() <= exp; | ||
} | ||
|
||
} |
Oops, something went wrong.