https://github.com/mightypixel/subs-store-svc
A micronaut test project
https://github.com/mightypixel/subs-store-svc
Last synced: over 1 year ago
JSON representation
A micronaut test project
- Host: GitHub
- URL: https://github.com/mightypixel/subs-store-svc
- Owner: MightyPixel
- Created: 2019-08-10T11:31:06.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-10-13T15:14:34.000Z (over 5 years ago)
- Last Synced: 2025-01-23T22:24:28.268Z (over 1 year ago)
- Language: Java
- Size: 30.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Subscription Store Service
## Setup
- Example Data
```
INSERT INTO "subs_store"."subscriptions" ("subscription_id", "subscription_provider", "subscription_status", "effective_start_date", "effective_end_date", "user_id") VALUES ('A-1235', 'Google', 'canceled', '2019-01-01 00:00:00 +0000', '2020-01-31 00:00:00 +0000', 9b93c7db-ea92-41ac-b6bd-cb7fd565e946);
INSERT INTO "subs_store"."subscriptions" ("subscription_id", "subscription_provider", "subscription_status", "effective_start_date", "effective_end_date", "user_id") VALUES ('A-123', 'FT', 'active', '2019-01-01 00:00:00 +0000', '2020-01-01 00:00:00 +0000', 9b93c7db-ea92-41ac-b6bd-cb7fd565e946);
INSERT INTO "subs_store"."subscriptions" ("subscription_id", "subscription_provider", "subscription_status", "effective_start_date", "effective_end_date", "user_id") VALUES ('A-1234', 'Google', 'active', '2019-02-01 00:00:00 +0000', '2020-02-01 00:00:00 +0000', 9b93c7db-ea92-41ac-b6bd-cb7fd565e946);
INSERT INTO "subs_store"."subscriptions" ("subscription_id", "subscription_provider", "subscription_status", "effective_start_date", "effective_end_date", "user_id") VALUES ('B-4123', 'FT', 'active', '2019-01-01 00:00:00 +0000', '2020-01-01 00:00:00 +0000', b0d77626-9d83-44f3-93c9-0ac0abc9c3fa);
```
- Example Queries
- `SELECT * FROM "subs_store"."subscriptions" WHERE "subscription_id" = 'A-1234'`
- `SELECT * FROM subscriptions_by_user where user_id = 9b93c7db-ea92-41ac-b6bd-cb7fd565e946 AND subscription_provider = 'Google';`