Skip to content
Merged
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
83 changes: 58 additions & 25 deletions src/main/resources/data.sql
Original file line number Diff line number Diff line change
@@ -1,29 +1,62 @@
INSERT INTO students (email, firstname, lastname, password, phone, address, latitude, longitude, seats_total) VALUES ('test1@example.com', 'Test', 'One', '$2y$12$64tDT6l8QboRzO7RLg8gE.okeOMxM/2CC4MTuR6SvLa/bf3GE4KxC', '0600000001', 'Rue Exemple 1, 75000 Paris', 48.8562, 2.4822, 1);
INSERT INTO students (email, firstname, lastname, password, phone, address, latitude, longitude, seats_total) VALUES ('test2@example.com', 'Test', 'Two', '$2y$12$64tDT6l8QboRzO7RLg8gE.okeOMxM/2CC4MTuR6SvLa/bf3GE4KxC', '0600000002', 'Rue Exemple 2, 75000 Paris', 48.8562, 2.4252, 4);
INSERT INTO students (email, firstname, lastname, password, phone, address, latitude, longitude, seats_total) VALUES ('test3@example.com', 'Test', 'Three', '$2y$12$64tDT6l8QboRzO7RLg8gE.okeOMxM/2CC4MTuR6SvLa/bf3GE4KxC', '0600000003', 'Rue Exemple 3, 75000 Paris', 48.8562, 2.4242, 2);
-- Clean seed data compatible with schema.sql
-- 15 students (IDs will be 1..15 when inserted in this order)
-- Using the same bcrypt password hash for all students for convenience

INSERT INTO availabilities (student_id, day_of_week, start_time, end_time)
VALUES
(1, 'Lundi', '08:30:00', '12:00:00'),
(1, 'Mardi', '13:30:00', '17:00:00'),
(1, 'Jeudi', '09:00:00', '11:30:00'),
(1, 'Vendredi', '14:00:00', '18:00:00');
INSERT INTO students (id, email, firstname, lastname, password, phone, address, latitude, longitude, seats_total) VALUES
(1, 'alice.dubois@example.com', 'Alice', 'Dubois', '$2y$12$64tDT6l8QboRzO7RLg8gE.okeOMxM/2CC4MTuR6SvLa/bf3GE4KxC', '0660012345', '12 Rue de Rivoli 75004 Paris', 48.8566, 2.3522, 1),
(2, 'benjamin.lefevre@example.com', 'Benjamin', 'Lefevre', '$2y$12$64tDT6l8QboRzO7RLg8gE.okeOMxM/2CC4MTuR6SvLa/bf3GE4KxC', '0660023456', '5 Avenue de la Republique 75011 Paris', 48.8641, 2.3730, 3),
(3, 'camille.moreau@example.com', 'Camille', 'Moreau', '$2y$12$64tDT6l8QboRzO7RLg8gE.okeOMxM/2CC4MTuR6SvLa/bf3GE4KxC', '0660034567', '20 Boulevard Saint Germain 75005 Paris', 48.8529, 2.3470, 2),
(4, 'david.martin@example.com', 'David', 'Martin', '$2y$12$64tDT6l8QboRzO7RLg8gE.okeOMxM/2CC4MTuR6SvLa/bf3GE4KxC', '0660045678', '34 Rue du Faubourg Saint Antoine 75011 Paris', 48.8530, 2.3740, 4),
(5, 'emma.leblanc@example.com', 'Emma', 'Leblanc', '$2y$12$64tDT6l8QboRzO7RLg8gE.okeOMxM/2CC4MTuR6SvLa/bf3GE4KxC', '0660056789', '7 Rue des Rosiers 93400 Saint Ouen', 48.9067, 2.3400, 1),
(6, 'francois.bernard@example.com', 'Francois', 'Bernard', '$2y$12$64tDT6l8QboRzO7RLg8gE.okeOMxM/2CC4MTuR6SvLa/bf3GE4KxC', '0660067890', '2 Place de la Bastille 75011 Paris', 48.8535, 2.3690, 2),
(7, 'ginger.petit@example.com', 'Ginger', 'Petit', '$2y$12$64tDT6l8QboRzO7RLg8gE.okeOMxM/2CC4MTuR6SvLa/bf3GE4KxC', '0660078901', '10 Quai de la Seine 75019 Paris', 48.8920, 2.3610, 1),
(8, 'hugo.rousseau@example.com', 'Hugo', 'Rousseau', '$2y$12$64tDT6l8QboRzO7RLg8gE.okeOMxM/2CC4MTuR6SvLa/bf3GE4KxC', '0660089012', '58 Rue de Vaugirard 75006 Paris', 48.8475, 2.3266, 3),
(9, 'isabelle.fabre@example.com', 'Isabelle', 'Fabre', '$2y$12$64tDT6l8QboRzO7RLg8gE.okeOMxM/2CC4MTuR6SvLa/bf3GE4KxC', '0660090123', '1 Rue de la Gare 92100 Boulogne Billancourt', 48.8339, 2.2399, 2),
(10, 'jeremy.girard@example.com', 'Jeremy', 'Girard', '$2y$12$64tDT6l8QboRzO7RLg8gE.okeOMxM/2CC4MTuR6SvLa/bf3GE4KxC', '0660101234', '3 Rue de la Paix 75002 Paris', 48.8686, 2.3310, 4),
(11, 'karine.roche@example.com', 'Karine', 'Roche', '$2y$12$64tDT6l8QboRzO7RLg8gE.okeOMxM/2CC4MTuR6SvLa/bf3GE4KxC', '0660112345', '14 Rue d Alesia 75014 Paris', 48.8271, 2.3212, 1),
(12, 'lucas.morel@example.com', 'Lucas', 'Morel', '$2y$12$64tDT6l8QboRzO7RLg8gE.okeOMxM/2CC4MTuR6SvLa/bf3GE4KxC', '0660123456', '120 Avenue de Clichy 75017 Paris', 48.8895, 2.3190, 5),
(13, 'marie.dupont@example.com', 'Marie', 'Dupont', '$2y$12$64tDT6l8QboRzO7RLg8gE.okeOMxM/2CC4MTuR6SvLa/bf3GE4KxC', '0660134567', '9 Rue de la Glaciere 75013 Paris', 48.8360, 2.3550, 2),
(14, 'nicolas.leroy@example.com', 'Nicolas', 'Leroy', '$2y$12$64tDT6l8QboRzO7RLg8gE.okeOMxM/2CC4MTuR6SvLa/bf3GE4KxC', '0660145678', '21 Rue du Chemin Vert 75011 Paris', 48.8590, 2.3770, 2),
(15, 'pierre.lambert@example.com', 'Pierre', 'Lambert', '$2y$12$64tDT6l8QboRzO7RLg8gE.okeOMxM/2CC4MTuR6SvLa/bf3GE4KxC', '0660156789', '45 Rue des Ecoles 75005 Paris', 48.8470, 2.3500, 2);

