preparing for tag colors

This commit is contained in:
2025-09-23 15:59:58 +02:00
parent 44fa27d489
commit de432b664b
3 changed files with 27 additions and 5 deletions

View File

@@ -158,6 +158,7 @@ public class Constants {
public static final String TABLE_SETTINGS = "settings";
public static final String TAGS = "tags";
public static final String TAG_COLORS = "tag_colors";
public static final String TASK_IDS = "task_ids";
public static final String TAX = "tax";
public static final String TEMPLATE = "template";

View File

@@ -22,6 +22,7 @@ public class Project implements Mappable {
private final long id;
private String description;
private final Set<String> dirtyFields = new HashSet<>();
private final Map<String,String> tagColors = new HashMap<>();
public Project(long id, String name, String description, int status, Long companyId, boolean showClosed, Map<Long,Member> members, Collection<Status> allowedStates) {
this.id = id;
@@ -113,6 +114,10 @@ public class Project implements Mappable {
return status;
}
public Map<String, String> tagColors() {
return tagColors;
}
@Override
public Map<String, Object> toMap() {
var map = new HashMap<String, Object>();
@@ -130,6 +135,7 @@ public class Project implements Mappable {
var stateMap = new HashMap<Integer,String>();
for (var state : allowedStates) stateMap.put(state.code(),state.name());
map.put(ALLOWED_STATES,stateMap);
map.put(TAG_COLORS,tagColors);
return map;
}
}