Initial commit
This commit is contained in:
92
src/main/java/com/pmumali/simple/model/Course.java
Normal file
92
src/main/java/com/pmumali/simple/model/Course.java
Normal file
@@ -0,0 +1,92 @@
|
||||
package com.pmumali.simple.model;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Entity
|
||||
|
||||
public class Course {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
||||
private String nom;
|
||||
private LocalDateTime dateCourse;
|
||||
private boolean estAnnulee;
|
||||
private boolean deadHeat;
|
||||
|
||||
private boolean isTerminee=false;
|
||||
|
||||
public boolean isTerminee() {
|
||||
return isTerminee;
|
||||
}
|
||||
|
||||
public void setTerminee(boolean terminee) {
|
||||
isTerminee = terminee;
|
||||
}
|
||||
|
||||
@OneToMany(mappedBy = "course", cascade = CascadeType.ALL)
|
||||
private List<Cheval> chevaux = new ArrayList<>();
|
||||
|
||||
@OneToMany(mappedBy = "course")
|
||||
private List<Pari> paris = new ArrayList<>();
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getNom() {
|
||||
return nom;
|
||||
}
|
||||
|
||||
public void setNom(String nom) {
|
||||
this.nom = nom;
|
||||
}
|
||||
|
||||
public LocalDateTime getDateCourse() {
|
||||
return dateCourse;
|
||||
}
|
||||
|
||||
public void setDateCourse(LocalDateTime dateCourse) {
|
||||
this.dateCourse = dateCourse;
|
||||
}
|
||||
|
||||
public boolean isEstAnnulee() {
|
||||
return estAnnulee;
|
||||
}
|
||||
|
||||
public void setEstAnnulee(boolean estAnnulee) {
|
||||
this.estAnnulee = estAnnulee;
|
||||
}
|
||||
|
||||
public boolean isDeadHeat() {
|
||||
return deadHeat;
|
||||
}
|
||||
|
||||
public void setDeadHeat(boolean deadHeat) {
|
||||
this.deadHeat = deadHeat;
|
||||
}
|
||||
|
||||
public List<Cheval> getChevaux() {
|
||||
return chevaux;
|
||||
}
|
||||
|
||||
public void setChevaux(List<Cheval> chevaux) {
|
||||
this.chevaux = chevaux;
|
||||
}
|
||||
|
||||
public List<Pari> getParis() {
|
||||
return paris;
|
||||
}
|
||||
|
||||
public void setParis(List<Pari> paris) {
|
||||
this.paris = paris;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user