package com.mapotempo.fleet.core.model;

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

/**
 * Company.
 */
@DocumentBase(type = "user")
public class User extends MapotempoModelBase {

    // MAPOTEMPO KEY
    public static final String USER = "user";
    public static final String COMPANY_ID = "company_id";

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

    public User(Document doc) {
        super(doc);
    }

    public String getUser() {
        return (String)getProperty(USER, "Unknow");
    }

    public String getCompanyId() {
        return (String)getProperty(COMPANY_ID, "No company id found");
    }
}

@@ -215,16 +215,67 @@
 tBase;%0A%0A
+import java.util.ArrayList;%0Aimport java.util.List;%0A
 /**%0A * C
@@ -487,16 +487,64 @@
 any_id%22;
+%0A    public static final String ROLES = %22roles%22;
 %0A%0A    pu
@@ -785,24 +785,24 @@
 mpanyId() %7B%0A
-
         retu
@@ -865,11 +865,134 @@
 );%0A    %7D
+%0A%0A    public List%3CString%3E getRoles() %7B%0A        return (ArrayList%3CString%3E)getProperty(ROLES, new ArrayList%3CString%3E());%0A    %7D
 %0A%7D%0A

add roles getter