package com.yem.wm.bc.change.common.pojo;


import com.yem.wm.bc.common.CommonUtils;

/**
 * @author 夜子
 * @ClassName ChangeResumeLogFieldInfo
 * @description: TODO
 * @date 2023年08月10日
 * @version: 1.0
 */
public class ChangeResumeLogFieldInfo {
    public static final String key_oldValue = "o";
    public static final String key_newValue = "n";
    public static final String key_fieldname = "c";
    public static final String key_isequals = "e";
    public String oldValue;
    public String newValue;
    public String fieldname;
    public String isequals;

    public ChangeResumeLogFieldInfo() {
    }

    public void setOldValue(String oldValue) {
        this.oldValue = oldValue;
    }

    public void setNewValue(String newValue) {
        this.newValue = newValue;
    }

    public void setFieldname(String fieldname) {
        this.fieldname = fieldname;
    }

    public String getOldValue() {
        return this.oldValue;
    }

    public String getNewValue() {
        return this.newValue;
    }

    public String getFieldname() {
        return this.fieldname;
    }

    public String getIsequals() {
        return this.isequals;
    }

    public void setIsequals(String isequals) {
        this.isequals = isequals;
    }

    public String fieldFormatJson() {
        String fieldStr = "";
        if (CommonUtils.isNull(this.oldValue)) {
            fieldStr = "{\"o\":\"\",";
        } else {
            fieldStr = "{\"o\":\"" + this.oldValue + "\",";
        }

        if (CommonUtils.isNull(this.newValue)) {
            fieldStr = fieldStr + "\"" + "n" + "\":\"\",";
        } else {
            fieldStr = fieldStr + "\"" + "n" + "\":\"" + this.newValue + "\",";
        }

        if (CommonUtils.isNull(this.fieldname)) {
            fieldStr = fieldStr + "\"" + "c" + "\":\"\",";
        } else {
            fieldStr = fieldStr + "\"" + "c" + "\":\"" + this.fieldname + "\",";
        }

        if (CommonUtils.isNull(this.isequals)) {
            fieldStr = fieldStr + "\"" + "e" + "\":\"\"}";
        } else {
            fieldStr = fieldStr + "\"" + "e" + "\":\"" + this.isequals + "\"}";
        }

        return fieldStr;
    }
}
