-
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
7 changed files
with
188 additions
and
212 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
33 changes: 0 additions & 33 deletions
33
src/main/java/com/splanet/splanet/subscription/dao/SubscriptionDao.java
This file was deleted.
Oops, something went wrong.
36 changes: 0 additions & 36 deletions
36
src/main/java/com/splanet/splanet/subscription/dto/SubscriptionDto.java
This file was deleted.
Oops, something went wrong.
11 changes: 11 additions & 0 deletions
11
src/main/java/com/splanet/splanet/subscription/dto/SubscriptionRequest.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.splanet.splanet.subscription.dto; | ||
|
||
import lombok.Getter; | ||
import lombok.Setter; | ||
import com.splanet.splanet.subscription.entity.Subscription; | ||
|
||
@Getter | ||
@Setter | ||
public class SubscriptionRequest { | ||
private Subscription.Type type; | ||
} |
31 changes: 31 additions & 0 deletions
31
src/main/java/com/splanet/splanet/subscription/dto/SubscriptionResponse.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,31 @@ | ||
package com.splanet.splanet.subscription.dto; | ||
|
||
import lombok.Getter; | ||
import lombok.Setter; | ||
import com.splanet.splanet.subscription.entity.Subscription; | ||
|
||
@Getter | ||
@Setter | ||
public class SubscriptionResponse { | ||
private String message; | ||
private SubscriptionDetails subscription; | ||
|
||
public SubscriptionResponse(String message, Subscription subscription) { | ||
this.message = message; | ||
this.subscription = new SubscriptionDetails(subscription); | ||
} | ||
|
||
@Getter | ||
@Setter | ||
public static class SubscriptionDetails { | ||
private Long id; | ||
private String startDate; | ||
private String endDate; | ||
|
||
public SubscriptionDetails(Subscription subscription) { | ||
this.id = subscription.getId(); | ||
this.startDate = subscription.getStartDate().toString(); | ||
this.endDate = subscription.getEndDate().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.