40 lines
935 B
Java
40 lines
935 B
Java
package enseirb.myinpulse.model;
|
|
|
|
import jakarta.persistence.*;
|
|
import jakarta.validation.constraints.NotNull;
|
|
|
|
@Entity
|
|
@Table(name = "annotation")
|
|
public class Annotation {
|
|
|
|
@Id
|
|
@NotNull
|
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
private Long idAnnotation;
|
|
|
|
private String comment;
|
|
|
|
@ManyToOne(fetch = FetchType.LAZY)
|
|
@JoinColumn(name = "idSectionCell")
|
|
private SectionCell sectionCellAnnotation;
|
|
|
|
@ManyToOne(fetch = FetchType.LAZY)
|
|
@JoinColumn(name = "idAdministrator")
|
|
private Administrator administratorAnnotation;
|
|
|
|
public Annotation() {}
|
|
|
|
public Annotation(Long idAnnotation, String commentary) {
|
|
this.idAnnotation = idAnnotation;
|
|
this.comment = comment;
|
|
}
|
|
|
|
public String getComment() {
|
|
return comment;
|
|
}
|
|
|
|
public void setCommentary(String comment) {
|
|
this.comment = comment;
|
|
}
|
|
}
|