Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
0e0dc19
add deadline
github-classroom[bot] Dec 15, 2025
18fd14c
-Composer och persistence
gitnes94 Dec 16, 2025
1768c46
Merge pull request #1 from ithsjava25/dependency
Samuel-Fjellet Dec 16, 2025
556f0c0
Table genesis
Samuel-Fjellet Dec 16, 2025
8849fbe
Implimentation of connections
Samuel-Fjellet Dec 16, 2025
8f680f6
Name changes
Samuel-Fjellet Dec 18, 2025
c08cf1e
Stuff
Samuel-Fjellet Dec 18, 2025
6013ee1
App Try changes
Samuel-Fjellet Dec 18, 2025
c49ab49
Relationer
Samuel-Fjellet Dec 18, 2025
4e61a61
Stuff #2
Samuel-Fjellet Dec 18, 2025
0e545fe
Week 1 implimentations
Samuel-Fjellet Dec 18, 2025
59acdec
new entity TimeSlot
gvaguirres Jan 9, 2026
6ca0b95
Merge remote-tracking branch 'origin/table/test' into table/test
gvaguirres Jan 9, 2026
7462839
BookingStatus
gitnes94 Jan 9, 2026
7a5da4b
Booking status system
gitnes94 Jan 9, 2026
d848b44
Booking status system
gitnes94 Jan 9, 2026
9b7d0ea
Menu options
Samuel-Fjellet Jan 9, 2026
edd1f76
Menu system in app
Samuel-Fjellet Jan 9, 2026
e44fd37
Merge pull request #4 from ithsjava25/Samuel-Branch
Samuel-Fjellet Jan 9, 2026
8b986bb
Merge branch 'table/test2' into younesbranch
gitnes94 Jan 9, 2026
88194e2
Booking status system v2
gitnes94 Jan 9, 2026
d5fcb10
Meny och service för bokning
gitnes94 Jan 9, 2026
988c6e2
Meny och service för bokning
gitnes94 Jan 9, 2026
5a39fed
mer funktionalitet, validering felhantering
gitnes94 Jan 12, 2026
a8a2cc7
tog bort bordsskapande
gitnes94 Jan 12, 2026
3e6d5bb
refaktorisering, tog bort metoders som inte används
gitnes94 Jan 12, 2026
f12317c
Code Rabbit Ändringar
Samuel-Fjellet Jan 14, 2026
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
target/
/.idea/
.env
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[![Review Assignment Due Date](https://classroom.github.com/assets/deadline-readme-button-22041afd0340ce965d47ae6ef1cefeee28c7c493a6346c4f15d667ab976d596c.svg)](https://classroom.github.com/a/_uV8Mn8f)
# 📘 Projektarbete: JPA + Hibernate med GitHub-flöde

Projektet genomförs som antingen en Java CLI-applikation eller med hjälp av JavaFX om ni vill ha ett grafiskt gränssnitt.
Expand All @@ -9,11 +10,11 @@ Kommunikation med databasen ska ske med JPA och Hibernate, enligt code first-met

## 🗓️ Veckoplanering med Checklista
### ✅ Vecka 1 – Grundläggning och struktur
- [ ] Klona GitHub-repo
- [ ] Konfigurera persistence.xml eller använd PersistenceConfiguration i kod
- [ ] Skapa entiteter och verifiera tabellgenerering
- [ ] Lägg till relationer (One-to-Many, Many-to-Many)
- [ ] Arbeta på feature-branches och använd pull requests för kodgranskning
- [x] Klona GitHub-repo
- [x] Konfigurera persistence.xml eller använd PersistenceConfiguration i kod
- [x] Skapa entiteter och verifiera tabellgenerering
- [x] Lägg till relationer (One-to-Many, Many-to-Many)
- [x] Arbeta på feature-branches och använd pull requests för kodgranskning

### ✅ Vecka 2 – Funktionalitet och relationer
- [ ] Dela upp funktioner mellan gruppmedlemmar
Expand Down
17 changes: 17 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: '3.8'

services:
mysql:
image: mysql:9.5.0
container_name: restaurant_booking_db
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
ports:
- "3306:3306"
volumes:
- mysql_data:/var/lib/mysql
restart: unless-stopped

volumes:
mysql_data:
Comment on lines +1 to +17
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🌐 Web query:

Docker official MySQL image available tags 2024 2025

💡 Result:

Recent official Docker Hub mysql tags (examples seen in 2024–2025):

  • MySQL 9.x: 9.5.0, 9.5, 9, innovation, latest (also platform variants like 9.5.0-oraclelinux9, 9-oracle, oraclelinux9). [1]
  • MySQL 8.4.x (8.x branch): 8.4.7, 8.4, 8, lts (and oracle/oraclelinux9 variants). [1]
  • MySQL 8.0.x (patch-tagged): 8.0.44, 8.0 (plus 8.0.44-bookworm, 8.0-debian, and oracle/oraclelinux9 variants). [1]

For the full, up-to-date tag list (including older versions and all platform/OS variants) see the official Docker Hub Tags tab for the mysql image. [1]

Sources:
[1] Docker Hub — mysql (Official Image) Tags.


🌐 Web query:

mysql:9.5.0 Docker Hub official image tag exists

💡 Result:

Yes — the official mysql image on Docker Hub includes the tag "9.5.0". See the tags list on Docker Hub. [1]

You can pull it with:
docker pull mysql:9.5.0. [1][2]

Sources:
[1] Docker Hub — mysql (official) tags.
[2] docker.io image mirror listing for mysql:9.5.0.


🌐 Web query:

mysql:8.4 LTS Docker Hub official image available

💡 Result:

Yes — the official Docker Hub mysql image includes MySQL 8.4 ( LTS ) tags (e.g., 8.4, 8.4.7, lts). Pull with, for example, docker pull mysql:8.4 or docker pull mysql:lts. [1][2]

Sources:
[1] Docker Hub mysql official image (tags list).
[2] MySQL 8.4 release notes (shows 8.4 LTS releases).


mysql:9.5.0 is a valid Docker Hub tag; consider hardening the config for better practices.

The mysql:9.5.0 tag exists on Docker Hub and will pull successfully. The hardcoded MYSQL_ROOT_PASSWORD: root123 and port binding to all interfaces are typical for local development but can be improved:

Suggested compose improvements (credentials/port/user)
 version: '3.8'

 services:
   mysql:
     image: mysql:9.5.0
     container_name: restaurant_booking_db
     environment:
-      MYSQL_ROOT_PASSWORD: root123
-      MYSQL_DATABASE: restaurant_booking
+      MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-root123}
+      MYSQL_DATABASE: ${MYSQL_DATABASE:-restaurant_booking}
+      MYSQL_USER: ${MYSQL_USER:-restaurant_app}
+      MYSQL_PASSWORD: ${MYSQL_PASSWORD:-restaurant_app_pw}
     ports:
-      - "3306:3306"
+      - "127.0.0.1:3306:3306"
     volumes:
       - mysql_data:/var/lib/mysql
     restart: unless-stopped

This allows overriding credentials via environment variables and restricts port exposure to localhost, reducing unintended network access.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
version: '3.8'
services:
mysql:
image: mysql:9.5.0
container_name: restaurant_booking_db
environment:
MYSQL_ROOT_PASSWORD: root123
MYSQL_DATABASE: restaurant_booking
ports:
- "3306:3306"
volumes:
- mysql_data:/var/lib/mysql
restart: unless-stopped
volumes:
mysql_data:
version: '3.8'
services:
mysql:
image: mysql:9.5.0
container_name: restaurant_booking_db
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-root123}
MYSQL_DATABASE: ${MYSQL_DATABASE:-restaurant_booking}
MYSQL_USER: ${MYSQL_USER:-restaurant_app}
MYSQL_PASSWORD: ${MYSQL_PASSWORD:-restaurant_app_pw}
ports:
- "127.0.0.1:3306:3306"
volumes:
- mysql_data:/var/lib/mysql
restart: unless-stopped
volumes:
mysql_data:
🤖 Prompt for AI Agents
In @docker-compose.yml around lines 1 - 17, The docker-compose service "mysql"
currently hardcodes MYSQL_ROOT_PASSWORD and exposes port 3306 publicly; replace
the hardcoded password with environment-variable interpolation (e.g.,
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-root123}) and add optional
MYSQL_USER and MYSQL_PASSWORD entries using similar ${VAR:-default} expansion so
credentials can be overridden, and restrict the exposed port binding in the
"ports" entry to localhost (e.g., 127.0.0.1:3306:3306) to avoid binding to all
interfaces; keep the service name "mysql", container_name
"restaurant_booking_db", and volume mapping intact while documenting or adding a
.env file for secure overrides.

15 changes: 15 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@
<mockito.version>5.21.0</mockito.version>
</properties>
<dependencies>
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
<version>7.0.2</version>
</dependency>
<dependency>
<groupId>org.hibernate.orm</groupId>
<artifactId>hibernate-hikaricp</artifactId>
<version>7.2.0.Final</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
Expand Down Expand Up @@ -50,5 +60,10 @@
<artifactId>classgraph</artifactId>
<version>4.8.184</version>
</dependency>
<dependency>
<groupId>jakarta.persistence</groupId>
<artifactId>jakarta.persistence-api</artifactId>
<version>3.2.0</version>
</dependency>
</dependencies>
</project>
Loading