INSERT INTO availabilities (student_id, day_of_week, start_time, end_time)
VALUES
(2, 'Lundi', '10:00:00', '12:00:00'),
(2, 'Mercredi', '14:00:00', '16:30:00'),
(2, 'Mardi', '13:30:00', '17:00:00'),
(2, 'Jeudi', '09:00:00', '11:30:00'),
(2, 'Vendredi', '14:00:00', '18:00:00');

INSERT INTO availabilities (student_id, day_of_week, start_time, end_time)
VALUES
(3, 'Lundi', '08:30:00', '12:00:00'),
(3, 'Mardi', '13:30:00', '17:00:00'),
(3, 'Jeudi', '09:00:00', '11:30:00');
-- Availabilities: varied times/days per student (IDs 1..15)
INSERT INTO availabilities (student_id, day_of_week, start_time, end_time) VALUES
(1, 'Lundi', '08:00:00', '09:00:00'),
(1, 'Vendredi', '17:30:00', '19:00:00'),
(2, 'Mardi', '12:30:00', '14:00:00'),
(2, 'Jeudi', '08:30:00', '10:00:00'),
(3, 'Mercredi', '09:00:00', '11:30:00'),
(3, 'Vendredi', '15:00:00', '18:00:00'),
(4, 'Lundi', '07:30:00', '09:30:00'),
(4, 'Mardi', '18:00:00', '19:30:00'),
(5, 'Mercredi', '08:00:00', '10:00:00'),
(5, 'Vendredi', '16:00:00', '18:00:00'),
(6, 'Jeudi', '13:00:00', '15:30:00'),
(6, 'Vendredi', '08:30:00', '10:00:00'),
(7, 'Lundi', '09:00:00', '11:00:00'),
(7, 'Mercredi', '14:00:00', '16:00:00'),
(8, 'Mardi', '17:00:00', '19:00:00'),
(8, 'Jeudi', '08:00:00', '09:30:00'),
(9, 'Mercredi', '14:00:00', '17:00:00'),
(9, 'Vendredi', '07:30:00', '09:00:00'),
(10, 'Lundi', '08:30:00', '12:00:00'),
(10, 'Vendredi', '14:00:00', '17:30:00'),
(11, 'Mardi', '07:30:00', '09:00:00'),
(11, 'Jeudi', '12:00:00', '13:30:00'),
(12, 'Jeudi', '16:00:00', '18:00:00'),
(12, 'Vendredi', '08:00:00', '09:30:00'),
(13, 'Mercredi', '10:00:00', '12:00:00'),
(13, 'Jeudi', '18:00:00', '19:00:00'),
(14, 'Lundi', '08:00:00', '09:30:00'),
(14, 'Mardi', '17:30:00', '19:00:00'),
(15, 'Vendredi', '07:30:00', '09:00:00');

-- Some ride proposals between users (sender_id, receiver_id)
INSERT INTO ride_proposals (sender_id, receiver_id, day_of_week, start_time, end_time) VALUES
(1, 2, 'Lundi', '08:30:00', '12:00:00'),
(2, 1, 'Mardi', '13:30:00', '17:00:00'),
(3, 1, 'Jeudi', '09:00:00', '11:30:00');
(2, 4, 'Jeudi', '08:30:00', '10:00:00'),
(4, 2, 'Jeudi', '08:30:00', '10:00:00'),
(9, 10, 'Vendredi', '07:30:00', '09:00:00'),
(11, 1, 'Vendredi', '17:30:00', '19:00:00'),
(13, 6, 'Vendredi', '08:30:00', '10:00:00'),
(14, 8, 'Jeudi', '08:00:00', '09:30:00'),
(5, 3, 'Mercredi', '08:00:00', '10:00:00');