diff --git a/platform/src/main/java/com/flickmatch/platform/dynamodb/model/Subscription.java b/platform/src/main/java/com/flickmatch/platform/dynamodb/model/Subscription.java index b874f396..98ee3abc 100644 --- a/platform/src/main/java/com/flickmatch/platform/dynamodb/model/Subscription.java +++ b/platform/src/main/java/com/flickmatch/platform/dynamodb/model/Subscription.java @@ -43,6 +43,7 @@ public void setSubscriptionId(String subscriptionId) { private Integer gamesLeft; private String expiryDate; + private String cityId; public String getStatus() { return status; @@ -76,6 +77,14 @@ public void setExpiryDate(String expiryDate) { this.expiryDate = expiryDate; } + public String getCityId() { + return cityId; + } + + public void setCityId(String cityId) { + this.cityId = cityId; + } + // This is a composite key made up of userId and subscriptionId @Id private SubscriptionKey subscriptionKey; diff --git a/platform/src/main/java/com/flickmatch/platform/graphql/builder/SubscriptionBuilder.java b/platform/src/main/java/com/flickmatch/platform/graphql/builder/SubscriptionBuilder.java index fc213de3..29f116b7 100644 --- a/platform/src/main/java/com/flickmatch/platform/graphql/builder/SubscriptionBuilder.java +++ b/platform/src/main/java/com/flickmatch/platform/graphql/builder/SubscriptionBuilder.java @@ -72,6 +72,7 @@ public MutationResult createSubscription(String email, String passId) { .gamesLeft(gamesLeft) .status("Active") .expiryDate(expiryDate) + .cityId(pass.getCityId()) .build(); log.error(subscription.toString()); @@ -156,6 +157,7 @@ com.flickmatch.platform.graphql.type.Subscription mapEventToGQLType(Subscription .expiryDate(subs.getExpiryDate()) .gamesLeft(subs.getGamesLeft()) .status(subs.getStatus()) + .cityId(subs.getCityId()) .build(); } diff --git a/platform/src/main/java/com/flickmatch/platform/graphql/type/Subscription.java b/platform/src/main/java/com/flickmatch/platform/graphql/type/Subscription.java index d6068cca..31cb7785 100644 --- a/platform/src/main/java/com/flickmatch/platform/graphql/type/Subscription.java +++ b/platform/src/main/java/com/flickmatch/platform/graphql/type/Subscription.java @@ -13,6 +13,6 @@ public class Subscription { private String passId; private String userId; private Integer gamesLeft; - + private String cityId; private String expiryDate; } diff --git a/platform/src/main/resources/graphql/schema.graphqls b/platform/src/main/resources/graphql/schema.graphqls index c0953e0c..70a772b8 100644 --- a/platform/src/main/resources/graphql/schema.graphqls +++ b/platform/src/main/resources/graphql/schema.graphqls @@ -105,6 +105,7 @@ type Subscription { expiryDate: String! gamesLeft: Int! status: String! + cityId: String! } type Pass {