package com.njcn.supervision.pojo.po.user;

import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.njcn.db.bo.BaseEntity;

import com.njcn.supervision.pojo.param.user.UserReportParam;
import lombok.Data;

/**
 * <p>
 * 用户档案信息表	
 * </p>
 *
 * @author wr
 * @since 2024-06-26
 */
@Data
@TableName("supervision_user_report_renewal")
public class UserReportRenewalPO extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    private String id;

    /**
     * 常态化用户跟新后信息
     */
    private String userReportMessage;

    /**
     * 常态化用户跟新后信息
     */
    @TableField(exist = false)
    private UserReportParam userReportMessageJson;

    /**
     * 流程实例的编号
     */
    private String processInstanceId;

    /**
     * 历史流程实列
     */
    private String historyInstanceId;

    /**
     * 1:审批中；2：审批通过；3：审批不通过；4：已取消
     */
    private Integer status;
    /**
     * 状态：0-删除 1-正常
     */
    private Integer state;

    public void setUserReportMessage(String userReportMessage) {
        if(StrUtil.isNotBlank(userReportMessage)){
            this.userReportMessageJson= JSONObject.parseObject(userReportMessage,UserReportParam.class);
        }
        this.userReportMessage = userReportMessage;
    }
}
