package com.nova.sankuai.domain.vo.sysuser;
|
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.nova.sankuai.domain.entity.SysUser;
|
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModelProperty;
|
import lombok.Data;
|
import org.springframework.beans.BeanUtils;
|
|
import java.util.Date;
|
|
/**
|
* @author weikangdi
|
* @create 2021/11/22
|
*/
|
@Data
|
@ApiModel(value = "系统管理员对象Vo")
|
public class AdminVo {
|
|
@ApiModelProperty(value = "主键")
|
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
private Long id;
|
|
@ApiModelProperty(value = "用户名")
|
private String userName;
|
|
@ApiModelProperty(value = "手机号")
|
private String userPhone;
|
|
@ApiModelProperty(value = "分配状态 0-未启用 1-启用")
|
private Integer status;
|
|
@ApiModelProperty(value = "最后登录时间")
|
private Date lastLoginTime;
|
|
@ApiModelProperty(value = "角色ID列表")
|
private String roleIds;
|
|
public AdminVo parse(SysUser sysUser) {
|
AdminVo staffVo = new AdminVo();
|
BeanUtils.copyProperties(sysUser, staffVo);
|
return staffVo;
|
}
|
}
|