package com.dsk.system.domain.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.dsk.common.annotation.ExcelDictFormat;
import com.dsk.common.convert.ExcelDictConvert;
import com.dsk.system.domain.SysDept;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 部门表 sys_dept
 *
 * @author Lion Li
 */

@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = SysDept.class)
public class SysDeptVo implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 部门ID
     */
    @ExcelProperty(value = "部门id")
    private Long deptId;

    /**
     * 父部门ID
     */
    @ExcelProperty(value = "父部门id")
    private Long parentId;

    /**
     * 部门名称
     */
    @ExcelProperty(value = "部门名称")
    private String deptName;

    /**
     * 显示顺序
     */
    @ExcelProperty(value = "显示顺序")
    private Integer orderNum;

    /**
     * 负责人
     */
    @ExcelProperty(value = "负责人")
    private String leader;

    /**
     * 联系电话
     */
    @ExcelProperty(value = "联系电话")
    private String phone;

    /**
     * 邮箱
     */
    @ExcelProperty(value = "邮箱")
    private String email;

    /**
     * 部门状态:0正常,1停用
     */
    @ExcelProperty(value = "部门状态", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "0=正常,1=停用")
    private String status;

    /**
     * 删除标志（0代表存在 2代表删除）
     */
    @ExcelProperty(value = "删除标志", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "0=存在,2=删除")
    private String delFlag;

    /**
     * 祖级列表
     */
    @ExcelProperty(value = "祖级列表")
    private String ancestors;

    private String  parentName;

    /**
     * 该部门是否存在用户(true代表存在 false代表不存在)
     */
    @ExcelProperty(value = "该部门是否存在用户", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "true=存在,false=删除")
    private Boolean existUsers;

    /**
     * 创建时间
     */
    @ExcelProperty(value = "创建时间")
    private Date createTime;
}
