Skip to content

Commit

Permalink
fix: PostTier 권한 (#5)
Browse files Browse the repository at this point in the history
해당 게시판 등급의 티어만 가능하도록 하는 것이 아닌, 해당 게시판 등급 티어 이상으로 변경
  • Loading branch information
toychip committed Dec 25, 2023
1 parent 01ed47c commit dee4a4a
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
package com.api.TaveShot.domain.post.post.domain;

import static com.api.TaveShot.domain.Member.domain.Tier.*;

import com.api.TaveShot.domain.Member.domain.Tier;
import com.api.TaveShot.global.exception.ApiException;
import com.api.TaveShot.global.exception.ErrorType;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import lombok.ToString;

@ToString
public enum PostTier {
BRONZE_SILVER("BronzeSilver", Arrays.asList(Tier.BRONZE, Tier.SILVER)),
GOLD("Gold", Collections.singletonList(Tier.GOLD)),
PLATINUM("Platinum", Collections.singletonList(Tier.PLATINUM)),
HIGH("High", Arrays.asList(Tier.DIAMOND, Tier.RUBY, Tier.MASTER));
POST_BRONZE_SILVER("BronzeSilver", Arrays.asList(BRONZE, SILVER, GOLD, PLATINUM, DIAMOND, RUBY, MASTER)),
POST_GOLD("Gold", Arrays.asList(GOLD, PLATINUM, DIAMOND, RUBY, MASTER)),
POST_PLATINUM("Platinum", Arrays.asList(PLATINUM, DIAMOND, RUBY, MASTER)),
POST_HIGH("High", Arrays.asList(DIAMOND, RUBY, MASTER));

private final String tier;
private final List<Tier> associatedTiers;
Expand Down

0 comments on commit dee4a4a

Please sign in to comment.