package com.cool.store.vo.buser;

import com.cool.store.dto.auth.AuthRegionStoreUserDTO;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * 
 * @author   zhangchenbiao
 * @date   2022-01-18 04:40
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class EnterpriseUserPageVO implements Serializable {

    @ApiModelProperty("钉钉用户id")
    private String userId;

    @ApiModelProperty("")
    private String name;

    @ApiModelProperty("是否已经激活, true表示已激活, false表示未激活")
    private Boolean active;

    @ApiModelProperty("是否是主管理员，0：否，1：是")
    private Boolean mainAdmin;

    @ApiModelProperty("是否为企业的管理员, true表示是, false表示不是")
    private Boolean isAdmin;

    @ApiModelProperty("手机号码")
    private String mobile;

    @ApiModelProperty("员工的电子邮箱")
    private String email;

    @ApiModelProperty("在当前isv全局范围内唯一标识一个用户的身份,用户无法修改")
    private String unionid;

    @ApiModelProperty("员工的企业邮箱")
    private String orgEmail;

    @ApiModelProperty("头像url")
    private String avatar;

    @ApiModelProperty("")
    private String roles;

    @ApiModelProperty("工号")
    private String jobnumber;

    @ApiModelProperty("备注")
    private String remark;

    @ApiModelProperty("")
    private String roleName;

    @ApiModelProperty("部门")
    private String departments;

    @ApiModelProperty("用户状态 0待审核 1正常 2冻结")
    private Integer userStatus;

    @ApiModelProperty("门店数量")
    private Integer storeCount;

    private String department;

    @ApiModelProperty("管辖用户范围")
    private String subordinateUserRange;

    @ApiModelProperty("auto自动关联 select手动选择")
    private List<String> sourceList;

    private List<AuthRegionStoreUserDTO>  authRegionStoreList;

    @ApiModelProperty("选取权限 true可选 false不可选")
    private Boolean selectFlag;


    /*public static List<EnterpriseUserPageVO> transUserDOToVO(List<EnterpriseUserDO> enterpriseUserList) {
        List<EnterpriseUserPageVO> resultList = new ArrayList<>();
        for (EnterpriseUserDO enterpriseUserDTO : enterpriseUserList) {
            EnterpriseUserPageVO enterpriseUserDO = new EnterpriseUserPageVO();
            enterpriseUserDO.setUserId(enterpriseUserDTO.getUserId());
            enterpriseUserDO.setName(enterpriseUserDTO.getName());
            enterpriseUserDO.setActive(Boolean.TRUE);
            enterpriseUserDO.setMainAdmin(enterpriseUserDTO.getMainAdmin());
            enterpriseUserDO.setIsAdmin(enterpriseUserDTO.getIsAdmin());
            enterpriseUserDO.setMobile(enterpriseUserDTO.getMobile());
            enterpriseUserDO.setEmail(enterpriseUserDTO.getEmail());
            enterpriseUserDO.setOrgEmail(enterpriseUserDTO.getOrgEmail());
            enterpriseUserDO.setUnionid(enterpriseUserDTO.getUnionid());
            enterpriseUserDO.setAvatar(enterpriseUserDTO.getAvatar());
            enterpriseUserDO.setJobnumber(enterpriseUserDTO.getJobnumber());
            enterpriseUserDO.setRemark(enterpriseUserDTO.getRemark());
            resultList.add(enterpriseUserDO);
        }
        return resultList;
    }*/

}