package com.sobot.common.login.model;

import com.sobot.gson.annotations.Expose;
import com.sobot.gson.annotations.SerializedName;

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

/**
 * 登录后的客服信息
 */
public class SobotServiceInfoModel implements Serializable {

    /**
     * 客服id
     */
    private String serviceId;
    /**
     * 客服工号
     */
    private String serviceNo;

    /**
     * 客服名字
     */
    private String serviceName;
    /**
     * 客服昵称
     */
    private String serviceNick;
    /**
     * 客服头像
     */
    private String faceImg;
    /**
     * 0 只用旧console 其他都是新console；
     */
    private int newBossSwitch;
    /**
     * 权限信息
     */
    private List<ServiceFunctionVoModel> functionStr;

    //区域环境（0国内  1国外）
    private int region;

    /**
     * 公司id
     */
    private String companyId;

    /**
     * 1 账号开通v6；其它是v1
     */
    private int callV6Flag;

    /**
     * 时区
     */
    private String timezone;

    public static final String TIMEZONE = "timezone";

    /**
     * 时区城市
     */
    private String timezoneId;

    public static final String TIMEZONEID = "timezoneId";


    /**
     * 手机号
     */
    private String phoneNo;
    /**
     * 权限 "globalPermissions": ["calldetails-newcustomers", "sw-ccc-thxq-xzkh", "calldetails-editcustomer", "DepartmentalAppealReview", "sw-ccc-thxq-bjkh",
     * "A00008", "calldetails-relatedcustomers", "ChatQualityScore", "237283747", "sw-ccc-thxq-glkh", "calldetails-savesersummary", "CallQualityScore", "allTicket",
     * "sw-ccc-thxq-bcfwzj", "calldetails-newworkorder", "ChatRecheck", "sw-ccc-thxq-xjgd", "mw-ccc-thxq-gdcd", "sw-ccc-thxq-gdcd", "calldetails-recordingandplay",
     * "sw-ccc-thxq-fsdx", "calldetails-recorddownload", "sw-ccc-thxq-lybf", "calldetails-messageplay", "sw-ccc-thxq-lyxz", "mw-ccc-thxq-liuyxz", "sw-ccc-thxq-dhhb",
     * "sw-ccc-thxq-liuybf", "sw-ccc-thxq-liuyxz", "9999"]
     */
    private List<String> globalPermissions;
    //是否是号码脱敏，true 脱敏，false 明文
    private boolean hideFlag;


    private static final long serialVersionUID = 1L;
    private String loginAccount;    //登录账号
    private String loginPwd;    //登录密码
    private int maxAccept;    //最大接待量

    private int status; //1：在线，0：离线，2-人工忙碌，3-人工小休，4-人工培训，5-人工会议，6-人工用餐，7-人工活动
    private String pu;
    private String puid;
    private String token;
    private int imFlag;//0是工单客服  1是在线客服
    private int cusRoleId;//身份id  3333：超级管理员；1111：在线客服；2222：管理员
    private String cusRoleName;//身份名称 客服身份
    private int topFlag;//星标置顶 0不置顶 1置顶
    private int sortFlag;//会话排序 0 按接入顺序 1 按新消息时间
    private String centerNumber;//如果不为空，说明开通了呼叫功能
    private int fuseWork;//1-存在融合工作台，使用新版服务总计 0-没有融合工作台
    private int callV1Flag;//是否是V1,方便做那个呼叫v1/v6切换的功能
    private int transferAuditFlag;//转接审核开关 0关闭  1开启
    private String companyName;//公司名称
    private String accountStatus;//企业账号版本：旗舰版

    private String kbVersion;//智能回复，查询版本v6/v1
    private String robotVersion;//机器人，查询版本v6/v1
    private String onlineVersion;//在线，查询版本v6/v1


    public static final String ACCESS_TOKEN = "access_token";//呼叫v6 accessToken

    private long login_time;//登录时间戳

    private String defaultAppLoginStatus;//默认登录状态
    private int readFlag;//已读未读开关 0-关闭，1-开启

    public static final String LOGIN_TIME = "login_time";
    //客服工作台语言 v3.3.9
    private String serviceWorkbenchLang;

    public String getServiceWorkbenchLang() {
        return serviceWorkbenchLang;
    }

