package kr.co.hanwha.hifive.data.model;

import java.util.ArrayList;

/**
 * Created by sanghoonkwon on 2018. 1. 11..
 */

public class LoginData extends BaseData{
    /**
     * ex) 6
     */
    int member_id;
    /**
     * "iBPiEJr96PYRgmb2SFLvPg=="
     */
    String encryption_member_id;
    /**
     * ex) null
     */
    String profile_url;
    /**
     * ex) "201404397"
     */
    String login;
    /**
     * ex) "이승창"
     */
    String name;
    /**
     * ex) "차장"
     */
    String position;
    /**
     * ex) "인사팀"
     */
    String department;

    String company;

    String simple_login_yn;

    ArrayList<ProjectInfoData> listLeaderProjectsInfo;

    ArrayList<ProjectInfoData> listMyProjectsInfo;


    public int getMember_id() {
        return member_id;
    }

    public String getEncryption_member_id() {
        return encryption_member_id;
    }

    public String getProfile_url() {
        return profile_url;
    }

    public String getLogin() {
        return login;
    }

    public String getName() {
        return name;
    }

    public String getPosition() {
        return position;
    }

    public String getDepartment() {
        return department;
    }

    public String getCompany() {
        return company;
    }

    public boolean isSimpleLoginYn() {
        return ("Y".equalsIgnoreCase(simple_login_yn));
    }

    public boolean isProjectLeader() {
        return (listLeaderProjectsInfo != null && listLeaderProjectsInfo.size() > 0);
    }

    public ArrayList<ProjectInfoData> getListMyProjectsInfo() {
        return listMyProjectsInfo;
    }

    @Override
    public String toString() {
        return "LoginData{" +
                "member_id=" + member_id +
                ", encryption_member_id='" + encryption_member_id + '\'' +
                ", profile_url='" + profile_url + '\'' +
                ", login='" + login + '\'' +
                ", name='" + name + '\'' +
                ", position='" + position + '\'' +
                ", department='" + department + '\'' +
                ", company='" + company + '\'' +
                ", simple_login_yn='" + simple_login_yn + '\'' +
                ", listLeaderProjectsInfo=" + listLeaderProjectsInfo +
                ", listMyProjectsInfo=" + listMyProjectsInfo +
                '}';
    }
}
