Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added cityId for subscription. #306

Merged
merged 1 commit into from
Sep 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public void setSubscriptionId(String subscriptionId) {
private Integer gamesLeft;

private String expiryDate;
private String cityId;

public String getStatus() {
return status;
Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down Expand Up @@ -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();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ public class Subscription {
private String passId;
private String userId;
private Integer gamesLeft;

private String cityId;
private String expiryDate;
}
1 change: 1 addition & 0 deletions platform/src/main/resources/graphql/schema.graphqls
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ type Subscription {
expiryDate: String!
gamesLeft: Int!
status: String!
cityId: String!
}

type Pass {
Expand Down
Loading