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
|
||||
@GeneratedValue
|
||||
private Long id;
|
||||
private Integer id;
|
||||
private String name;
|
||||
private String theme;
|
||||
private Long duree;
|
||||
|
||||
@@ -18,7 +18,7 @@ public class Admin {
|
||||
|
||||
@Id
|
||||
@GeneratedValue
|
||||
private Long id;
|
||||
private Integer id;
|
||||
private String name;
|
||||
|
||||
@OneToOne(mappedBy = "admin")
|
||||
|
||||
@@ -22,7 +22,7 @@ public class Athlete {
|
||||
|
||||
@Id
|
||||
@GeneratedValue
|
||||
private Long id;
|
||||
private Integer id;
|
||||
private String name;
|
||||
private String categorie;
|
||||
private String niveau;
|
||||
|
||||
@@ -21,7 +21,7 @@ public class Coach {
|
||||
|
||||
@Id
|
||||
@GeneratedValue
|
||||
private Long id;
|
||||
private Integer id;
|
||||
private String name;
|
||||
|
||||
@OneToMany(mappedBy = "coach")
|
||||
|
||||
@@ -24,7 +24,7 @@ public class Session {
|
||||
|
||||
@Id
|
||||
@GeneratedValue
|
||||
private Long id;
|
||||
private Integer id;
|
||||
private String name;
|
||||
private Boolean isRecurrent;
|
||||
private LocalDateTime creneau;
|
||||
|
||||
@@ -23,7 +23,7 @@ public class User implements Serializable {
|
||||
|
||||
@Id
|
||||
@GeneratedValue
|
||||
private Long id;
|
||||
private Integer id;
|
||||
@Column(unique = true, nullable = false) //pas possible d'avoir le même nom
|
||||
private String name;
|
||||
@Column (nullable = false)
|
||||
|
||||
@@ -2,7 +2,9 @@ package hackathon.FrisbYEE.jpa.service;
|
||||
|
||||
import hackathon.FrisbYEE.jpa.metier.Activite;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
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;
|
||||
|
||||
import hackathon.FrisbYEE.jpa.metier.Activite;
|
||||
import hackathon.FrisbYEE.jpa.metier.Athlete;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public interface AthleteDAO extends JpaRepository<Athlete, Integer> {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,4 +1,10 @@
|
||||
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