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

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

import java.io.Serializable;

/**
 *
 * @ClassName: ClientDTO
 * @Description: 客户端
 * @Author: WenG
 * @Date: 2020-07-30 19:12
 * @Version: 1.0
 **/
@ApiModel
public class ClientLicenseAuthorizationDTO implements Serializable {

    private static final long serialVersionUID = 1905829108149678295L;
    @ApiModelProperty(name = "isOnlyAuthorization", value = "是否在线授权")
    private Integer isOnlyAuthorization;
    @ApiModelProperty(name = "macAddress", value = "mac地址")
    private String macAddress;
    @ApiModelProperty(name = "licenseStartTime", value = "秘钥开始时间")
    private String licenseStartTime;
    @ApiModelProperty(name = "licenseEffectiveDays", value = "秘钥有效天数")
    private Integer licenseEffectiveDays;
    @ApiModelProperty(name = "licenseExpirationDate", value = "秘钥到期时间")
    private String licenseExpirationDate;

    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;
    }

    public String getLicenseExpirationDate() {
        return licenseExpirationDate == null ? "" : licenseExpirationDate.trim();
    }

    public void setLicenseExpirationDate(String licenseExpirationDate) {
        this.licenseExpirationDate = licenseExpirationDate;
    }

    @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(",\"licenseExpirationDate\":")
                .append("\"").append(licenseExpirationDate).append("\"");
        sb.append('}');
        return sb.toString();
    }
}
