package cn.hanghui.outapi.platform.tenant.entity.dto.auth;

import cn.hanghui.outapi.platform.tenant.entity.dto.open.UserInfoExtendParams;
import com.alibaba.fastjson.JSONObject;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

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

/**
 * @author shisl
 * @package cn.hanghui.outapi.platform.tenant.entity.dto.auth
 * @class OpenInterfaceAuthDto
 * @date 2024/1/17 下午1:33
 * @description
 */
@Data
public class OpenInterfaceAuthDto implements Serializable {

    private Long id;

    @ApiModelProperty(value = "购买方公司id")
    private Long purchaserId;

    @ApiModelProperty(value = "是否开启返回详细信息 0关闭 1开启 默认1开启")
    private Boolean resultInfoSwitch;

    @ApiModelProperty(value = "InterfaceTypeEnum 接口类型 0:风险评分 [1,2,3]")
    private Integer interfaceType;

    @ApiModelProperty(value = "总调用次数 null不限制")
    private Integer limitTimes;

    @ApiModelProperty(value = "单位时间调用频次 0或null不限制")
    private Integer limitFrequency;

    @ApiModelProperty(value = "调用频次单位时间 单位秒 0或null不限制")
    private Integer limitFrequencyTime;

    @ApiModelProperty(value = "额外扩展参数 巨龙:（{\"searchSwitchProvince\":false,\"xpSwitch\":false,\"dzSwitch\":false}） ")
    private String extendParams;

    public static String convertInterfaceTypes2Str(List<Integer> interfaceTypes) {
        return JSONObject.toJSONString(interfaceTypes);
    }


}
