package com.cm.central.control.pojo.vos.client;

import com.cm.common.annotation.CheckEmptyAnnotation;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * When you feel like quitting. Think about why you started
 * 当你想要放弃的时候，想想当初你为何开始
 *
 * @ClassName: ClientLicenseVO
 * @Description: 客户端授权
 * @Author: WangGeng
 * @Date: 2020/7/31 10:33 上午
 * @Version: 1.0
 **/
@ApiModel
public class ClientLicenseAuthorizationVO {

    @ApiModelProperty(name = "isOnlyAuthorization", value = "是否在线授权")
    private Integer isOnlyAuthorization;
    @ApiModelProperty(name = "macAddress", value = "mac地址")
    @CheckEmptyAnnotation(name = "mac地址")
    private String macAddress;
    @ApiModelProperty(name = "licenseStartTime", value = "秘钥开始时间")
    @CheckEmptyAnnotation(name = "秘钥开始时间")
    private String licenseStartTime;
    @ApiModelProperty(name = "licenseEffectiveDays", value = "秘钥有效天数")
    @CheckEmptyAnnotation(name = "秘钥有效天数")
    private Integer licenseEffectiveDays;

    public Integer getIsOnlyAuthorization() {
        return isOnlyAuthorization;
    }

    public void setIsOnlyAuthorization(Integer isOnlyAuthorization) {
        this.isOnlyAuthorization = isOnlyAuthorization;
    }

    public String getMacAddress() {
        return macAddress == null ? "" : macAddress.trim();
    }

    public void setMacAddress(String macAddress) {
        this.macAddress = macAddress;
    }

    public String getLicenseStartTime() {
        return licenseStartTime == null ? "" : licenseStartTime.trim();
    }

    public void setLicenseStartTime(String licenseStartTime) {
        this.licenseStartTime = licenseStartTime;
    }

    public Integer getLicenseEffectiveDays() {
        return licenseEffectiveDays;
    }

    public void setLicenseEffectiveDays(Integer licenseEffectiveDays) {
        this.licenseEffectiveDays = licenseEffectiveDays;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("{");
        sb.append("\"isOnlyAuthorization\":")
                .append(isOnlyAuthorization);
        sb.append(",\"macAddress\":")
                .append("\"").append(macAddress).append("\"");
        sb.append(",\"licenseStartTime\":")
                .append("\"").append(licenseStartTime).append("\"");
        sb.append(",\"licenseEffectiveDays\":")
                .append(licenseEffectiveDays);
        sb.append('}');
        return sb.toString();
    }
}
