Application.java
package at.htl.beeyond.entity;
import io.quarkus.hibernate.orm.panache.PanacheEntityBase;
import javax.persistence.*;
import java.time.LocalDate;
import java.time.LocalDateTime;
@Entity
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
public abstract class Application extends PanacheEntityBase {
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE)
private Long id;
private String note;
@Enumerated(EnumType.STRING)
private ApplicationStatus status;
@ManyToOne
private User owner;
private LocalDateTime createdAt;
private LocalDateTime startedAt;
private LocalDateTime finishedAt;
@ManyToOne
private Namespace namespace;
private String schoolClass;
private LocalDate toDate;
private String purpose;
@Lob
private String content;
public Application(String note, User owner, Namespace namespace, String schoolClass, LocalDate toDate, String purpose, String content) {
this.note = note;
this.status = ApplicationStatus.PENDING;
this.owner = owner;
this.createdAt = LocalDateTime.now();
this.namespace = namespace;
this.schoolClass = schoolClass;
this.toDate = toDate;
this.purpose = purpose;
this.content = content;
}
public Application() {
}
public Long getId() {
return id;
}
public String getNote() {
return note;
}
public void setNote(String note) {
this.note = note;
}
public ApplicationStatus getStatus() {
return status;
}
public void setStatus(ApplicationStatus status) {
this.status = status;
}
public User getOwner() {
return owner;
}
public void setOwner(User owner) {
this.owner = owner;
}
public LocalDateTime getCreatedAt() {
return createdAt;
}
public void setCreatedAt(LocalDateTime createdAt) {
this.createdAt = createdAt;
}
public LocalDateTime getStartedAt() {
return startedAt;
}
public void setStartedAt(LocalDateTime startedAt) {
this.startedAt = startedAt;
}
public LocalDateTime getFinishedAt() {
return finishedAt;
}
public void setFinishedAt(LocalDateTime finishedAt) {
this.finishedAt = finishedAt;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public Namespace getNamespace() {
return namespace;
}
public void setNamespace(Namespace namespace) {
this.namespace = namespace;
}
public String getSchoolClass() {
return schoolClass;
}
public void setSchoolClass(String schoolClass) {
this.schoolClass = schoolClass;
}
public LocalDate getToDate() {
return toDate;
}
public void setToDate(LocalDate toDate) {
this.toDate = toDate;
}
public String getPurpose() {
return purpose;
}
public void setPurpose(String purpose) {
this.purpose = purpose;
}
}