package com.qmth.teachcloud.common.bean.result;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.qmth.teachcloud.common.enums.log.OperationTypeEnum;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;

/**
 * @Description: 日志操作记录查询返回值
 * @Author: CaoZixuan
 * @Date: 2022-11-29
 */
public class BasicOperationLogResult implements Serializable {
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty("id")
    private Long id;

    @ApiModelProperty("日志内容")
    private String detail;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty("操作人id")
    private Long userId;

    @ApiModelProperty("操作人账号")
    private String loginName;

    @ApiModelProperty("操作人姓名")
    private String realName;

    @ApiModelProperty("IP")
    private String ip;

    @ApiModelProperty("菜单名称")
    private String privilegeName;
    @ApiModelProperty("自定义操作类型")
    private OperationTypeEnum operationType;

    @ApiModelProperty("自定义操作类型")
    private String operationTypeName;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty("创建时间")
    private Long createTime;

    @ApiModelProperty("请求参数")
    private String args;

    @ApiModelProperty("请求结果")
    private String runStatus;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getDetail() {
        return detail;
    }

    public void setDetail(String detail) {
        this.detail = detail;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getLoginName() {
        return loginName;
    }

    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    public String getRealName() {
        return realName;
    }

    public void setRealName(String realName) {
        this.realName = realName;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public String getPrivilegeName() {
        return privilegeName;
    }

    public void setPrivilegeName(String privilegeName) {
        this.privilegeName = privilegeName;
    }

    public OperationTypeEnum getOperationType() {
        return operationType;
    }

    public void setOperationType(OperationTypeEnum operationType) {
        this.operationType = operationType;
    }

    public String getOperationTypeName() {
        return this.operationType == null ? null : this.operationType.getName();
    }

    public void setOperationTypeName(String operationTypeName) {
        this.operationTypeName = operationTypeName;
    }

    public Long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Long createTime) {
        this.createTime = createTime;
    }

    public String getArgs() {
        return args;
    }

    public void setArgs(String args) {
        this.args = args;
    }

    public String getRunStatus() {
        return runStatus;
    }

    public void setRunStatus(String runStatus) {
        this.runStatus = runStatus;
    }
}
