Début d'importation des modeles pour les rappels
This commit is contained in:
@@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user