package com.brilliance.isc.common.vo;

import lombok.Data;

import java.util.HashSet;
import java.util.Set;

@Data
public abstract class AbstractCommonVo {
    /**
     * 着色标记，注意着色和修改标识，着色在收单行上收时，会被清掉，而修改标记不会
     */
    private Set<String> markSet = new HashSet<>();

    private Set<String> markSetX = new HashSet<>();

    private Set<String> modifySet = new HashSet<>();

    public boolean isModified(String key) {
        return modifySet.contains(key);
    }

    public void resetModified() {
        modifySet.clear();
    }

    public void resetModified(String fieldName) {
        modifySet.remove(fieldName);
    }

    public void setModified(String fieldName) {
        modifySet.add(fieldName);
    }

    public void reset() {

    }

}
