package com.yuchen.saas.manage.user.api.vo.sasscompany;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.yuchen.saas.manage.user.api.entity.SaasUserCompany;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.nest.springwrap.core.tool.utils.BeanUtil;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
@ApiModel(value = "企业用户添加员工", description = "企业用户添加员工")
public class SaasCompanyAddUserVo {

    @ApiModelProperty(value = "企业id")
    private Long saasCompanyId;

    @ApiModelProperty(value = "所在部门")
    private String deptName;

    @ApiModelProperty(value = "岗位名称")
    private String stationName;

    @ApiModelProperty(value = "入职时间yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date entryTime;

    @ApiModelProperty(value = "姓名")
    private String name;

    @ApiModelProperty(value = "性别1男，2女")
    private Integer sex;

    @ApiModelProperty(value = "电话")
    private String contactPhone;

    @ApiModelProperty(value = "证件号码")
    private String idcard;

    public SaasUserCompany to(){
        SaasUserCompany saasUserCompany=new SaasUserCompany();
        BeanUtil.copyProperties(this,saasUserCompany);
        return saasUserCompany;
    }

}
