package jnpf.model.personnels.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import jnpf.base.entity.SuperBaseEntity;
import jnpf.model.personnels.dto.config.FtbPersonnelsAuditConfigInfoDTO;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.io.Serializable;

/**
 * 人事流程审核配置表 
 * @author admin
 * @create 2024-02-01 
 */

@Getter
@Setter
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@TableName(value = "ftb_personnels_audit_sub_config")
public class FtbPersonnelsAuditSubConfig extends SuperBaseEntity.SuperCUDBaseEntity<String> implements Serializable {

    private static final long serialVersionUID = 6245010610322863171L;

    /**
     * 主配置表Id
     */
    @TableField(value = "F_MasterId")
    private String masterId;

    /**
     * 审核人Id
     */
    @TableField(value = "F_AuditorId")
    private String auditorId;

    /**
     * 审核人名称
     */
    @TableField(value = "F_AuditorName")
    private String auditorName;

    /**
     * 组织id
     */
    @TableField(value = "F_OrgId")
    private String orgId;

    /**
     * 组织id
     */
    @TableField(value = "F_OrgName")
    private String orgName;


    /**
     * 岗位id
     */
    @TableField(value = "F_PostId")
    private String postId;

    /**
     * 岗位名称
     */
    @TableField(value = "F_PostName")
    private String postName;

    /**
     * 职等id
     */
    @TableField(value = "F_GradeId")
    private String gradeId;

    /** 职等名称 */
    @TableField(value = "F_GradeName")
    private String gradeName;

    /**
     * 薪资填写(0否,1是)
     */
    @TableField(value = "F_PayrollEntry")
    private String payrollEntry;

    /** 薪资审核(0否,1是) */
    @TableField(value = "F_PayrollAudit")
    private String payrollAudit;

    /** 黑名单填写(0否,1是) */
    @TableField(value = "F_BlacklistFilling")
    private String blacklistFilling;

    /** 审核流程等级 */
    @TableField(value = "F_AuditProcessLevel")
    private Integer auditProcessLevel;

    /**
     * 审核前一个Id
     */
    @TableField(value = "F_PreReview")
    private String preReview;

    /**
     * 审核下一个Id
     */
    @TableField(value = "F_NextReview")
    private String nextReview;

    /**
     * 是否有效(1无效,0有效)
     */
    @TableField(value = "F_EnableMark")
    private Integer enableMark;

    public static FtbPersonnelsAuditConfigInfoDTO coverFtbPersonnelsAuditConfigInfoDTO(FtbPersonnelsAuditSubConfig dto) {
        if (dto == null) {
            return null;
        }
        FtbPersonnelsAuditConfigInfoDTO ftbPersonnelsAuditConfigInfoDTO = new FtbPersonnelsAuditConfigInfoDTO();
        ftbPersonnelsAuditConfigInfoDTO.setMasterId(dto.getMasterId());
        ftbPersonnelsAuditConfigInfoDTO.setAuditorId(dto.getAuditorId());
        ftbPersonnelsAuditConfigInfoDTO.setAuditorName(dto.getAuditorName());
        ftbPersonnelsAuditConfigInfoDTO.setOrgId(dto.getOrgId());
        ftbPersonnelsAuditConfigInfoDTO.setOrgName(dto.getOrgName());
        ftbPersonnelsAuditConfigInfoDTO.setPostId(dto.getPostId());
        ftbPersonnelsAuditConfigInfoDTO.setPostName(dto.getPostName());
        ftbPersonnelsAuditConfigInfoDTO.setGradeId(dto.getGradeId());
        ftbPersonnelsAuditConfigInfoDTO.setGradeName(dto.getGradeName());
        ftbPersonnelsAuditConfigInfoDTO.setPayrollEntry(dto.getPayrollEntry());
        ftbPersonnelsAuditConfigInfoDTO.setPayrollAudit(dto.getPayrollAudit());
        ftbPersonnelsAuditConfigInfoDTO.setAuditProcessLevel(dto.getAuditProcessLevel());
        ftbPersonnelsAuditConfigInfoDTO.setPreReview(dto.getPreReview());
        ftbPersonnelsAuditConfigInfoDTO.setNextReview(dto.getNextReview());
        ftbPersonnelsAuditConfigInfoDTO.setId(dto.getId());
        ftbPersonnelsAuditConfigInfoDTO.setBlacklistFilling(dto.getBlacklistFilling());
        return ftbPersonnelsAuditConfigInfoDTO;
    }
}
