package com.muyu.system.domain.model;

import com.muyu.common.core.web.model.QueryModel;
import com.muyu.common.core.web.page.PageQueryModel;
import com.muyu.common.core.web.page.PageReq;
import com.muyu.system.domain.rep.SysLogininforListReq;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import java.util.Date;

/**
 * 用户登录日志查询模型对象
 */
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
public class SysLogininforListModel extends QueryModel<SysLogininforListModel> {
    /**
     * IP地址
     */
    private String ipaddr;

    /**
     * 用户名称
     */
    private String userName;

    /**
     * 装填
     */
    private String status;

    /**
     * 开始时间
     */
    private Date beginTime;

    /**
     * 结束时间
     */
    private Date endTime;

    public static SysLogininforListModel reqBuild(SysLogininforListReq req){
        return SysLogininforListModel.builder()
                .ipaddr(req.getIpaddr())
                .userName(req.getUserName())
                .beginTime(req.getBeginTime())
                .endTime(req.getEndTime())
                .build()
                .domainBuild(req);
    }
}
