package com.muyu.system.domain.model;

import com.muyu.common.core.web.model.QueryModel;
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 SysLogininforExportModel {
    /**
     * IP地址
     */
    private String ipaddr;

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

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

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

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

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