Début d'importation des modeles pour les rappels

This commit is contained in:
2025-10-19 02:22:04 +02:00
parent 5d6146e448
commit c25c4e2a46
2 changed files with 33 additions and 0 deletions
@@ -0,0 +1,16 @@
import java.sql.*;
public class DbConnexion {
private static final String URL = "jdbc:mariadb://dwarves.iut-fbleau.fr/---";
private static final String USER = "login";
private static final String PASSWORD = "mdp";
public static Connection getConnection() throws SQLException {
try {
Class.forName("org.mariadb.jdbc.Driver");
} catch (ClassNotFoundException e) {
throw new SQLException("Pilote MariaDB non trouvé.", e);
}
return DriverManager.getConnection(URL, USER, PASSWORD);
}
}
@@ -0,0 +1,17 @@
package model;
import java.time.LocalDateTime;
public class Rappel {
private int id;
private String titre;
private String contenu;
private LocalDateTime date;
public Rappel(int id, String titre, String contenu, LocalDateTime date) {
this.id = id;
this.titre = titre;
this.contenu = contenu;
this.date = date;
}
}