Skip to content

Commit

Permalink
Merge pull request #13 from anti-social-engineers/staging
Browse files Browse the repository at this point in the history
Staging sprint 2/3
  • Loading branch information
KyrumX authored Jun 10, 2019
2 parents 27be65b + 41cf353 commit 205a7c7
Show file tree
Hide file tree
Showing 44 changed files with 3,197 additions and 441 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -217,3 +217,8 @@ out
.vertx

config.json

ssl/*.pem

static/images/*
static/temp/*
22 changes: 17 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.ase</groupId>
<artifactId>acecardapi</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>0.3.0-BETA</version>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down Expand Up @@ -51,7 +51,7 @@
<dependency>
<groupId>io.reactiverse</groupId>
<artifactId>reactive-pg-client</artifactId>
<version>0.11.2</version>
<version>0.11.3</version>
</dependency>
<dependency>
<groupId>io.vertx</groupId>
Expand Down Expand Up @@ -79,9 +79,21 @@
<artifactId>vertx-web-client</artifactId>
<version>3.7.1</version>
</dependency>



<dependency>
<groupId>org.owasp.encoder</groupId>
<artifactId>encoder</artifactId>
<version>1.2.2</version>
</dependency>
<dependency>
<groupId>io.sentry</groupId>
<artifactId>sentry</artifactId>
<version>1.7.16</version>
</dependency>
<dependency>
<groupId>com.stripe</groupId>
<artifactId>stripe-java</artifactId>
<version>10.0.2</version>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
Expand Down
67 changes: 52 additions & 15 deletions sql/insert-database.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,55 +3,92 @@
---

INSERT INTO addresses (id, address, address_num, city, postalcode, country)
VALUES (1, 'Schermerhornstraat', 25, 'Rotterdam', '3066TG', 'NLD'),
(2, 'Wijnhaven', 107, 'Rotterdam', '3011WN', 'NLD'),
(3, 'Geerhoek', 167, 'Wouw', '4724EG', 'NLD'),
(4, 'Edisonstraat', 145, 'Wijchen', '6604BV', 'NLD');
VALUES ('7372a47b-9629-4037-aae4-e7494979b3c4', 'Schermerhornstraat', 25, 'Rotterdam', '3066TG', 'NLD'),
('1c7ef92f-5424-438f-84f4-ba0158ad06e4', 'Wijnhaven', 107, 'Rotterdam', '3011WN', 'NLD'),
('48812838-57c7-4289-86cd-f40a132d61b5', 'Geerhoek', 167, 'Wouw', '4724EG', 'NLD'),
('df0eaa27-c448-41e5-a5e6-e4e021d03e9f', 'Peppelbos', 90, 'Geldermalsen', '4191ME', 'NLD'),
('88ec5c75-c2f0-42b9-9272-c8796267c178', 'Hoorzik', 148, 'Kerkdriel', '5331KG', 'NLD'),
('84cf8972-72c4-4184-a0d9-ab75bdfc3116', 'Graaflandstraat', 164, 'Geleen', '6165VK', 'NLD'),
('1ef598dc-965d-4855-8c04-2450e6e73311', 'Kanon', 140, 'Zutphen', '7205GL', 'NLD'),
('5b214aa6-4fb6-4eca-aefa-62a4568be445', 'Edisonstraat', 145, 'Wijchen', '6604BV', 'NLD');


---
--- [USERS]
--- password: hogeschool123
--- password: helloworld123
---
INSERT INTO users (id, email, password, password_salt, is_email_verified, role)
VALUES ('a2b19f94-4fb1-48d3-9e35-b6e250979d5c', '[email protected]', '0A9788E54B409D6C9D0283A4FDE01DDCB2C3683BED0146F3FA03869C5000C16485CB0654227B79467940104AAD6615EE7838D022125C9E7B88EF12C18667E7F4', '16699C320C8E3765044AC7911471437C0D74BB463CBB3202138336A26777152E', true, 'sysop'),
('e2005006-2d8a-4f6f-b557-f16da75519bf', '[email protected]', '1C047E52BF2E862FD2D6B1AA30048950ACCF04F7B33429F490D45513A1A849890C622A220B49C92FA7FA7FBE560E809530B3407A6E84429FD49B25E6B561C046', '47E500D81774256B5A7D16423CF275C09E061963C1AB0A55388793588B98912F', true, 'customer'),
('4f8c9c3c-c91d-4db0-9f8b-b8a6eb9dcc97', '[email protected]', '1C047E52BF2E862FD2D6B1AA30048950ACCF04F7B33429F490D45513A1A849890C622A220B49C92FA7FA7FBE560E809530B3407A6E84429FD49B25E6B561C046', '47E500D81774256B5A7D16423CF275C09E061963C1AB0A55388793588B98912F', true, 'clubowner');
('e2005006-2d8a-4f6f-b557-f16da75519bf', '[email protected]', '0A9788E54B409D6C9D0283A4FDE01DDCB2C3683BED0146F3FA03869C5000C16485CB0654227B79467940104AAD6615EE7838D022125C9E7B88EF12C18667E7F4', '16699C320C8E3765044AC7911471437C0D74BB463CBB3202138336A26777152E', true, 'user'),
('884e13f3-3ae1-4399-bad4-4495af7bdfda', '[email protected]', '0A9788E54B409D6C9D0283A4FDE01DDCB2C3683BED0146F3FA03869C5000C16485CB0654227B79467940104AAD6615EE7838D022125C9E7B88EF12C18667E7F4', '16699C320C8E3765044AC7911471437C0D74BB463CBB3202138336A26777152E', true, 'user'),
('4f06b3ea-292e-40b5-9901-3ed380c8e575', '[email protected]', '0A9788E54B409D6C9D0283A4FDE01DDCB2C3683BED0146F3FA03869C5000C16485CB0654227B79467940104AAD6615EE7838D022125C9E7B88EF12C18667E7F4', '16699C320C8E3765044AC7911471437C0D74BB463CBB3202138336A26777152E', true, 'user'),
('5a4c882c-c5e5-4c90-a0e0-7877f705bc3e', '[email protected]', '0A9788E54B409D6C9D0283A4FDE01DDCB2C3683BED0146F3FA03869C5000C16485CB0654227B79467940104AAD6615EE7838D022125C9E7B88EF12C18667E7F4', '16699C320C8E3765044AC7911471437C0D74BB463CBB3202138336A26777152E', true, 'user'),
('d952e373-2f43-456e-a76a-c01541952c8b', '[email protected]', 'A786C507067D85CE14752BD745B13C0701E6804B9E93B28BF13C6ED365D5A21FDF6BA5CC9E418EC654714C209DFE3C8E8421FEC939990058430DC5277A12790F', '1A02425D28F15C10880EC240DB7EA9E80673830585D8BF320091BC0F7DFC964A', true, 'sysop'),
('ab5b9a98-fcac-4ecd-92ec-952e4d799f02', '[email protected]', '02CFEF7D718081F60F917D8C3082F87274DFE0AFCD4362BCC1DA5A8D6585323104815275425FEC61AAA1B57BE5DB558059631938C767350C91C56C3D30AEA48A', '68CF13B93C90717CE95A5BE88919DFD947F2A8FEC37677FB19DFCD0D39EDF974', true, 'sysop'),
('4f8c9c3c-c91d-4db0-9f8b-b8a6eb9dcc97', '[email protected]', '0A9788E54B409D6C9D0283A4FDE01DDCB2C3683BED0146F3FA03869C5000C16485CB0654227B79467940104AAD6615EE7838D022125C9E7B88EF12C18667E7F4', '16699C320C8E3765044AC7911471437C0D74BB463CBB3202138336A26777152E', true, 'club_employee');

---
--- [CARD]
--- Ensure ID is an actual id which corresponds with a id on a card
---
INSERT INTO cards (id, is_activated, credits, is_blocked, user_id_id)
VALUES ('randomCardSecretID', true, 19.99, false, 'e2005006-2d8a-4f6f-b557-f16da75519bf');
--- Club Awsome Owner: TVobdap635jvPSW9KShf1ZuBDLDuh8a7syXEjl58+Vs=0000
--- Lisse: cB7K+6hwm+dZCBmoNT76N7CPONRFTepfWql3jQ7n9+g=0000
--- Zain: WNDBvlAKKzxuiNTaWLBvzI54Hiw4EuapQBz4y4HTnaU=0000
--- Isabelle: nu3lP0Ez0Kyv/pivqMzo+3JZZHF0V9N2HWlEn458414=0000
--- PIN for testing: 5900
--- Default encryption key: C*F-JaNdRgUjXn2r5u8x/A?D(G+KbPeS (Do not use on DEPLOYMENT!)
INSERT INTO cards (id, card_code, is_activated, credits, is_blocked, user_id_id, requested_at, pin, pin_salt)
VALUES ('4e162c6c-cc6f-433f-a6aa-bb167a9d8480', '1234567812345678', true, 0.00, false, '4f8c9c3c-c91d-4db0-9f8b-b8a6eb9dcc97', '2019-06-03 08:23:54+02:00', 'A1450B46955F99C694DCCE64C1255DBFE3281BF06B45B7A9788CBF50D79F98950670E60C1C9F1FA79931FDB4478650791F734EEA3C5E13FA0E39086A2931CA2D', '6740AFA544E5741DBB256183D125F0C15B59006D9EDDC3A5C21110B4C70420B6'),
('de38d61f-a202-47c0-96d4-1b13de0f48c4', 'abcd1234abcd1234', true, 100000.00, false, '884e13f3-3ae1-4399-bad4-4495af7bdfda', '2019-06-09 19:05:54+02:00', 'A1450B46955F99C694DCCE64C1255DBFE3281BF06B45B7A9788CBF50D79F98950670E60C1C9F1FA79931FDB4478650791F734EEA3C5E13FA0E39086A2931CA2D', '6740AFA544E5741DBB256183D125F0C15B59006D9EDDC3A5C21110B4C70420B6'),
('d54b05ee-7eee-4c34-a87b-98659c289df5', '4321dcba4321dcba', true, 0.00, false, '4f06b3ea-292e-40b5-9901-3ed380c8e575', '2019-06-04 11:33:57+02:00', 'A1450B46955F99C694DCCE64C1255DBFE3281BF06B45B7A9788CBF50D79F98950670E60C1C9F1FA79931FDB4478650791F734EEA3C5E13FA0E39086A2931CA2D', '6740AFA544E5741DBB256183D125F0C15B59006D9EDDC3A5C21110B4C70420B6'),
('17bcd819-4dbc-46ff-b4f9-ed8e79c7e402', 'qwerty12345query', true, 29.99, true, '5a4c882c-c5e5-4c90-a0e0-7877f705bc3e', '2019-06-05 13:24:57+02:00', 'A1450B46955F99C694DCCE64C1255DBFE3281BF06B45B7A9788CBF50D79F98950670E60C1C9F1FA79931FDB4478650791F734EEA3C5E13FA0E39086A2931CA2D', '6740AFA544E5741DBB256183D125F0C15B59006D9EDDC3A5C21110B4C70420B6');


---
--- [CLUB]
---
INSERT INTO clubs (id, min_age, club_address_id, owner_id, club_name)
VALUES ('2d466140-f70b-4ac3-8156-ee922657bacd', 18, 2, '4f8c9c3c-c91d-4db0-9f8b-b8a6eb9dcc97', 'ClubAwsome');
VALUES ('2d466140-f70b-4ac3-8156-ee922657bacd', 18, '1c7ef92f-5424-438f-84f4-ba0158ad06e4', '4f8c9c3c-c91d-4db0-9f8b-b8a6eb9dcc97', 'ACE of Clubs');


---
--- [USER]
--- Update user to have address and additional data
---
UPDATE users
SET first_name = 'Aaron', last_name = 'Beetstra', gender = 'Man', date_of_birth = '1999-01-18', address_id = 1
SET first_name = 'Aaron', last_name = 'Beetstra', gender = 'Man', date_of_birth = '1999-01-18', address_id = '7372a47b-9629-4037-aae4-e7494979b3c4'
WHERE id = 'a2b19f94-4fb1-48d3-9e35-b6e250979d5c';

UPDATE users
SET first_name = 'Selim', last_name = 'Aydi', gender = 'Man', date_of_birth = '1997-01-1', address_id = 4
SET first_name = 'Selim', last_name = 'Aydi', gender = 'Man', date_of_birth = '1997-01-1', address_id = '48812838-57c7-4289-86cd-f40a132d61b5'
WHERE id = 'e2005006-2d8a-4f6f-b557-f16da75519bf';

UPDATE users
SET first_name = 'Mr.', last_name = 'Awsome', gender = 'Man', date_of_birth = '1980-08-16', address_id = 3
SET first_name = 'Mr.', last_name = 'Awsome', gender = 'Man', date_of_birth = '1980-08-16', address_id = '5b214aa6-4fb6-4eca-aefa-62a4568be445'
WHERE id = '4f8c9c3c-c91d-4db0-9f8b-b8a6eb9dcc97';

UPDATE users
SET first_name = 'Edo', last_name = 'Hooghiemster', gender = 'Man', date_of_birth = '1980-08-16', address_id = 'df0eaa27-c448-41e5-a5e6-e4e021d03e9f'
WHERE id = 'ab5b9a98-fcac-4ecd-92ec-952e4d799f02';

UPDATE users
SET first_name = 'Sysop', last_name = 'Raspberry Pi', gender = 'M', date_of_birth = '2019-06-04', address_id = '7372a47b-9629-4037-aae4-e7494979b3c4'
WHERE id = 'd952e373-2f43-456e-a76a-c01541952c8b';

UPDATE users
SET first_name = 'Lisse', last_name = 'Heukels', gender = 'F', date_of_birth = '1997-06-13', address_id = '88ec5c75-c2f0-42b9-9272-c8796267c178', image_id = '555aa732-8f4e-4177-9ff7-7c2cd580bb77'
WHERE id = '884e13f3-3ae1-4399-bad4-4495af7bdfda';

UPDATE users
SET first_name = 'Zain', last_name = 'van Bragt', gender = 'M', date_of_birth = '1993-01-31', address_id = '84cf8972-72c4-4184-a0d9-ab75bdfc3116', image_id = '99bdebaf-fa4e-4387-8ccb-16a4041bcf0c'
WHERE id = '4f06b3ea-292e-40b5-9901-3ed380c8e575';

UPDATE users
SET first_name = 'Isabelle', last_name = 'Knoppers', gender = 'F', date_of_birth = '1968-09-24', address_id = '1ef598dc-965d-4855-8c04-2450e6e73311', image_id = 'c2bcd28f-06fc-4d72-9e48-546f3a2322ea'
WHERE id = '5a4c882c-c5e5-4c90-a0e0-7877f705bc3e';


---
--- [PENALTIES]
---
INSERT INTO penalties (id, date_received, handed_out_by_id, received_at_id, recipient_id_id, description)
VALUES (1, '2019-05-16', '4f8c9c3c-c91d-4db0-9f8b-b8a6eb9dcc97', '2d466140-f70b-4ac3-8156-ee922657bacd', 'e2005006-2d8a-4f6f-b557-f16da75519bf', 'Verkocht coke');
VALUES ('a2b19f94-4fb1-48d3-9e35-b6e250979d5c', '2019-06-09', '4f8c9c3c-c91d-4db0-9f8b-b8a6eb9dcc97', '2d466140-f70b-4ac3-8156-ee922657bacd', '4f06b3ea-292e-40b5-9901-3ed380c8e575', 'Deed moeilijk met betalen');
Loading

0 comments on commit 205a7c7

Please sign in to comment.