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

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

public class ProfileData implements Parcelable {
    /**
     * 44
     */
    int member_id;
    /**
     * ru*****@hanwha.com
     */
    String login_id;
    /**
     * 김성훈
     */
    String member_name;
    /**
     * 호텔&리조트
     */
    String company;
    /**
     * 오픈이노베이션팀
     */
    String department;
    /**
     * 과장
     */
    String rank_title;
    /**
     * 010-****-4341
     */
    String phone_mobile;
    /**
     * @see ProjectInfoData
     */
    List<ProjectInfoData> listMemberProjects = new ArrayList<>();

    public ProfileData(Parcel in) {
        this.member_id = in.readInt();
        this.login_id = in.readString();
        this.member_name = in.readString();
        this.company = in.readString();
        this.department = in.readString();
        this.rank_title = in.readString();
        this.phone_mobile = in.readString();
        in.readTypedList(listMemberProjects, ProjectInfoData.CREATOR);
    }

    public static final Creator<ProfileData> CREATOR = new Creator<ProfileData>() {
        @Override
        public ProfileData createFromParcel(Parcel in) {
            return new ProfileData(in);
        }

        @Override
        public ProfileData[] newArray(int size) {
            return new ProfileData[size];
        }
    };

    public int getMember_id() {
        return member_id;
    }

    public void setMember_id(int member_id) {
        this.member_id = member_id;
    }

    public String getLogin_id() {
        return login_id;
    }

    public void setLogin_id(String login_id) {
        this.login_id = login_id;
    }

    public String getMember_name() {
        return member_name;
    }

    public void setMember_name(String member_name) {
        this.member_name = member_name;
    }

    public String getCompany() {
        return company;
    }

    public void setCompany(String company) {
        this.company = company;
    }

    public String getDepartment() {
        return department;
    }

    public void setDepartment(String department) {
        this.department = department;
    }

    public String getRank_title() {
        return rank_title;
    }

    public void setRank_title(String rank_title) {
        this.rank_title = rank_title;
    }

    public String getPhone_mobile() {
        return phone_mobile;
    }

    public void setPhone_mobile(String phone_mobile) {
        this.phone_mobile = phone_mobile;
    }

    public List<ProjectInfoData> getListMemberProjects() {
        return listMemberProjects;
    }

    public void setListMemberProjects(List<ProjectInfoData> listMemberProjects) {
        this.listMemberProjects = listMemberProjects;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeInt(member_id);
        parcel.writeString(login_id);
        parcel.writeString(member_name);
        parcel.writeString(company);
        parcel.writeString(department);
        parcel.writeString(rank_title);
        parcel.writeString(phone_mobile);
        parcel.writeTypedList(listMemberProjects);
    }
}
/* 2018.9.05
"memberProfile": {
"member_id": 44,
"login_id": "ru*****@hanwha.com",
"member_name": "김성훈",
"company": "호텔&리조트",
"department": "오픈이노베이션팀",
"rank_title": "과장",
"phone_mobile": "010-****-4341",
"listMemberProjects": [
  {
  "task_id": 0,
  "task_name": "",
  "project_id": 13,
  "project_name": "컨텐츠 ACC",
  "track_id": 2,
  "track_name": "Dreamplus",
  "role_code": 20,
  "role_name": "캡틴",
  "status": 0,
  "is_public": null,
  "cmdr_intent": "",
  "evaluation": 210,
  "eval_name": "",
  "due_date": "",
  "leader_member_id": 0,
  "author_member_id": 0,
  "created_at": "",
  "updated_at": ""
  },
  {
  "task_id": 0,
  "task_name": "",
  "project_id": 31,
  "project_name": "VIP 신사업 기획",
  "track_id": 6,
  "track_name": "본체고도화",
  "role_code": 0,
  "role_name": "유닛원",
  "status": 0,
  "is_public": null,
  "cmdr_intent": "",
  "evaluation": 210,
  "eval_name": "",
  "due_date": "",
  "leader_member_id": 0,
  "author_member_id": 0,
  "created_at": "",
  "updated_at": ""
  }
  ],
}
 */