package jnpf.model.cultivate.vo.rule;

import com.baomidou.mybatisplus.annotation.TableField;
import jnpf.model.cultivate.po.FtbCultivateRule;
import lombok.Data;

/**
 * @Author: peng.hao
 * @create: 2024/9/9:15:25
 */
@Data
public class FtbCultivateRuleVO {

    private String id;
    /** 附件格式 0 附件下载 */
    private String name;
    /** 附件格式 0 附件下载 */
    private Integer attachments;

    /** 附件规则标识开关(0,关,1开) */
    private Integer attachmentsRule;

    public static FtbCultivateRuleVO covert(FtbCultivateRule rule) {
        if (rule == null) {
            return null;
        }
        FtbCultivateRuleVO ftbCultivateRuleVO = new FtbCultivateRuleVO();
        ftbCultivateRuleVO.setAttachments(rule.getAttachments());
        ftbCultivateRuleVO.setName(rule.getName());
        ftbCultivateRuleVO.setAttachmentsRule(rule.getAttachmentsRule());
        ftbCultivateRuleVO.setId(rule.getId());
        return ftbCultivateRuleVO;
    }
}
