overhauling time list in backend – BROKEN
This commit is contained in:
@@ -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>();
|
||||
|
||||
Reference in New Issue
Block a user