package com.hotent.base.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * 授权信息，含用户月活量
 *
 * @author 欧阳高龙
 * @company 广州宏天软件股份有限公司
 * @since 2022/8/24 18:36
 */
@ApiModel(value="LicenseDataVo", description="授权信息，含用户月活量")
public class LicenseDataVo {

    /**
     * 最大用户月活量
     */
    @ApiModelProperty(value = "最大用户月活量")
    private Integer maxUserCountMonth;
    /**
     * 授权企业名称
     */
    @ApiModelProperty(value = "授权主体")
    private String enterpriseName;
    /**
     * 授权的实例数量，仅检测bpm-runtime服务实例数量
     */
    @ApiModelProperty(value = "副本数量")
    private Integer instanceCount;
    /**
     * 有效期
     */
    @ApiModelProperty(value = "授权有效期")
    private String expireIn;
    /**
     * 最大用户月活量
     */
    @ApiModelProperty(value = "当前已使用用户月活量")
    private Integer userCountMonth;

    public String getExpireIn() {
        return expireIn;
    }

    public String getEnterpriseName() {
        return enterpriseName;
    }

    public Integer getUserCountMonth() {
        if(userCountMonth == null || userCountMonth <= 0){
            return 0;
        }
        return userCountMonth;
    }

    public Integer getInstanceCount() {
        if(instanceCount == null || instanceCount <= 0){
            return 0;
        }
        return instanceCount;
    }

    public Integer getMaxUserCountMonth() {
        if(maxUserCountMonth == null || maxUserCountMonth <= 0){
            return 0;
        }
        return maxUserCountMonth;
    }

    public void setUserCountMonth(Integer userCountMonth) {
        this.userCountMonth = userCountMonth <= 0?0:userCountMonth;
    }

    public void setExpireIn(String expireIn) {
        this.expireIn = expireIn;
    }

    public void setInstanceCount(Integer instanceCount) {
        this.instanceCount = instanceCount<=0?null:instanceCount;
    }

    public void setEnterpriseName(String enterpriseName) {
        this.enterpriseName = enterpriseName;
    }

    public void setMaxUserCountMonth(Integer maxUserCountMonth) {
        this.maxUserCountMonth = maxUserCountMonth<=0?null:maxUserCountMonth;
    }
}
