package com.business.domain;

import java.util.Date;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.sooka.common.annotation.Excel;
import com.sooka.common.core.domain.BaseEntity;

import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

/**
 * 网格人员管理对象 bus_grid_person_info
 * 
 * @author lei_wang
 * @date 2020-07-29
 */
public class BusGridPersonInfo extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 网格人员 */
    private Long gridPersonId;

    /** 部门id（网格id） */
    @Excel(name = "部门id", readConverterExp = "网=格id")
    private Long deptId;

    /** 网格人员姓名 */
    @Excel(name = "网格人员姓名")
    @Size(max = 5, message = "姓名长度不能超过5个汉字")
    private String personName;

    /** 性别 */
    @Excel(name = "性别")
    private Integer personSex;

    /** 手机号 */
    @Excel(name = "手机号")
    @Pattern(regexp = "^((13[0-9])|(15[^4,\\D])|(18[0,5-9]))\\d{8}$", message = "手机号填写错误")
    private String personPhone;

    /** 身份证号 */
    @Excel(name = "身份证号")
    @Pattern(regexp = "(^[1-9]\\d{5}(19|([23]\\d))\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx]$)|(^[1-9]\\d{5}\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{2}[0-9Xx]$)", message = "身份证号填写错误")
    private String personIdcard;

    /** 岗位id */
    @Excel(name = "岗位id")
    private Long postId;

    /** 入职时间 */
    @Excel(name = "入职时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date wordTime;

    /** 部门名称 */
    private String deptName;

    /** 岗位名称 */
    private String postName;

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    public void setPostName(String postName) {
        this.postName = postName;
    }

    public String getDeptName() {
        return deptName;
    }

    public String getPostName() {
        return postName;
    }

    public void setGridPersonId(Long gridPersonId)
    {
        this.gridPersonId = gridPersonId;
    }

    public Long getGridPersonId() 
    {
        return gridPersonId;
    }
    public void setDeptId(Long deptId) 
    {
        this.deptId = deptId;
    }

    public Long getDeptId() 
    {
        return deptId;
    }
    public void setPersonName(String personName) 
    {
        this.personName = personName;
    }

    public String getPersonName() 
    {
        return personName;
    }
    public void setPersonSex(Integer personSex) 
    {
        this.personSex = personSex;
    }

    public Integer getPersonSex() 
    {
        return personSex;
    }
    public void setPersonPhone(String personPhone) 
    {
        this.personPhone = personPhone;
    }

    public String getPersonPhone() 
    {
        return personPhone;
    }
    public void setPersonIdcard(String personIdcard) 
    {
        this.personIdcard = personIdcard;
    }

    public String getPersonIdcard() 
    {
        return personIdcard;
    }
    public void setPostId(Long postId) 
    {
        this.postId = postId;
    }

    public Long getPostId() 
    {
        return postId;
    }
    public void setWordTime(Date wordTime) 
    {
        this.wordTime = wordTime;
    }

    public Date getWordTime() 
    {
        return wordTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("gridPersonId", getGridPersonId())
            .append("deptId", getDeptId())
            .append("personName", getPersonName())
            .append("personSex", getPersonSex())
            .append("personPhone", getPersonPhone())
            .append("personIdcard", getPersonIdcard())
            .append("postId", getPostId())
            .append("wordTime", getWordTime())
            .toString();
    }
}
