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 TbAipLabel {

    private int labelId;
    private String labelGuid;
    private String labelName;
    private String labelDesc;
    private boolean useYn;

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

}
