30 lines
562 B
Java
30 lines
562 B
Java
package com.pmumali.ch10_multi.model;
|
|
|
|
import jakarta.persistence.*;
|
|
import lombok.*;
|
|
|
|
import java.time.LocalDateTime;
|
|
import java.util.List;
|
|
|
|
@Entity
|
|
@Data
|
|
@NoArgsConstructor
|
|
@AllArgsConstructor
|
|
@Builder
|
|
@Table(name = "course")
|
|
public class Course {
|
|
@Id
|
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
private Long id;
|
|
|
|
private String nom;
|
|
private LocalDateTime heureCourse;
|
|
private Integer nombreChevauxPartants;
|
|
|
|
@OneToMany
|
|
private List<Cheval> chevaux;
|
|
|
|
@Enumerated(EnumType.STRING)
|
|
private StatutCourse statut;
|
|
}
|