
package com.lideeyunji.core.framework.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.ibatis.type.JdbcType;

import java.time.LocalDateTime;

/**
 * 请求日志
 *
 */
@TableName("yunji_log_api")
@Data
@EqualsAndHashCode
public class LogRequestApiEntity {
    @JsonSerialize(
            using = ToStringSerializer.class
    )
    @TableId(
            value = "id",
            type = IdType.ASSIGN_ID
    )
    private Long id;


    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT, jdbcType = JdbcType.DATE)
    private LocalDateTime createTime;

    /**
     * 创建者
     *
     */
    @TableField(fill = FieldFill.INSERT, jdbcType = JdbcType.BIGINT)
    private Long createUser;

    private String createUserName;

    /**
     * 创建部门
     *
     */
    @TableField(fill = FieldFill.INSERT, jdbcType = JdbcType.BIGINT)
    private Long createDept;


    /**
     * 更新者
     *
     */
    @TableField(fill = FieldFill.INSERT_UPDATE, jdbcType = JdbcType.BIGINT)
    private Long updateUser;

    /**
     * 最后更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE, jdbcType = JdbcType.DATE)
    private LocalDateTime updateTime;

    /**
     * 是否删除
     */
    private Integer isDeleted;

    /**
     * 租户id
     */
    private Long tenantId;


    //ip
    private String ip;

    //标题
    private String title;

    //模块名称
    private String modelTitle;

    //方法名称
    private String methodName;

    //类名称
    private String methodClass;

    //耗时
    private Long time;

    //请求地址
    private String requestUri;

    //请求方式
    private String requestMethod;

    //请求参数
    private String requestParams;

}

