package com.gci.boot.modules.driver.vo;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.gci.boot.common.dict.annotation.Dict;
import com.gci.boot.common.dict.excel.DictConverter;
import com.gci.boot.modules.driver.entity.TbDriver;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
public class DriverUserVo extends TbDriver {

    @ExcelProperty("用户名")
    private String username;

    @ExcelIgnore
    private String password;

    @ExcelProperty("工号")
    private String workNo;

    @Dict(dictTable = "sys_role", dicCode = "id", dicText = "role_name")
    @ExcelProperty(value = "角色", converter = DictConverter.class)
    private String roleIds;

    @Dict(dictTable = "sys_depart", dicCode = "org_code", dicText = "depart_name")
    @ExcelProperty(value = "部门", converter = DictConverter.class)
    private String orgCode;

    @ExcelProperty("座机")
    private String telephone;

    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ExcelProperty("生日")
    private Date birthday;
}
