package ink.wgink.service.user.pojo.dtos;

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: UserLogDTO
 * @Description: 用户日志
 * @Author: WangGeng
 * @Date: 2020/7/21 17:17
 * @Version: 1.0
 **/
@ApiModel
public class UserLogDTO implements Serializable {

    private static final long serialVersionUID = 2880126413411212743L;
    @ApiModelProperty(name = "userName", value = "修改用户")
    private String userName;
    @ApiModelProperty(name = "updateType", value = "修改类型")
    private String updateType;
    @ApiModelProperty(name = "oldValue", value = "旧值")
    private String oldValue;
    @ApiModelProperty(name = "newValue", value = "新值")
    private String newValue;
    @ApiModelProperty(name = "updateReason", value = "修改原因")
    private String updateReason;
    @ApiModelProperty(name = "creatorName", value = "创建人")
    private String creatorName;
    @ApiModelProperty(name = "gmtCreate", value = "创建时间")
    private String gmtCreate;

    public String getUserName() {
        return userName == null ? "" : userName.trim();
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUpdateType() {
        return updateType == null ? "" : updateType.trim();
    }

    public void setUpdateType(String updateType) {
        this.updateType = updateType;
    }

    public String getOldValue() {
        return oldValue == null ? "" : oldValue.trim();
    }

    public void setOldValue(String oldValue) {
        this.oldValue = oldValue;
    }

    public String getNewValue() {
        return newValue == null ? "" : newValue.trim();
    }

    public void setNewValue(String newValue) {
        this.newValue = newValue;
    }

    public String getUpdateReason() {
        return updateReason == null ? "" : updateReason.trim();
    }

    public void setUpdateReason(String updateReason) {
        this.updateReason = updateReason;
    }

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

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("{");
        sb.append("\"userName\":")
                .append("\"").append(userName).append("\"");
        sb.append(",\"updateType\":")
                .append("\"").append(updateType).append("\"");
        sb.append(",\"oldValue\":")
                .append("\"").append(oldValue).append("\"");
        sb.append(",\"newValue\":")
                .append("\"").append(newValue).append("\"");
        sb.append(",\"updateReason\":")
                .append("\"").append(updateReason).append("\"");
        sb.append(",\"creatorName\":")
                .append("\"").append(creatorName).append("\"");
        sb.append(",\"gmtCreate\":")
                .append("\"").append(gmtCreate).append("\"");
        sb.append('}');
        return sb.toString();
    }
}
