/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package sikd.ikonsol.model;

import java.io.Serializable;

/**
 *
 * @author Imam Bhoim
 */
public class User implements Serializable {
    private int id;
    private String username;
    private byte[] password;
    private boolean actives;
    private int idgroup;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public byte[] getPassword() {
        return password;
    }

    public void setPassword(byte[] password) {
        this.password = password;
    }

    public boolean isActives() {
        return actives;
    }

    public void setActives(boolean actives) {
        this.actives = actives;
    }

   

   

    public int getIdgroup() {
        return idgroup;
    }

    public void setIdgroup(int idgroup) {
        this.idgroup = idgroup;
    }
    
      public  String getStatusAktif(){
        if (this.actives == true){
            return "Aktif";
        } else{
            return "Tidak Aktif";
        }

    }
      
       public  String getStatusRole(){
        if (this.idgroup == 1){
            return "Admin";
        } else{
            return "Operator";
        }

    }
    
}
