diff --git a/application/module-exercise/src/main/java/org/fuseri/moduleexercise/exercise/Exercise.java b/application/module-exercise/src/main/java/org/fuseri/moduleexercise/exercise/Exercise.java index 6070b8a70b26a36f3e87b4f4661a43a64625cfe5..d923ad8fd5d06bdaecfa1504a3247e3f20704dea 100644 --- a/application/module-exercise/src/main/java/org/fuseri/moduleexercise/exercise/Exercise.java +++ b/application/module-exercise/src/main/java/org/fuseri/moduleexercise/exercise/Exercise.java @@ -29,7 +29,7 @@ public class Exercise extends DomainObject { private int difficulty; - @Column(name = "lecture_id") + @Column(name = "course_id") private long courseId; @OneToMany(mappedBy="exercise", cascade = CascadeType.ALL) diff --git a/application/module-exercise/src/main/resources/import.sql b/application/module-exercise/src/main/resources/import.sql index b9cbb830e4182caaf0f7efdb93858995ef30923c..3972f426cdde703169c3498ba7ed277802439d66 100644 --- a/application/module-exercise/src/main/resources/import.sql +++ b/application/module-exercise/src/main/resources/import.sql @@ -1,11 +1,11 @@ -- exercise -- insert into exercise (id, lecture_id, description, difficulty, name) values (default, ?, ?, ?, ?) -INSERT INTO exercise (id, lecture_id, description, difficulty, name) VALUES (1, 7, 'Practice using the present continuous tense.', 3, 'Present Continuous Exercise 1'); -INSERT INTO exercise (id, lecture_id, description, difficulty, name) VALUES (2, 7, 'Use the past simple to describe past events.', 6, 'Past Simple Exercise 1'); -INSERT INTO exercise (id, lecture_id, description, difficulty, name) VALUES (3, 8, 'Learn vocabulary related to food.', 2, 'Food Vocabulary Exercise 1'); -INSERT INTO exercise (id, lecture_id, description, difficulty, name) VALUES (4, 10, 'Practice answering common job interview questions.', 7, 'Job Interview Exercise 1'); +INSERT INTO exercise (id, course_id, description, difficulty, name) VALUES (1, 5, 'Practice using the present continuous tense.', 3, 'Present Continuous Exercise 1'); +INSERT INTO exercise (id, course_id, description, difficulty, name) VALUES (2, 5, 'Use the past simple to describe past events.', 6, 'Past Simple Exercise 1'); +INSERT INTO exercise (id, course_id, description, difficulty, name) VALUES (3, 5, 'Learn vocabulary related to food.', 2, 'Food Vocabulary Exercise 1'); +INSERT INTO exercise (id, course_id, description, difficulty, name) VALUES (4, 5, 'Practice answering common job interview questions.', 7, 'Job Interview Exercise 1'); -INSERT INTO exercise (id, lecture_id, description, difficulty, name) VALUES (5, 2, 'Ăśbung zum BegrĂĽĂźen und Vorstellen', 2, 'BegrĂĽĂźung und Vorstellung Ăśbung'); +INSERT INTO exercise (id, course_id, description, difficulty, name) VALUES (5, 1, 'Ăśbung zum BegrĂĽĂźen und Vorstellen', 2, 'BegrĂĽĂźung und Vorstellung Ăśbung'); ALTER TABLE exercise ALTER COLUMN id RESTART WITH 6; diff --git a/application/module-language-school/src/main/resources/import.sql b/application/module-language-school/src/main/resources/import.sql index 2b6125140fdccad9c904241c420ac0a08b583532..53371e8aafe89217259dedaaf97c2d174a4d3b88 100644 --- a/application/module-language-school/src/main/resources/import.sql +++ b/application/module-language-school/src/main/resources/import.sql @@ -16,6 +16,7 @@ -- 6 - C1N -- 7 - C2N + -- USER -- admin INSERT INTO domain_user (id, city, country, house_number, street, zip, email, first_name, last_name, password, user_type, username) VALUES (1, 'New York', 'USA', 123, 'Main Street', '10001', 'john.doe@example.com', 'John', 'Doe', 'password123', 'ADMIN', 'johndoe'); @@ -67,6 +68,7 @@ INSERT INTO user_language_proficiency (user_id, language_proficiency_key, langua INSERT INTO user_language_proficiency (user_id, language_proficiency_key, language_proficiency) VALUES (17, 1, 1); INSERT INTO user_language_proficiency (user_id, language_proficiency_key, language_proficiency) VALUES (18, 1, 1); + -- COURSE INSERT INTO course (id, capacity, finished, language, name, proficiency) VALUES (1, 25, false, 'GERMAN', 'German for Beginners', 'A1'); INSERT INTO course (id, capacity, finished, language, name, proficiency) VALUES (2, 25, false, 'ENGLISH', 'English A1', 'A1'); @@ -97,8 +99,6 @@ INSERT INTO user_course (student_id, course_id) VALUES (7, 5); INSERT INTO user_course (student_id, course_id) VALUES (9, 5); - - -- LECTURE insert into lecture (id, capacity, course_id, lecture_from, lecture_to, lecturer_id, topic) values (1, 25, 1, '2023-05-02 10:00:00', '2023-05-02 12:00:00', 6, 'Introduction to course') insert into lecture (id, capacity, course_id, lecture_from, lecture_to, lecturer_id, topic) values (2, 25, 1, '2023-05-04 10:00:00', '2023-05-04 12:00:00', 6, 'BegrĂĽĂźung und Vorstellung')