overhauling time list in backend – BROKEN

This commit is contained in:
2025-07-15 09:28:19 +02:00
parent a75c58932d
commit 148c0f27b5
2 changed files with 38 additions and 34 deletions

View File

@@ -9,12 +9,16 @@ import static de.srsoftware.umbrella.core.Util.dateTimeOf;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.*;
public class Time implements Mappable{
private final Collection<Long> taskIds;
private final LocalDateTime end, start;
private final long id, userId;
private final String description, subject;
private final State state;
public record Time(long id, long userId, String subject, String description, LocalDateTime start, LocalDateTime end, State state, Set<Long> taskIds) implements Mappable {
public enum State{
Started(10),
Open(20),
@@ -44,6 +48,18 @@ public record Time(long id, long userId, String subject, String description, Loc
}
}
public Time(long id, long userId, String subject, String description, LocalDateTime start, LocalDateTime end, State state, Collection<Long> taskIds){
this.id=id;
this.userId = userId;
this.subject = subject;
this.description = description;
this.start = start;
this.end = end;
this.state = state;
this.taskIds = taskIds;
}
@Override
public Map<String, Object> toMap() {
var map = new HashMap<String,Object>();