package org.springblade.common.auth.support;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.wn.common.datamodel.BaseDTO;
import com.wn.common.datamodel.Long2StringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

/**
 * <p>
 * 用户的操作信息
 * </p>
 *
 * @author wpp
 * @since 2019-09-03
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "用户操作日志信息", description = "用户操作日志信息")
public class OperationLog extends BaseDTO {

    private static final long serialVersionUID = 1L;

    /**
     * 用户ID
     */
    @ApiModelProperty(name = "userId", value = "用户ID")
    @JsonSerialize(using = Long2StringSerializer.class)
    private Long userId;
    /**
     * 用户登录名
     */
    @ApiModelProperty(name = "loginName", value = "用户登录名")
    private String loginName;
    /**
     * 用户真实姓名
     */
    @ApiModelProperty(name = "realName", value = "用户真实姓名")
    private String realName;
    /**
     * 员工ID
     */
    @ApiModelProperty(name = "staffId", value = "员工ID")
    @JsonSerialize(using = Long2StringSerializer.class)
    private Long staffId;
    /**
     * 应用ID
     */
    @ApiModelProperty(name = "applicationId", value = "应用ID")
    @JsonSerialize(using = Long2StringSerializer.class)
    private Long applicationId;
    /**
     * 应用名称
     */
    @ApiModelProperty(name = "applicationName", value = "应用名称")
    private String applicationName;
    /**
     * 角色ID
     */
    @ApiModelProperty(name = "roleId", value = "角色ID")
    private String roleId;
    /**
     * 角色名称
     */
    @ApiModelProperty(name = "roleName", value = "角色名称")
    private String roleName;
    /**
     * 菜单ID
     */
    @ApiModelProperty(name = "menuId", value = "菜单ID")
    @JsonSerialize(using = Long2StringSerializer.class)
    private Long menuId;
    /**
     * 菜单名称
     */
    @ApiModelProperty(name = "menuName", value = "菜单名称")
    private String menuName;
    /**
     * 操作ID
     */
    @ApiModelProperty(name = "operationId", value = "操作ID")
    @JsonSerialize(using = Long2StringSerializer.class)
    private Long operationId;
    /**
     * 操作名称
     */
    @ApiModelProperty(name = "operationName", value = "操作名称")
    private String operationName;
    /**
     * 请求参数JSON
     */
    @ApiModelProperty(name = "request", value = "请求参数JSON")
    private String request;
    /**
     * 返回参数JSON
     */
    @ApiModelProperty(name = "response", value = "返回参数JSON")
    private String response;
    /**
     * 创建时间
     */
    @ApiModelProperty(name = "createdTime", value = "创建时间")
    private Date createdTime;

}
