package tech.starwin.mvp.beans;

import java.io.Serializable;
import java.util.ArrayList;

/**
 * Created by SiKang on 2018/11/20.
 */
public class UpdateBean implements Serializable{
    private int latestVersionCode;
    private String latestVersion;
    private ArrayList<String> releaseNotes;

    public int getLatestVersionCode() {
        return latestVersionCode;
    }

    public void setLatestVersionCode(int latestVersionCode) {
        this.latestVersionCode = latestVersionCode;
    }

    public String getLatestVersion() {
        return latestVersion;
    }

    public void setLatestVersion(String latestVersion) {
        this.latestVersion = latestVersion;
    }

    public ArrayList<String> getReleaseNotes() {
        return releaseNotes;
    }

    public void setReleaseNotes(ArrayList<String> releaseNotes) {
        this.releaseNotes = releaseNotes;
    }


    public String getReleaseNotesStr() {
        if (releaseNotes == null || releaseNotes.size() == 0) {
            return "";
        }
        StringBuffer buffer = new StringBuffer();
        for (String note : releaseNotes) {
            buffer.append(note + "\n");
        }
        buffer.deleteCharAt(buffer.length() - 1);
        return buffer.toString();
    }
}
