package jnpf.model.personnels.vo.rewardspunishments;

import com.fasterxml.jackson.annotation.JsonIgnore;
import jnpf.model.personnels.po.FtbPersonnelsRewardsPunishments;
import lombok.Data;

import java.math.BigDecimal;

@Data
public class FtbPersonnelsRewardsPunishmentApprovalVO {
    /**
     * 主键id
     */
    private String id;
    /**
     * 规则名称
     */
    private String regularName;

    /**
     * 金额
     */
    private BigDecimal money;

    /**
     * 是否记入员工档案,0否1是
     */
    @JsonIgnore
    private Integer isRecorded;

    public static FtbPersonnelsRewardsPunishmentApprovalVO convert(FtbPersonnelsRewardsPunishments ftbPersonnelsRewardsPunishments) {
        if (ftbPersonnelsRewardsPunishments == null) {
            return null;
        }
        FtbPersonnelsRewardsPunishmentApprovalVO ftbPersonnelsRewardsPunishmentApprovalVO = new FtbPersonnelsRewardsPunishmentApprovalVO();
        ftbPersonnelsRewardsPunishmentApprovalVO.setRegularName(ftbPersonnelsRewardsPunishments.getRegularName());
        ftbPersonnelsRewardsPunishmentApprovalVO.setMoney(ftbPersonnelsRewardsPunishments.getMoney());
        ftbPersonnelsRewardsPunishmentApprovalVO.setId(ftbPersonnelsRewardsPunishments.getId());
        ftbPersonnelsRewardsPunishmentApprovalVO.setIsRecorded(ftbPersonnelsRewardsPunishments.getIsRecorded());
        return ftbPersonnelsRewardsPunishmentApprovalVO;
    }

}
