package ink.wgink.login.base.pojo.dtos.log;

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

import java.io.Serializable;

/**
 * When you feel like quitting. Think about why you started
 * 当你想要放弃的时候，想想当初你为何开始
 *
 * @ClassName: LoginLoggerDTO
 * @Description: 登录日志
 * @Author: WangGeng
 * @Date: 2020/7/21 18:43
 * @Version: 1.0
 **/
@ApiModel
public class LoginLogDTO implements Serializable {

    private static final long serialVersionUID = 7035763517567758961L;
    @ApiModelProperty(name = "loginAddress", value = "登录地址")
    private String loginAddress;
    @ApiModelProperty(name = "creatorName", value = "登录用户")
    private String creatorName;
    @ApiModelProperty(name = "gmtCreate", value = "登录时间")
    private String gmtCreate;
    @ApiModelProperty(name = "loginType", value = "登陆类型")
    private String loginType;

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public String getLoginAddress() {
        return loginAddress == null ? "" : loginAddress.trim();
    }

    public void setLoginAddress(String loginAddress) {
        this.loginAddress = loginAddress;
    }

    public String getCreatorName() {
        return creatorName == null ? "" : creatorName.trim();
    }

    public void setCreatorName(String creatorName) {
        this.creatorName = creatorName;
    }

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

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

    public String getLoginType() {
        return loginType == null ? "" : loginType.trim();
    }

    public void setLoginType(String loginType) {
        this.loginType = loginType;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("{");
        sb.append("\"loginAddress\":\"")
                .append(loginAddress).append('\"');
        sb.append(",\"creatorName\":\"")
                .append(creatorName).append('\"');
        sb.append(",\"gmtCreate\":\"")
                .append(gmtCreate).append('\"');
        sb.append(",\"loginType\":\"")
                .append(loginType).append('\"');
        sb.append('}');
        return sb.toString();
    }
}