    public void setServiceWorkbenchLang(String serviceWorkbenchLang) {
        this.serviceWorkbenchLang = serviceWorkbenchLang;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public String getAccountStatus() {
        return accountStatus;
    }

    public void setAccountStatus(String accountStatus) {
        this.accountStatus = accountStatus;
    }

    public String getDefaultAppLoginStatus() {
        return defaultAppLoginStatus;
    }

    public void setDefaultAppLoginStatus(String defaultAppLoginStatus) {
        this.defaultAppLoginStatus = defaultAppLoginStatus;
    }

    @Expose
    @SerializedName("wslink.bak")
    private List<String> wslinkBak;//通道地址

    @Expose
    @SerializedName("wslink.default")
    private String wslinkDefault;//通道默认地址

    public List<String> getWslinkBak() {
        return wslinkBak;
    }

    public void setWslinkBak(List<String> wslinkBak) {
        this.wslinkBak = wslinkBak;
    }

    public String getWslinkDefault() {
        return wslinkDefault;
    }

    public void setWslinkDefault(String wslinkDefault) {
        this.wslinkDefault = wslinkDefault;
    }

    public int getCusRoleId() {
        return cusRoleId;
    }

    public void setCusRoleId(int cusRoleId) {
        this.cusRoleId = cusRoleId;
    }

    public String getCusRoleName() {
        return cusRoleName;
    }

    public void setCusRoleName(String cusRoleName) {
        this.cusRoleName = cusRoleName;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public int isImFlag() {
        return imFlag;
    }

    public void setImFlag(int imFlag) {
        this.imFlag = imFlag;
    }

    public String getPu() {
        return pu;
    }

    public void setPu(String pu) {
        this.pu = pu;
    }

    public String getPuid() {
        return puid;
    }

    public void setPuid(String puid) {
        this.puid = puid;
    }


    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public int getTopFlag() {
        return topFlag;
    }

    public void setTopFlag(int topFlag) {
        this.topFlag = topFlag;
    }

    public int getSortFlag() {
        return sortFlag;
    }

    public void setSortFlag(int sortFlag) {
        this.sortFlag = sortFlag;
    }

    public String getCenterNumber() {
        return centerNumber;
    }

    public void setCenterNumber(String centerNumber) {
        this.centerNumber = centerNumber;
    }


    public boolean getTransferAuditFlag() {
        return transferAuditFlag == 1 ? true : false;
    }

    public void setTransferAuditFlag(int transferAuditFlag) {
        this.transferAuditFlag = transferAuditFlag;
    }

    public int getFuseWork() {
        return fuseWork;
    }

    public void setFuseWork(int fuseWork) {
        this.fuseWork = fuseWork;
    }

    public int getCallV6Flag() {
        return callV6Flag;
    }

    public void setCallV6Flag(int callV6Flag) {
        this.callV6Flag = callV6Flag;
    }

    public int getCallV1Flag() {
        return callV1Flag;
    }

    public void setCallV1Flag(int callV1Flag) {
        this.callV1Flag = callV1Flag;
    }

    public String getKbVersion() {
        return kbVersion;
    }

    public void setKbVersion(String kbVersion) {
        this.kbVersion = kbVersion;
    }

    public long getLogin_time() {
        return login_time;
    }

    public void setLogin_time(long login_time) {
        this.login_time = login_time;
    }

    public String getLoginAccount() {
        return loginAccount;
    }

    public void setLoginAccount(String loginAccount) {
        this.loginAccount = loginAccount;
    }

    public String getLoginPwd() {
        return loginPwd;
    }

    public void setLoginPwd(String loginPwd) {
        this.loginPwd = loginPwd;
    }

    public List<String> getGlobalPermissions() {
        return globalPermissions;
    }

    public void setGlobalPermissions(List<String> globalPermissions) {
        this.globalPermissions = globalPermissions;
    }

    public boolean isHideFlag() {
        if (null != globalPermissions && globalPermissions.contains("9999")) {
            return true;
        }
        return false;
    }

    public String getCompanyId() {
        return companyId;
    }

    public void setCompanyId(String companyId) {
        this.companyId = companyId;
    }

    public String getPhoneNo() {
        return phoneNo;
    }

    public void setPhoneNo(String phoneNo) {
        this.phoneNo = phoneNo;
    }

    public String getServiceId() {
        return serviceId;
    }

    public void setServiceId(String serviceId) {
        this.serviceId = serviceId;
    }

    public String getServiceNo() {
        return serviceNo;
    }

    public void setServiceNo(String serviceNo) {
        this.serviceNo = serviceNo;
    }

    public List<ServiceFunctionVoModel> getFunctionStr() {
        return functionStr;
    }

    public void setFunctionStr(List<ServiceFunctionVoModel> functionStr) {
        this.functionStr = functionStr;
    }

    public String getServiceName() {
        return serviceName;
    }

    public void setServiceName(String serviceName) {
        this.serviceName = serviceName;
    }

    public int getNewBossSwitch() {
        return newBossSwitch;
    }

    public void setNewBossSwitch(int newBossSwitch) {
        this.newBossSwitch = newBossSwitch;
    }


    public int getRegion() {
        return region;
    }

    public void setRegion(int region) {
        this.region = region;
    }

    public String getTimezone() {
        return timezone;
    }

    public void setTimezone(String timezone) {
        this.timezone = timezone;
    }

    public String getTimezoneId() {
        return timezoneId;
    }

    public void setTimezoneId(String timezoneId) {
        this.timezoneId = timezoneId;
    }

    public String getServiceNick() {
        return serviceNick;
    }

    public void setServiceNick(String serviceNick) {
        this.serviceNick = serviceNick;
    }

    public String getFaceImg() {
        return faceImg;
    }

    public void setFaceImg(String faceImg) {
        this.faceImg = faceImg;
    }

    public void setHideFlag(boolean hideFlag) {
        this.hideFlag = hideFlag;
    }

    public int getMaxAccept() {
        return maxAccept;
    }

    public void setMaxAccept(int maxAccept) {
        this.maxAccept = maxAccept;
    }

    public int getImFlag() {
        return imFlag;
    }

    public String getRobotVersion() {
        return robotVersion;
    }

    public void setRobotVersion(String robotVersion) {
        this.robotVersion = robotVersion;
    }

    public String getOnlineVersion() {
        return onlineVersion;
    }

    public void setOnlineVersion(String onlineVersion) {
        this.onlineVersion = onlineVersion;
    }

    public int getReadFlag() {
        return readFlag;
    }

    public void setReadFlag(int readFlag) {
        this.readFlag = readFlag;
    }
}
