package com.aip.gateway.api.entity;

import com.aip.gateway.api.aip.model.AipLabel;
import lombok.Builder;
import lombok.Data;
import lombok.ToString;
import org.apache.commons.lang3.StringUtils;

@Data
@Builder
@ToString
public class TbAipPolicy {

    private int policyId;
    private String policyGuid;
    private String policyName;
    private String policyDesc;
    private boolean useYn;

    public boolean isChanged(AipLabel obj) {
        if (!StringUtils.equals(this.policyName, obj.getName()) || !StringUtils.equals(this.policyDesc, obj.getDescription())) {
            return true;
        }
        return false;
    }

}
