PMT-16: Projekt Anlegen #12

Merged
SZUT-Ole merged 10 commits from story/PMT-16-projekt-anlegen into trunk 2024-10-15 08:15:23 +00:00
Showing only changes of commit 118797258a - Show all commits

View file

@ -19,7 +19,7 @@ import java.time.LocalDateTime;
@Table(name = "project") @Table(name = "project")
public class Project { public class Project {
@Id @Id
@GeneratedValue(strategy = GenerationType.IDENTITY) @GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id; private Long id;
@NotBlank @NotBlank
@ -43,5 +43,10 @@ public class Project {
private LocalDateTime plannedEnd; private LocalDateTime plannedEnd;
private LocalDateTime realEnd; // Cant be named just "end" because it's and SQL Keyword private LocalDateTime realEnd; // Cant be named just "end" because it's and SQL Keyword
public boolean isValid() {
return plannedEnd.isAfter(start) && (realEnd == null || realEnd.isAfter(start));
}
} }