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

import android.os.Parcel;
import android.os.Parcelable;
import android.text.TextUtils;

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

public class ProjectInfoData extends BaseData implements Parcelable {
    /**
     * ex) 0
     */
    int project_id;
    /**
     * ex) "NewGW-Dev"
     */
    String project_name;

    int role_code;
    String role_name;

    int evaluation;

    int project_avg_achieve_rate;

    int achieve_rate;

    int track_id;
    String track_name;
    int member_id;
    String member_name;

    ProjectInfoData(Parcel in) {
        this.project_id = in.readInt();
        this.project_name = in.readString();
        this.role_code = in.readInt();
        this.evaluation = in.readInt();
        this.project_avg_achieve_rate = in.readInt();
        this.achieve_rate = in.readInt();
    }

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

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

    public int getProject_id() {
        return project_id;
    }

    public String getProject_name() {
        return TextUtils.isEmpty(project_name) ? "" : project_name;
    }

    public void setProject_id(int project_id) {
        this.project_id = project_id;
    }

    public void setProject_name(String project_name) {
        this.project_name = project_name;
    }

    public int getRole_code() {
        return role_code;
    }

    public String getRole_name() {
        return role_name;
    }

    public int getEvaluation() {
        return evaluation;
    }

    public void setEvaluation(int evaluation) {
        this.evaluation = evaluation;
    }

    public int getTrack_id() {
        return track_id;
    }

    public String getTrack_name() {
        return track_name;
    }

    public int getMember_id() {
        return member_id;
    }

    public String getMember_name() {
        return member_name;
    }

    public int getProject_avg_achieve_rate() {
        return project_avg_achieve_rate;
    }

    public void setProject_avg_achieve_rate(int project_avg_achieve_rate) {
        this.project_avg_achieve_rate = project_avg_achieve_rate;
    }

    public int getAchieve_rate() {
        return achieve_rate;
    }

    public void setAchieve_rate(int achieve_rate) {
        this.achieve_rate = achieve_rate;
    }

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

    @Override
    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeInt(project_id);
        parcel.writeString(project_name);
        parcel.writeInt(role_code);
        parcel.writeInt(evaluation);
        parcel.writeInt(project_avg_achieve_rate);
        parcel.writeInt(achieve_rate);
    }
}
/**
 * 2019.3.5
 * {
 * "task_id":0,
 * "task_name":"",
 * "project_id":41,
 * "project_name":"도와줘요개발팀",
 * "track_id":18,
 * "track_name":"클러스터 원",
 * "role_code":20,
 * "role_name":"캡틴",
 * "status":0,
 * "cmdr_intent":"중년갑부.. 청년갑부는 이미 틀렸......__thisisdelimiter__목표는 로또 5주연속 1등 당첨",
 * "evaluation":0,
 * "achieve_rate":10,
 * "eval_name":"",
 * "due_date":"",
 * "leader_member_id":0,
 * "author_member_id":0,
 * "created_at":"",
 * "updated_at":"",
 * "_public":true
 * }
 */
