package com.ruoyi.app.model;

import com.ruoyi.system.domain.SysPost;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

import javax.validation.constraints.*;
import java.util.List;

/**
 * 人员对象 staff
 * 
 * @author coede
 * @date 2025-03-20
 */
public class Staff extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** ID */
    private Long id;

    /** 姓名 */
    @Excel(name = "姓名")
    private String realname;

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

    private Long[] postIds;

    /** 手机号码 */
    @Excel(name = "手机号码")
    private String phone;

    /** 技术职称 */
    @Excel(name = "技术职称")
    private String technicalTitle;

    /** 证书 */
    @Excel(name = "证书")
    private String technicalCert;

    /** 健康证明 */
    @Excel(name = "健康证明")
    private String healthCert;

    @Excel(name = "健康证明号")
    private String healthCertNo;

    private List<SysPost> posts;

    /** 删除标志 */
    private String delFlag;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setRealname(String realname) 
    {
        this.realname = realname;
    }

    @NotBlank(message = "姓名不能为空")
    @Size(min = 1, max = 10, message = "姓名输入超出最大长度限制（10位）")
    public String getRealname() 
    {
        return realname;
    }

    public void setPostId(Long postId) 
    {
        this.postId = postId;
    }

    public Long getPostId() 
    {
        return postId;
    }

    public void setPostIds(Long[] postIds)
    {
        this.postIds = postIds;
    }

    @NotNull(message = "岗位不能为空")
    public Long[] getPostIds()
    {
        return postIds;
    }

    public void setPhone(String phone) 
    {
        this.phone = phone;
    }

    @NotBlank(message = "联系电话不能为空")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "联系电话格式输入错误")
    public String getPhone() 
    {
        return phone;
    }

    public void setTechnicalTitle(String technicalTitle) 
    {
        this.technicalTitle = technicalTitle;
    }

    @Size(min = 0, max = 10, message = "技术职称输入超出最大长度限制（10位）")
    public String getTechnicalTitle() 
    {
        return technicalTitle;
    }

    public void setTechnicalCert(String technicalCert) 
    {
        this.technicalCert = technicalCert;
    }

    public String getTechnicalCert() 
    {
        return technicalCert;
    }

    public void setHealthCert(String healthCert) 
    {
        this.healthCert = healthCert;
    }

    public String getHealthCert() 
    {
        return healthCert;
    }

    public String getHealthCertNo() {
        return healthCertNo;
    }

    public void setHealthCertNo(String healthCertNo) {
        this.healthCertNo = healthCertNo;
    }

    public void setDelFlag(String delFlag) 
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag() 
    {
        return delFlag;
    }


    public List<SysPost> getPosts()
    {
        return posts;
    }

    public void setPosts(List<SysPost> posts)
    {
        this.posts = posts;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("realname", getRealname())
            .append("postId", getPostId())
            .append("phone", getPhone())
            .append("technicalTitle", getTechnicalTitle())
            .append("technicalCert", getTechnicalCert())
            .append("healthCert", getHealthCert())
            .append("createTime", getCreateTime())
            .append("createBy", getCreateBy())
            .append("updateTime", getUpdateTime())
            .append("updateBy", getUpdateBy())
            .append("delFlag", getDelFlag())
            .append("posts", getPosts())
            .toString();
    }
}
