package com.mapotempo.fleet.core.model;

import com.couchbase.lite.Database;
import com.couchbase.lite.Document;
import com.mapotempo.fleet.core.base.DocumentBase;
import com.mapotempo.fleet.core.base.MapotempoModelBase;
import com.mapotempo.fleet.core.exception.CoreException;

/**
 * MissionStatusType.
 */
@DocumentBase(type = "mission_status_type")
public class MissionStatusType extends MapotempoModelBase {

    // MAPOTEMPO KEY
    public static final String LABEL = "label";
    public static final String COLOR = "color";

    public MissionStatusType(Database database) {
        super(database);
    }

    public MissionStatusType(Document document) {
        super(document);
    }

    public MissionStatusType(String id, Database database) throws CoreException {
        super(id, database);
    }

    public String getLabel() {
        return (String)getProperty(LABEL, "Unknow");
    }

    public void setLabel(String label) {
        setProperty(LABEL, label);
    }

    public int getColor() {
        return (int)getProperty(COLOR, 0xFF0000);
    }

    public void setColor(int color) {
        setProperty(COLOR, 0x000000);
    }
}
@@ -992,19 +992,22 @@
  public 
+Str
 in
-t
+g
  getColo
@@ -1028,19 +1028,22 @@
 return (
+Str
 in
-t
+g
 )getProp
@@ -1058,16 +1058,16 @@
 OR, 
-0x
+%22
 FF0000
+%22
 );%0A 
@@ -1101,13 +1101,19 @@
 lor(
-int c
+String hexC
 olor
@@ -1147,16 +1147,16 @@
 OR, 
-0x000000
+hexColor
 );%0A 

Return hex string color in MissionStatusType.