package com.wisewoods.base.bean;

import com.blankj.utilcode.util.GsonUtils;
import com.google.gson.reflect.TypeToken;

import java.io.Serializable;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;

public class BaseInfo extends Results<BaseInfo.DataBean> {
    public static class DataBean implements Serializable {
        public long Id;
        public String baseClassified;
        public String baseDesc;
        public String baseLocation;
        public String baseName;
        public List<String> basePicture;
        public String baseRegion;
        public String baseRegion2;
        public String baseThumbnail;
        public List<UploadImgBean> baseVideo;
        public String dictLabel;
        public String dictValue;
        public String linkmanName;
        public String linkmanTel;


        public String getBaseRegion() {
            List<String> ids = GsonUtils.fromJson(baseRegion, new TypeToken<List<String>>() {
            }.getType());
            StringBuffer sb = new StringBuffer();
            for (String id : ids) {
                sb.append(id+',');
            }
            return sb.length() > 0 ? sb.substring(0, sb.length() - 1) : "";
        }

    }
}
