Skip to content

Commit

Permalink
#5 add limited test data
Browse files Browse the repository at this point in the history
  • Loading branch information
kocmana committed Apr 10, 2021
1 parent 3811cae commit a349bc4
Show file tree
Hide file tree
Showing 5 changed files with 230 additions and 192 deletions.
5 changes: 3 additions & 2 deletions customer_service/src/main/resources/application-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ spring:
password:
data: classpath*:sql/testdata.sql
schema: classpath*:sql/schema.sql
resources:
add-mappings: true
h2:
console:
enabled: true
path: /h2-console
web:
resources:
add-mappings: true

logging:
level:
Expand Down
126 changes: 47 additions & 79 deletions customer_service/src/main/resources/sql/testdata.sql
Original file line number Diff line number Diff line change
@@ -1,135 +1,103 @@
-- Default customer
INSERT INTO customer
VALUES (1, 'MALE', 'Max', 'Mustermann', 'Wilheminenstraße', '103/2', '3a', '1160', 'Österreich', '01/234 567 890',
VALUES (1, 'MALE', 'Max', 'Mustermann1', 'Wilheminenstraße', '103/2', '3a', '1160', 'Österreich', '01/234 567 890',
'[email protected]');
INSERT INTO customer
VALUES (2, 'MALE', 'Max', 'Mustermann', 'Wilheminenstraße', '103/2', '3a', '1160', 'Österreich', '01/234 567 890',
VALUES (2, 'MALE', 'Max', 'Mustermann2', 'Wilheminenstraße', '103/2', '3a', '1160', 'Österreich', '01/234 567 890',
'[email protected]');
INSERT INTO customer
VALUES (3, 'MALE', 'Max', 'Mustermann', 'Wilheminenstraße', '103/2', '3a', '1160', 'Österreich', '01/234 567 890',
VALUES (3, 'MALE', 'Max', 'Mustermann3', 'Wilheminenstraße', '103/2', '3a', '1160', 'Österreich', '01/234 567 890',
'[email protected]');
INSERT INTO customer
VALUES (4, 'MALE', 'Max', 'Mustermann', 'Wilheminenstraße', '103/2', '3a', '1160', 'Österreich', '01/234 567 890',
VALUES (4, 'MALE', 'Max', 'Mustermann4', 'Wilheminenstraße', '103/2', '3a', '1160', 'Österreich', '01/234 567 890',
'[email protected]');
INSERT INTO customer
VALUES (5, 'MALE', 'Max', 'Mustermann', 'Wilheminenstraße', '103/2', '3a', '1160', 'Österreich', '01/234 567 890',
VALUES (5, 'MALE', 'Max', 'Mustermann5', 'Wilheminenstraße', '103/2', '3a', '1160', 'Österreich', '01/234 567 890',
'[email protected]');
INSERT INTO customer
VALUES (6, 'MALE', 'Max', 'Mustermann', 'Wilheminenstraße', '103/2', '3a', '1160', 'Österreich', '01/234 567 890',
VALUES (6, 'MALE', 'Max', 'Mustermann6', 'Wilheminenstraße', '103/2', '3a', '1160', 'Österreich', '01/234 567 890',
'[email protected]');
INSERT INTO customer
VALUES (7, 'MALE', 'Max', 'Mustermann', 'Wilheminenstraße', '103/2', '3a', '1160', 'Österreich', '01/234 567 890',
VALUES (7, 'MALE', 'Max', 'Mustermann7', 'Wilheminenstraße', '103/2', '3a', '1160', 'Österreich', '01/234 567 890',
'[email protected]');
INSERT INTO customer
VALUES (8, 'MALE', 'Max', 'Mustermann', 'Wilheminenstraße', '103/2', '3a', '1160', 'Österreich', '01/234 567 890',
VALUES (8, 'MALE', 'Max', 'Mustermann8', 'Wilheminenstraße', '103/2', '3a', '1160', 'Österreich', '01/234 567 890',
'[email protected]');
INSERT INTO customer
VALUES (9, 'MALE', 'Max', 'Mustermann', 'Wilheminenstraße', '103/2', '3a', '1160', 'Österreich', '01/234 567 890',
VALUES (9, 'MALE', 'Max', 'Mustermann9', 'Wilheminenstraße', '103/2', '3a', '1160', 'Österreich', '01/234 567 890',
'[email protected]');
INSERT INTO customer
VALUES (10, 'MALE', 'Max', 'Mustermann', 'Wilheminenstraße', '103/2', '3a', '1160', 'Österreich', '01/234 567 890',
VALUES (10, 'MALE', 'Max', 'Mustermann10', 'Wilheminenstraße', '103/2', '3a', '1160', 'Österreich', '01/234 567 890',
'[email protected]');
INSERT INTO customer
VALUES (11, 'MALE', 'Max', 'Mustermann', 'Wilheminenstraße', '103/2', '3a', '1160', 'Österreich', '01/234 567 890',
VALUES (11, 'MALE', 'Max', 'Mustermann11', 'Wilheminenstraße', '103/2', '3a', '1160', 'Österreich', '01/234 567 890',
'[email protected]');
INSERT INTO customer
VALUES (12, 'MALE', 'Max', 'Mustermann', 'Wilheminenstraße', '103/2', '3a', '1160', 'Österreich', '01/234 567 890',
VALUES (12, 'MALE', 'Max', 'Mustermann12', 'Wilheminenstraße', '103/2', '3a', '1160', 'Österreich', '01/234 567 890',
'[email protected]');
INSERT INTO customer
VALUES (13, 'MALE', 'Max', 'Mustermann', 'Wilheminenstraße', '103/2', '3a', '1160', 'Österreich', '01/234 567 890',
VALUES (13, 'MALE', 'Max', 'Mustermann13', 'Wilheminenstraße', '103/2', '3a', '1160', 'Österreich', '01/234 567 890',
'[email protected]');
INSERT INTO customer
VALUES (14, 'MALE', 'Max', 'Mustermann', 'Wilheminenstraße', '103/2', '3a', '1160', 'Österreich', '01/234 567 890',
VALUES (14, 'MALE', 'Max', 'Mustermann14', 'Wilheminenstraße', '103/2', '3a', '1160', 'Österreich', '01/234 567 890',
'[email protected]');
INSERT INTO customer
VALUES (15, 'MALE', 'Max', 'Mustermann', 'Wilheminenstraße', '103/2', '3a', '1160', 'Österreich', '01/234 567 890',
VALUES (15, 'MALE', 'Max', 'Mustermann15', 'Wilheminenstraße', '103/2', '3a', '1160', 'Österreich', '01/234 567 890',
'[email protected]');
INSERT INTO customer
VALUES (16, 'MALE', 'Max', 'Mustermann', 'Wilheminenstraße', '103/2', '3a', '1160', 'Österreich', '01/234 567 890',
VALUES (16, 'MALE', 'Max', 'Mustermann16', 'Wilheminenstraße', '103/2', '3a', '1160', 'Österreich', '01/234 567 890',
'[email protected]');
INSERT INTO customer
VALUES (17, 'MALE', 'Max', 'Mustermann', 'Wilheminenstraße', '103/2', '3a', '1160', 'Österreich', '01/234 567 890',
VALUES (17, 'MALE', 'Max', 'Mustermann17', 'Wilheminenstraße', '103/2', '3a', '1160', 'Österreich', '01/234 567 890',
'[email protected]');
INSERT INTO customer
VALUES (18, 'MALE', 'Max', 'Mustermann', 'Wilheminenstraße', '103/2', '3a', '1160', 'Österreich', '01/234 567 890',
VALUES (18, 'MALE', 'Max', 'Mustermann18', 'Wilheminenstraße', '103/2', '3a', '1160', 'Österreich', '01/234 567 890',
'[email protected]');
INSERT INTO customer
VALUES (19, 'MALE', 'Max', 'Mustermann', 'Wilheminenstraße', '103/2', '3a', '1160', 'Österreich', '01/234 567 890',
VALUES (19, 'MALE', 'Max', 'Mustermann19', 'Wilheminenstraße', '103/2', '3a', '1160', 'Österreich', '01/234 567 890',
'[email protected]');
INSERT INTO customer
VALUES (20, 'MALE', 'Max', 'Mustermann', 'Wilheminenstraße', '103/2', '3a', '1160', 'Österreich', '01/234 567 890',
'[email protected]');
INSERT INTO customer
VALUES (21, 'MALE', 'Max', 'Mustermann', 'Wilheminenstraße', '103/2', '3a', '1160', 'Österreich', '01/234 567 890',
'[email protected]');
INSERT INTO customer
VALUES (22, 'MALE', 'Max', 'Mustermann', 'Wilheminenstraße', '103/2', '3a', '1160', 'Österreich', '01/234 567 890',
'[email protected]');
INSERT INTO customer
VALUES (23, 'MALE', 'Max', 'Mustermann', 'Wilheminenstraße', '103/2', '3a', '1160', 'Österreich', '01/234 567 890',
'[email protected]');
INSERT INTO customer
VALUES (24, 'MALE', 'Max', 'Mustermann', 'Wilheminenstraße', '103/2', '3a', '1160', 'Österreich', '01/234 567 890',
'[email protected]');
INSERT INTO customer
VALUES (25, 'MALE', 'Max', 'Mustermann', 'Wilheminenstraße', '103/2', '3a', '1160', 'Österreich', '01/234 567 890',
'[email protected]');
INSERT INTO customer
VALUES (26, 'MALE', 'Max', 'Mustermann', 'Wilheminenstraße', '103/2', '3a', '1160', 'Österreich', '01/234 567 890',
'[email protected]');
INSERT INTO customer
VALUES (27, 'MALE', 'Max', 'Mustermann', 'Wilheminenstraße', '103/2', '3a', '1160', 'Österreich', '01/234 567 890',
'[email protected]');
INSERT INTO customer
VALUES (28, 'MALE', 'Max', 'Mustermann', 'Wilheminenstraße', '103/2', '3a', '1160', 'Österreich', '01/234 567 890',
'[email protected]');
INSERT INTO customer
VALUES (29, 'MALE', 'Max', 'Mustermann', 'Wilheminenstraße', '103/2', '3a', '1160', 'Österreich', '01/234 567 890',
'[email protected]');
INSERT INTO customer
VALUES (30, 'MALE', 'Max', 'Mustermann', 'Wilheminenstraße', '103/2', '3a', '1160', 'Österreich', '01/234 567 890',
'[email protected]');
INSERT INTO customer
VALUES (31, 'MALE', 'Max', 'Mustermann', 'Wilheminenstraße', '103/2', '3a', '1160', 'Österreich', '01/234 567 890',
'[email protected]');
INSERT INTO customer
VALUES (32, 'MALE', 'Max', 'Mustermann', 'Wilheminenstraße', '103/2', '3a', '1160', 'Österreich', '01/234 567 890',
'[email protected]');
INSERT INTO customer
VALUES (33, 'MALE', 'Max', 'Mustermann', 'Wilheminenstraße', '103/2', '3a', '1160', 'Österreich', '01/234 567 890',
'[email protected]');
INSERT INTO customer
VALUES (34, 'MALE', 'Max', 'Mustermann', 'Wilheminenstraße', '103/2', '3a', '1160', 'Österreich', '01/234 567 890',
'[email protected]');
INSERT INTO customer
VALUES (35, 'MALE', 'Max', 'Mustermann', 'Wilheminenstraße', '103/2', '3a', '1160', 'Österreich', '01/234 567 890',
'[email protected]');
INSERT INTO customer
VALUES (36, 'MALE', 'Max', 'Mustermann', 'Wilheminenstraße', '103/2', '3a', '1160', 'Österreich', '01/234 567 890',
VALUES (20, 'MALE', 'Max', 'Mustermann20', 'Wilheminenstraße', '103/2', '3a', '1160', 'Österreich', '01/234 567 890',
'[email protected]');

-- Default customer interactions
INSERT INTO customer_interaction
VALUES (1, 'RECRUITED', 2);
INSERT INTO customer_interaction
VALUES (1, 'RECRUITED', 3);
VALUES (2, 'RECRUITED', 3);
INSERT INTO customer_interaction
VALUES (3, 'RECRUITED', 4);
INSERT INTO customer_interaction
VALUES (4, 'RECRUITED', 5);
INSERT INTO customer_interaction
VALUES (5, 'RECRUITED', 6);
INSERT INTO customer_interaction
VALUES (6, 'RECRUITED', 7);
INSERT INTO customer_interaction
VALUES (7, 'ALSO_OWNS', 8);
INSERT INTO customer_interaction
VALUES (8, 'ALSO_OWNS', 9);
INSERT INTO customer_interaction
VALUES (9, 'ALSO_OWNS', 10);
INSERT INTO customer_interaction
VALUES (10, 'ALSO_OWNS', 11);
INSERT INTO customer_interaction
VALUES (1, 'RECRUITED', 4);
VALUES (11, 'GAVE_PRESENT', 12);
INSERT INTO customer_interaction
VALUES (1, 'RECRUITED', 5);
VALUES (12, 'GAVE_PRESENT', 13);
INSERT INTO customer_interaction
VALUES (1, 'RECRUITED', 6);
VALUES (13, 'GAVE_PRESENT', 14);
INSERT INTO customer_interaction
VALUES (1, 'RECRUITED', 7);
VALUES (14, 'GAVE_PRESENT', 15);
INSERT INTO customer_interaction
VALUES (1, 'ALSO_OWNS', 12);
VALUES (15, 'GAVE_PRESENT', 16);
INSERT INTO customer_interaction
VALUES (1, 'ALSO_OWNS', 13);
VALUES (16, 'GAVE_PRESENT', 17);
INSERT INTO customer_interaction
VALUES (1, 'ALSO_OWNS', 14);
VALUES (17, 'RECRUITED', 18);
INSERT INTO customer_interaction
VALUES (1, 'ALSO_OWNS', 15);
VALUES (18, 'RECRUITED', 19);
INSERT INTO customer_interaction
VALUES (1, 'ALSO_OWNS', 16);
VALUES (19, 'RECRUITED', 20);
INSERT INTO customer_interaction
VALUES (1, 'ALSO_OWNS', 17);
VALUES (20, 'RECRUITED', 1);
Loading

0 comments on commit a349bc4

Please sign in to comment.