Article Repository
This commit is contained in:
103
src/main/java/fr/eni/enchere/bo/Article.java
Normal file
103
src/main/java/fr/eni/enchere/bo/Article.java
Normal file
@@ -0,0 +1,103 @@
|
|||||||
|
package fr.eni.enchere.bo;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
public class Article {
|
||||||
|
|
||||||
|
int id;
|
||||||
|
String nom;
|
||||||
|
String desc;
|
||||||
|
Date dateDebutEnch;
|
||||||
|
Date dateFinEnch;
|
||||||
|
float prixInitial;
|
||||||
|
float prixVente;
|
||||||
|
int numUtilisateur;
|
||||||
|
int numCategorie;
|
||||||
|
|
||||||
|
public Article() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public Article(int id, String nom, String desc, Date dateDebutEnch, Date dateFinEnch, float prixInitial, float prixVente, int numUtilisateur, int numCategorie) {
|
||||||
|
this.id = id;
|
||||||
|
this.nom = nom;
|
||||||
|
this.desc = desc;
|
||||||
|
this.dateDebutEnch = dateDebutEnch;
|
||||||
|
this.dateFinEnch = dateFinEnch;
|
||||||
|
this.prixInitial = prixInitial;
|
||||||
|
this.prixVente = prixVente;
|
||||||
|
this.numUtilisateur = numUtilisateur;
|
||||||
|
this.numCategorie = numCategorie;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(int id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNom() {
|
||||||
|
return nom;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNom(String nom) {
|
||||||
|
this.nom = nom;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDesc() {
|
||||||
|
return desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDesc(String desc) {
|
||||||
|
this.desc = desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getDateDebutEnch() {
|
||||||
|
return dateDebutEnch;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDateDebutEnch(Date dateDebutEnch) {
|
||||||
|
this.dateDebutEnch = dateDebutEnch;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getDateFinEnch() {
|
||||||
|
return dateFinEnch;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDateFinEnch(Date dateFinEnch) {
|
||||||
|
this.dateFinEnch = dateFinEnch;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getPrixInitial() {
|
||||||
|
return prixInitial;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPrixInitial(float prixInitial) {
|
||||||
|
this.prixInitial = prixInitial;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getPrixVente() {
|
||||||
|
return prixVente;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPrixVente(float prixVente) {
|
||||||
|
this.prixVente = prixVente;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getNumUtilisateur() {
|
||||||
|
return numUtilisateur;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNumUtilisateur(int numUtilisateur) {
|
||||||
|
this.numUtilisateur = numUtilisateur;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getNumCategorie() {
|
||||||
|
return numCategorie;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNumCategorie(int numCategorie) {
|
||||||
|
this.numCategorie = numCategorie;
|
||||||
|
}
|
||||||
|
}
|
||||||
13
src/main/java/fr/eni/enchere/dall/ArticleRepository.java
Normal file
13
src/main/java/fr/eni/enchere/dall/ArticleRepository.java
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
package fr.eni.enchere.dall;
|
||||||
|
|
||||||
|
import fr.eni.enchere.bo.Article;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface ArticleRepository {
|
||||||
|
List<Article> findAll();
|
||||||
|
Article findById(int id);
|
||||||
|
void save(Article article);
|
||||||
|
void delete(int id);
|
||||||
|
void update(int id);
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
package fr.eni.enchere.dall;
|
||||||
|
|
||||||
|
public class ArticleRepositoryImpl {
|
||||||
|
}
|
||||||
BIN
src/main/resources/static/favicon.ico
Normal file
BIN
src/main/resources/static/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
@@ -3,6 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>[[${title}]]</title>
|
<title>[[${title}]]</title>
|
||||||
|
<link rel="icon" th:href="@{favicon.ico}" />
|
||||||
<link href="css/bootstrap/bootstrap.min.css" rel="stylesheet">
|
<link href="css/bootstrap/bootstrap.min.css" rel="stylesheet">
|
||||||
<link href="assets/bootstrap-icons/bootstrap-icons.min.css" rel="stylesheet">
|
<link href="assets/bootstrap-icons/bootstrap-icons.min.css" rel="stylesheet">
|
||||||
</head>
|
</head>
|
||||||
@@ -37,9 +38,9 @@
|
|||||||
<div th:insert="${content}"></div>
|
<div th:insert="${content}"></div>
|
||||||
|
|
||||||
|
|
||||||
<footer class="text-center text-lg-start bg-body-tertiary text-muted " style="background-color: #2a2b30;">
|
<footer class="text-center text-lg-start bg-body-tertiary text-muted " >
|
||||||
|
|
||||||
<section class="">
|
<section class="" style="background-color: #2a2b30;">
|
||||||
<div class="container text-lg-left text-md-start mt-5 text-white">
|
<div class="container text-lg-left text-md-start mt-5 text-white">
|
||||||
<div class="row mt-3">
|
<div class="row mt-3">
|
||||||
<div class="col-md-3 col-lg-4 col-xl-3 mx-auto mb-4">
|
<div class="col-md-3 col-lg-4 col-xl-3 mx-auto mb-4">
|
||||||
|
|||||||
Reference in New Issue
Block a user