package com.aip.gateway.api.entity;

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

@Data
@Builder
@ToString
public class TbAipTemplate {

    private int templateId;
    private String templateGuid;
    private String templateName;
    private String templateDesc;
    private boolean useYn;

    public boolean isChanged(AipTemplate obj) {
        if (!StringUtils.equals(this.templateName, obj.getName()) || !StringUtils.equals(this.templateDesc, obj.getDescription())) {
            return true;
        }
        return false;
    }

}
