package com.fxy.bean;

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

import java.util.ArrayList;

/**
 * 项目名称：FingerStorage
 * 类描述：
 * 创建人：admin
 * 创建时间：2018/3/31 16:08
 * 修改人：COMP-021-2006
 * 修改时间：2018/3/31 16:08
 * 修改备注：
 */

public class UrlModel implements Parcelable {
    /**
     * 服务器返回的图片url(逗号分隔)
     */
    public String photoUrls;
    /**
     * 服务器返回的视频url
     */
    public String videoUrls;
    /**
     * 已上传后的图片本地地址集合
     */
    public ArrayList<String> imgPathList=new ArrayList<>();
    /**
     * 已上传后的视频本地地址
     */
    public String videoPath;

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

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

    @Override
    public String toString() {
        return "UrlModel{" +
                "photoUrls='" + photoUrls + '\'' +
                ", videoUrls='" + videoUrls + '\'' +
                ", imgPathList=" + imgPathList +
                ", videoPath='" + videoPath + '\'' +
                '}';
    }

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

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.photoUrls);
        dest.writeString(this.videoUrls);
        dest.writeStringList(this.imgPathList);
        dest.writeString(this.videoPath);
    }

    public UrlModel() {
    }

    protected UrlModel(Parcel in) {
        this.photoUrls = in.readString();
        this.videoUrls = in.readString();
        this.imgPathList = in.createStringArrayList();
        this.videoPath = in.readString();
    }

}
