package com.jy.log.model.table;

import com.jy.framework.mybatis.join.QueryColumn;
import com.jy.framework.mybatis.join.Table;
import com.jy.log.model.entity.LogOperate;

public class LogOperateTable extends Table<LogOperate> {

    public static LogOperateTable log_operate = new LogOperateTable();
    public static LogOperateTable lo = log_operate.as("lo");

    /**
     * 操作日志id
     */
    public QueryColumn id = this.field(LogOperate::getId);

    /**
     * 模块标题
     */
    public QueryColumn title = this.field(LogOperate::getTitle);

    /**
     * 业务类型（1查询 2新增 3修改 4删除 99其他）
     */
    public QueryColumn businessType = this.field(LogOperate::getBusinessType);

    /**
     * 消耗时间
     */
    public QueryColumn costTime = this.field(LogOperate::getCostTime);

    /**
     * 请求方式
     */
    public QueryColumn method = this.field(LogOperate::getMethod);

    /**
     * 匹配路径
     */
    public QueryColumn bestMatching = this.field(LogOperate::getBestMatching);

    /**
     * 路径变量
     */
    public QueryColumn requestAttribute = this.field(LogOperate::getRequestAttribute);

    /**
     * param请求参数
     */
    public QueryColumn requestParam = this.field(LogOperate::getRequestParam);

    /**
     * body请求参数
     */
    public QueryColumn requestBody = this.field(LogOperate::getRequestBody);

    /**
     * 返回值
     */
    public QueryColumn result = this.field(LogOperate::getResult);

    /**
     * 操作状态（1正常 0异常）
     */
    public QueryColumn status = this.field(LogOperate::getStatus);

    /**
     * 异常说明
     */
    public QueryColumn errorMsg = this.field(LogOperate::getErrorMsg);

    /**
     * 异常详情
     */
    public QueryColumn errorDetail = this.field(LogOperate::getErrorDetail);

    /**
     * 创建者
     */
    public QueryColumn createUser = this.field(LogOperate::getCreateUser);

    /**
     * 创建时间
     */
    public QueryColumn createTime = this.field(LogOperate::getCreateTime);

    private LogOperateTable() {
        super(LogOperate.class);
    }

    private LogOperateTable(String alias) {
        super(LogOperate.class, alias);
    }

    public LogOperateTable as(String alias) {
        return new LogOperateTable(alias);
    }

}
