Feat : Ajout de certaines DAO + Correction du type des ID dans les classes métiers
This commit is contained in:
@@ -22,7 +22,7 @@ public class Activite implements Serializable {
|
|||||||
|
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue
|
@GeneratedValue
|
||||||
private Long id;
|
private Integer id;
|
||||||
private String name;
|
private String name;
|
||||||
private String theme;
|
private String theme;
|
||||||
private Long duree;
|
private Long duree;
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ public class Admin {
|
|||||||
|
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue
|
@GeneratedValue
|
||||||
private Long id;
|
private Integer id;
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@OneToOne(mappedBy = "admin")
|
@OneToOne(mappedBy = "admin")
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ public class Athlete {
|
|||||||
|
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue
|
@GeneratedValue
|
||||||
private Long id;
|
private Integer id;
|
||||||
private String name;
|
private String name;
|
||||||
private String categorie;
|
private String categorie;
|
||||||
private String niveau;
|
private String niveau;
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ public class Coach {
|
|||||||
|
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue
|
@GeneratedValue
|
||||||
private Long id;
|
private Integer id;
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@OneToMany(mappedBy = "coach")
|
@OneToMany(mappedBy = "coach")
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ public class Session {
|
|||||||
|
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue
|
@GeneratedValue
|
||||||
private Long id;
|
private Integer id;
|
||||||
private String name;
|
private String name;
|
||||||
private Boolean isRecurrent;
|
private Boolean isRecurrent;
|
||||||
private LocalDateTime creneau;
|
private LocalDateTime creneau;
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ public class User implements Serializable {
|
|||||||
|
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue
|
@GeneratedValue
|
||||||
private Long id;
|
private Integer id;
|
||||||
@Column(unique = true, nullable = false) //pas possible d'avoir le même nom
|
@Column(unique = true, nullable = false) //pas possible d'avoir le même nom
|
||||||
private String name;
|
private String name;
|
||||||
@Column (nullable = false)
|
@Column (nullable = false)
|
||||||
|
|||||||
@@ -2,7 +2,9 @@ package hackathon.FrisbYEE.jpa.service;
|
|||||||
|
|
||||||
import hackathon.FrisbYEE.jpa.metier.Activite;
|
import hackathon.FrisbYEE.jpa.metier.Activite;
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
@Repository
|
||||||
public interface ActiviteDAO extends JpaRepository<Activite, Integer> {
|
public interface ActiviteDAO extends JpaRepository<Activite, Integer> {
|
||||||
Activite findByKeycloakId(String keycloakId);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package hackathon.FrisbYEE.jpa.service;
|
||||||
|
|
||||||
|
import hackathon.FrisbYEE.jpa.metier.Admin;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface AdminDAO extends JpaRepository<Admin, Integer> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
package hackathon.FrisbYEE.jpa.service;
|
package hackathon.FrisbYEE.jpa.service;
|
||||||
|
|
||||||
import hackathon.FrisbYEE.jpa.metier.Activite;
|
|
||||||
import hackathon.FrisbYEE.jpa.metier.Athlete;
|
import hackathon.FrisbYEE.jpa.metier.Athlete;
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
@Repository
|
||||||
public interface AthleteDAO extends JpaRepository<Athlete, Integer> {
|
public interface AthleteDAO extends JpaRepository<Athlete, Integer> {
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1,4 +1,10 @@
|
|||||||
package hackathon.FrisbYEE.jpa.service;
|
package hackathon.FrisbYEE.jpa.service;
|
||||||
|
|
||||||
public class CoachDAO {
|
import hackathon.FrisbYEE.jpa.metier.Coach;
|
||||||
}
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface CoachDAO extends JpaRepository<Coach, Integer> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package hackathon.FrisbYEE.jpa.service;
|
||||||
|
|
||||||
|
import hackathon.FrisbYEE.jpa.metier.Session;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface SessionDAO extends JpaRepository<Session, Integer> {
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user