package com.cm.smartgate.pojo.dtos;

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

import java.io.Serializable;

/**
 * When you feel like quitting. Think about why you started
 * 当你想要放弃的时候，想想当初你为何开始
 *
 * @ClassName: SmartGateDTO
 * @Description: 智慧网闸
 * @Author: WangGeng
 * @Date: 2020/8/27 10:09
 * @Version: 1.0
 **/
public class SmartGateDTO implements Serializable {

    private static final long serialVersionUID = 917749980403366730L;
    @ApiModelProperty(name = "smartGateId", value = "id")
    private String smartGateId;
    @ApiModelProperty(name = "smartGateSerialNo", value = "设备编码")
    private String smartGateSerialNo;
    @ApiModelProperty(name = "smartGateName", value = "名称")
    private String smartGateName;
    @ApiModelProperty(name = "smartGateSummary", value = "描述")
    private String smartGateSummary;
    @ApiModelProperty(name = "smartGateIpAddress", value = "ip地址")
    private String smartGateIpAddress;
    @ApiModelProperty(name = "smartGatePort", value = "端口")
    private Integer smartGatePort;
    @ApiModelProperty(name = "smartGateUsername", value = "用户名")
    private String smartGateUsername;
    @ApiModelProperty(name = "smartGatePassword", value = "密码")
    private String smartGatePassword;
    @ApiModelProperty(name = "gmtCreate", value = "创建时间")
    private String gmtCreate;
    @ApiModelProperty(name = "onlineState", value = "在线状态")
    private Integer onlineState;
    @ApiModelProperty(name = "generalMode", value = "通行模式")
    private Integer generalMode;
    @ApiModelProperty(name = "doorMode", value = "开门模式")
    private Integer doorMode;
    @ApiModelProperty(name = "trustMode", value = "认证模式")
    private Integer trustMode;
    @ApiModelProperty(name = "lastOnlineTime", value = "最后在线时间")
    private String lastOnlineTime;

    public String getSmartGateId() {
        return smartGateId == null ? "" : smartGateId.trim();
    }

    public void setSmartGateId(String smartGateId) {
        this.smartGateId = smartGateId;
    }

    public String getSmartGateSerialNo() {
        return smartGateSerialNo == null ? "" : smartGateSerialNo.trim();
    }

    public void setSmartGateSerialNo(String smartGateSerialNo) {
        this.smartGateSerialNo = smartGateSerialNo;
    }

    public String getSmartGateName() {
        return smartGateName == null ? "" : smartGateName.trim();
    }

    public void setSmartGateName(String smartGateName) {
        this.smartGateName = smartGateName;
    }

    public String getSmartGateSummary() {
        return smartGateSummary == null ? "" : smartGateSummary.trim();
    }

    public void setSmartGateSummary(String smartGateSummary) {
        this.smartGateSummary = smartGateSummary;
    }

    public String getSmartGateIpAddress() {
        return smartGateIpAddress == null ? "" : smartGateIpAddress.trim();
    }

    public void setSmartGateIpAddress(String smartGateIpAddress) {
        this.smartGateIpAddress = smartGateIpAddress;
    }

    public Integer getSmartGatePort() {
        return smartGatePort;
    }

    public void setSmartGatePort(Integer smartGatePort) {
        this.smartGatePort = smartGatePort;
    }

    public String getSmartGateUsername() {
        return smartGateUsername == null ? "" : smartGateUsername.trim();
    }

    public void setSmartGateUsername(String smartGateUsername) {
        this.smartGateUsername = smartGateUsername;
    }

    public String getSmartGatePassword() {
        return smartGatePassword == null ? "" : smartGatePassword.trim();
    }

    public void setSmartGatePassword(String smartGatePassword) {
        this.smartGatePassword = smartGatePassword;
    }

    public String getGmtCreate() {
        return gmtCreate == null ? "" : gmtCreate.trim();
    }

    public void setGmtCreate(String gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    public Integer getOnlineState() {
        return onlineState == null ? -1 : onlineState;
    }

    public void setOnlineState(Integer onlineState) {
        this.onlineState = onlineState;
    }

    public Integer getGeneralMode() {
        return generalMode;
    }

    public void setGeneralMode(Integer generalMode) {
        this.generalMode = generalMode;
    }

    public Integer getDoorMode() {
        return doorMode;
    }

    public void setDoorMode(Integer doorMode) {
        this.doorMode = doorMode;
    }

    public Integer getTrustMode() {
        return trustMode;
    }

    public void setTrustMode(Integer trustMode) {
        this.trustMode = trustMode;
    }

    public String getLastOnlineTime() {
        return lastOnlineTime == null ? "" : lastOnlineTime.trim();
    }

    public void setLastOnlineTime(String lastOnlineTime) {
        this.lastOnlineTime = lastOnlineTime;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("{");
        sb.append("\"smartGateId\":\"")
                .append(smartGateId).append('\"');
        sb.append(",\"smartGateSerialNo\":\"")
                .append(smartGateSerialNo).append('\"');
        sb.append(",\"smartGateName\":\"")
                .append(smartGateName).append('\"');
        sb.append(",\"smartGateSummary\":\"")
                .append(smartGateSummary).append('\"');
        sb.append(",\"smartGateIpAddress\":\"")
                .append(smartGateIpAddress).append('\"');
        sb.append(",\"smartGatePort\":")
                .append(smartGatePort);
        sb.append(",\"smartGateUsername\":\"")
                .append(smartGateUsername).append('\"');
        sb.append(",\"smartGatePassword\":\"")
                .append(smartGatePassword).append('\"');
        sb.append(",\"gmtCreate\":\"")
                .append(gmtCreate).append('\"');
        sb.append(",\"onlineState\":")
                .append(onlineState);
        sb.append(",\"generalMode\":")
                .append(generalMode);
        sb.append(",\"doorMode\":")
                .append(doorMode);
        sb.append(",\"trustMode\":")
                .append(trustMode);
        sb.append(",\"lastOnlineTime\":\"")
                .append(lastOnlineTime).append('\"');
        sb.append('}');
        return sb.toString();
    }
}
