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.LogAccess;

public class LogAccessTable extends Table<LogAccess> {

    public static LogAccessTable log_access = new LogAccessTable();
    public static LogAccessTable la = log_access.as("la");

    /**
     * 访问日志id
     */
    public QueryColumn id = this.field(LogAccess::getId);

    /**
     * 用户账号
     */
    public QueryColumn username = this.field(LogAccess::getUsername);

    /**
     * 登录IP地址
     */
    public QueryColumn ip = this.field(LogAccess::getIp);

    /**
     * 登录城市地址
     */
    public QueryColumn location = this.field(LogAccess::getLocation);

    /**
     * 浏览器类型
     */
    public QueryColumn browser = this.field(LogAccess::getBrowser);

    /**
     * 操作系统
     */
    public QueryColumn os = this.field(LogAccess::getOs);

    /**
     * 状态（1成功 0失败）
     */
    public QueryColumn status = this.field(LogAccess::getStatus);

    /**
     * 提示消息
     */
    public QueryColumn msg = this.field(LogAccess::getMsg);

    /**
     * 访问时间
     */
    public QueryColumn accessTime = this.field(LogAccess::getAccessTime);

    private LogAccessTable() {
        super(LogAccess.class);
    }

    private LogAccessTable(String alias) {
        super(LogAccess.class, alias);
    }

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

}
