package com.foreverwin.mesnac.common.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author Ervin Chen
 * @since 2021-04-21
 */

@TableName("Z_HTTP_LOG")
public class HttpLog extends Model<HttpLog> {

    private static final long serialVersionUID = 1L;

    /**
     * 唯一
     */
   @TableId(value = "HANDLE", type = IdType.INPUT)
   private String handle;
    /**
     * 站点
     */
   @TableField("SITE")
   private String site;
    /**
     * 本地地址
     */
   @TableField("LOCAL_ADDR")
   private String localAddr;
    /**
     * 请求地址
     */
   @TableField("URL")
   private String url;
    /**
     * 请求方法
     */
   @TableField("METHOD")
   private String method;
    /**
     * 后台方法
     */
   @TableField("CLASS_METHOD")
   private String classMethod;
    /**
     * 请求参数
     */
   @TableField("PARAM_LIST")
   private String paramList;
    /**
     * 处理异常
     */
   @TableField("ERROR")
   private String error;
    /**
     * 处理结果
     */
   @TableField("RESULTS")
   private String results;
    /**
     * 处理时间
     */
   @TableField("RUN_TIME")
   private Long runTime;
    /**
     * 请求账号
     */
   @TableField("CREATE_USER")
   private String createUser;
    /**
     * 创建日期
     */
   @TableField("CREATED_DATE_TIME")
   private LocalDateTime createdDateTime;


   public String getHandle() {
      return handle;
   }

   public void setHandle(String handle) {
      this.handle = handle;
   }

   public String getSite() {
      return site;
   }

   public void setSite(String site) {
      this.site = site;
   }

   public String getLocalAddr() {
      return localAddr;
   }

   public void setLocalAddr(String localAddr) {
      this.localAddr = localAddr;
   }

   public String getUrl() {
      return url;
   }

   public void setUrl(String url) {
      this.url = url;
   }

   public String getMethod() {
      return method;
   }

   public void setMethod(String method) {
      this.method = method;
   }

   public String getClassMethod() {
      return classMethod;
   }

   public void setClassMethod(String classMethod) {
      this.classMethod = classMethod;
   }

   public String getParamList() {
      return paramList;
   }

   public void setParamList(String paramList) {
      this.paramList = paramList;
   }

   public String getError() {
      return error;
   }

   public void setError(String error) {
      this.error = error;
   }

   public String getResults() {
      return results;
   }

   public void setResults(String results) {
      this.results = results;
   }

   public Long getRunTime() {
      return runTime;
   }

   public void setRunTime(Long runTime) {
      this.runTime = runTime;
   }

   public String getCreateUser() {
      return createUser;
   }

   public void setCreateUser(String createUser) {
      this.createUser = createUser;
   }

   public LocalDateTime getCreatedDateTime() {
      return createdDateTime;
   }

   public void setCreatedDateTime(LocalDateTime createdDateTime) {
      this.createdDateTime = createdDateTime;
   }

   public static final String HANDLE = "HANDLE";

   public static final String SITE = "SITE";

   public static final String LOCAL_ADDR = "LOCAL_ADDR";

   public static final String URL = "URL";

   public static final String METHOD = "METHOD";

   public static final String CLASS_METHOD = "CLASS_METHOD";

   public static final String PARAM_LIST = "PARAM_LIST";

   public static final String ERROR = "ERROR";

   public static final String RESULTS = "RESULTS";

   public static final String RUN_TIME = "RUN_TIME";

   public static final String CREATE_USER = "CREATE_USER";

   public static final String CREATED_DATE_TIME = "CREATED_DATE_TIME";


   @Override
   protected Serializable pkVal() {
      return this.handle;
   }

   @Override
   public String toString() {
      return "HttpLog{" +
         "handle = " + handle +
         ", site = " + site +
         ", localAddr = " + localAddr +
         ", url = " + url +
         ", method = " + method +
         ", classMethod = " + classMethod +
         ", paramList = " + paramList +
         ", error = " + error +
         ", results = " + results +
         ", runTime = " + runTime +
         ", createUser = " + createUser +
         ", createdDateTime = " + createdDateTime +
         "}";
   }
}