implement database persistence layer and core restaurant backend logic

This commit is contained in:
2026-07-01 16:45:18 +03:30
parent 00f990c653
commit dceeb56b22
20 changed files with 676 additions and 211 deletions
@@ -1,27 +1,20 @@
package dev.database;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
public class DatabaseConnection {
private static final String URL = "jdbc:postgresql://localhost:5432/restaurant_db"; // DB Server
private static final String USER = "postgres"; // Your Username
private static final String PASSWORD = "password"; // Your Password
private static final String PASSWORD = "password"; // Your Password (اینجا پسورد دیتابیس خودت رو بذار)
private DatabaseConnection() {
}
public static Connection getConnection()
throws SQLException {
// TODO:
// Return a valid PostgreSQL connection
return null;
public static Connection getConnection() throws SQLException {
// بازگرداندن یک کانکشن معتبر به PostgreSQL دیتابیس
return DriverManager.getConnection(URL, USER, PASSWORD);
}
}