-
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.
- Loading branch information
Showing
12 changed files
with
308 additions
and
32 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
11 changes: 11 additions & 0 deletions
11
src/main/java/com/nextroom/nextRoomServer/enums/EnumModel.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,11 @@ | ||
package com.nextroom.nextRoomServer.enums; | ||
|
||
public interface EnumModel { | ||
String getKey(); | ||
|
||
String getDescription(); | ||
|
||
Integer getOriginPrice(); | ||
|
||
Integer getSellPrice(); | ||
} |
40 changes: 31 additions & 9 deletions
40
src/main/java/com/nextroom/nextRoomServer/enums/SubscriptionPlan.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,16 +1,38 @@ | ||
package com.nextroom.nextRoomServer.enums; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
|
||
@Getter | ||
@AllArgsConstructor | ||
public enum SubscriptionPlan { | ||
STARTER("2κ°μ ν λ§λ₯Ό λ±λ‘ν μ μμ΄μ", 19900, 9900), | ||
PRO("5κ°μ ν λ§λ₯Ό λ±λ‘ν μ μμ΄μ", 29900, 14900), | ||
ENTERPRISE("8κ°μ ν λ§λ₯Ό λ±λ‘ν μ μμ΄μ", 39900, 19900); | ||
public enum SubscriptionPlan implements EnumModel { | ||
MINI("2κ°μ ν λ§λ₯Ό λ±λ‘ν μ μμ΄μ", 19900, 9900), | ||
MEDIUM("5κ°μ ν λ§λ₯Ό λ±λ‘ν μ μμ΄μ", 29900, 14900), | ||
LARGE("8κ°μ ν λ§λ₯Ό λ±λ‘ν μ μμ΄μ", 39900, 19900); | ||
|
||
private final String description; | ||
private final Integer originPrice; | ||
private final Integer sellPrice; | ||
|
||
SubscriptionPlan(String description, Integer originPrice, Integer sellPrice) { | ||
this.description = description; | ||
this.originPrice = originPrice; | ||
this.sellPrice = sellPrice; | ||
} | ||
|
||
@Override | ||
public String getKey() { | ||
return name(); | ||
} | ||
|
||
@Override | ||
public String getDescription() { | ||
return description; | ||
} | ||
|
||
@Override | ||
public Integer getOriginPrice() { | ||
return originPrice; | ||
} | ||
|
||
@Override | ||
public Integer getSellPrice() { | ||
return sellPrice; | ||
} | ||
|
||
} |
34 changes: 21 additions & 13 deletions
34
src/main/java/com/nextroom/nextRoomServer/enums/SubscriptionStatus.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,17 +1,25 @@ | ||
package com.nextroom.nextRoomServer.enums; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
|
||
@Getter | ||
@AllArgsConstructor | ||
public enum SubscriptionStatus { | ||
SUBSCRIPTION_RECOVERED, // μ κΈ° κ²°μ κ° κ³μ 보λ₯μμ 볡ꡬλμμ΅λλ€. | ||
SUBSCRIPTION_RENEWED, // νμ± μ κΈ° κ²°μ κ° κ°±μ λμμ΅λλ€. | ||
SUBSCRIPTION_CANCELED, // μ κΈ° κ²°μ κ° μλ°μ μΌλ‘ λλ λΉμλ°μ μΌλ‘ μ·¨μλμμ΅λλ€. μλ°μ μ·¨μμ κ²½μ° μ¬μ©μκ° μ·¨μν λ μ μ‘λ©λλ€. | ||
SUBSCRIPTION_PURCHASED, // μλ‘μ΄ μ κΈ° κ²°μ κ° κ΅¬λ§€λμμ΅λλ€. | ||
SUBSCRIPTION_ON_HOLD, // μ κΈ° κ²°μ κ° κ³μ 보λ₯ μνκ° λμμ΅λλ€(μ¬μ© μ€μ λ κ²½μ°). | ||
SUBSCRIPTION_IN_GRACE_PERIOD, // μ κΈ° κ²°μ κ° μ μ κΈ°κ° μνλ‘ μ νλμμ΅λλ€(μ¬μ© μ€μ λ κ²½μ°). | ||
SUBSCRIPTION_RESTARTED, // μ¬μ©μκ° Play > κ³μ > μ κΈ° κ²°μ μμ μ κΈ° κ²°μ λ₯Ό 볡μνμ΅λλ€. μ κΈ° κ²°μ κ° μ·¨μλμμ§λ§ μ¬μ©μκ° λ³΅μν λ μμ§ λ§λ£λμ§ μμμ΅λλ€. μμΈν λ΄μ©μ 볡μμ μ°Έκ³ νμΈμ. | ||
SUBSCRIPTION_PRICE_CHANGE_CONFIRMED, // μ¬μ©μκ° μ κΈ° κ²°μ κ°κ²© λ³κ²½μ νμΈνμ΅λλ€. | ||
SUBSCRIPTION_DEFERRED, // ꡬλ κ°±μ κΈ°νμ΄ μ°μ₯λμμ΅λλ€. | ||
SUBSCRIPTION_PAUSED, // ꡬλ μ΄ μΌμμ€μ§λμμ΅λλ€. | ||
SUBSCRIPTION_PAUSE_SCHEDULE_CHANGED, // μ κΈ° κ²°μ μΌμμ€μ§ μΌμ μ΄ λ³κ²½λμμ΅λλ€. | ||
SUBSCRIPTION_REVOKED, // μ κΈ° κ²°μ κ° λ§λ£ μκ° μ μ μ¬μ©μμ μν΄ μ·¨μλμμ΅λλ€. | ||
SUBSCRIPTION_EXPIRED // μ κΈ° κ²°μ κ° λ§λ£λμμ΅λλ€. | ||
SUBSCRIPTION_RECOVERED(1), // μ κΈ° κ²°μ κ° κ³μ 보λ₯μμ 볡ꡬλμμ΅λλ€. | ||
SUBSCRIPTION_RENEWED(2), // νμ± μ κΈ° κ²°μ κ° κ°±μ λμμ΅λλ€. | ||
SUBSCRIPTION_CANCELED(3), // μ κΈ° κ²°μ κ° μλ°μ μΌλ‘ λλ λΉμλ°μ μΌλ‘ μ·¨μλμμ΅λλ€. μλ°μ μ·¨μμ κ²½μ° μ¬μ©μκ° μ·¨μν λ μ μ‘λ©λλ€. | ||
SUBSCRIPTION_PURCHASED(4), // μλ‘μ΄ μ κΈ° κ²°μ κ° κ΅¬λ§€λμμ΅λλ€. | ||
SUBSCRIPTION_ON_HOLD(5), // μ κΈ° κ²°μ κ° κ³μ 보λ₯ μνκ° λμμ΅λλ€(μ¬μ© μ€μ λ κ²½μ°). | ||
SUBSCRIPTION_IN_GRACE_PERIOD(6), // μ κΈ° κ²°μ κ° μ μ κΈ°κ° μνλ‘ μ νλμμ΅λλ€(μ¬μ© μ€μ λ κ²½μ°). | ||
SUBSCRIPTION_RESTARTED( | ||
7), // μ¬μ©μκ° Play > κ³μ > μ κΈ° κ²°μ μμ μ κΈ° κ²°μ λ₯Ό 볡μνμ΅λλ€. μ κΈ° κ²°μ κ° μ·¨μλμμ§λ§ μ¬μ©μκ° λ³΅μν λ μμ§ λ§λ£λμ§ μμμ΅λλ€. μμΈν λ΄μ©μ 볡μμ μ°Έκ³ νμΈμ. | ||
SUBSCRIPTION_PRICE_CHANGE_CONFIRMED(8), // μ¬μ©μκ° μ κΈ° κ²°μ κ°κ²© λ³κ²½μ νμΈνμ΅λλ€. | ||
SUBSCRIPTION_DEFERRED(9), // ꡬλ κ°±μ κΈ°νμ΄ μ°μ₯λμμ΅λλ€. | ||
SUBSCRIPTION_PAUSED(10), // ꡬλ μ΄ μΌμμ€μ§λμμ΅λλ€. | ||
SUBSCRIPTION_PAUSE_SCHEDULE_CHANGED(11), // μ κΈ° κ²°μ μΌμμ€μ§ μΌμ μ΄ λ³κ²½λμμ΅λλ€. | ||
SUBSCRIPTION_REVOKED(12), // μ κΈ° κ²°μ κ° λ§λ£ μκ° μ μ μ¬μ©μμ μν΄ μ·¨μλμμ΅λλ€. | ||
SUBSCRIPTION_EXPIRED(13); // μ κΈ° κ²°μ κ° λ§λ£λμμ΅λλ€. | ||
|
||
private final Integer status; | ||
} |
16 changes: 16 additions & 0 deletions
16
src/main/java/com/nextroom/nextRoomServer/enums/UserStatus.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,16 @@ | ||
package com.nextroom.nextRoomServer.enums; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
|
||
@Getter | ||
@AllArgsConstructor | ||
public enum UserStatus { | ||
FREE("λ¬΄λ£ μ²΄ν"), | ||
HOLD("μ μ κΈ°κ°"), | ||
EXPIRATION("μ μ κΈ°κ° λ§λ£"), | ||
SUBSCRIPTION("ꡬλ "), | ||
SUBSCRIPTION_EXPIRATION("ꡬλ λ§λ£"); | ||
|
||
private final String status; | ||
} |
11 changes: 11 additions & 0 deletions
11
src/main/java/com/nextroom/nextRoomServer/repository/SubscriptionRepository.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,11 @@ | ||
package com.nextroom.nextRoomServer.repository; | ||
|
||
import java.util.Optional; | ||
|
||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
import com.nextroom.nextRoomServer.domain.Subscription; | ||
|
||
public interface SubscriptionRepository extends JpaRepository<Subscription, Long> { | ||
Optional<Subscription> findByShopId(Long id); | ||
} |
Oops, something went wrong.