package com.ylcm.sys.form;

import java.io.Serializable;

import org.apache.commons.lang.StringUtils;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 媒体管理表
 * </p>
 *
 * @author admin
 * @since 2020-07-01
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="AdMedia对象", description="媒体管理表")
public class AdProductForm implements Serializable {

    private static final long serialVersionUID = 1L;
    
    private Integer id;

    @ApiModelProperty(value = "产品名")
    private String productName;

    @ApiModelProperty(value = "产品LOGO")
    private String nameImgUrl;

    @ApiModelProperty(value = "品牌")
    private String brandName;

    @ApiModelProperty(value = "品牌LOGO")
    private String brandImgUrl;

    @ApiModelProperty(value = "一级行业")
    private String firstInd;

    @ApiModelProperty(value = "二级行业")
    private String secondInd;

	/**
	 * 判断品牌前后是否一致
	 */
    public boolean isCanSyscUpBrandName(String oldBrandName) {
    	if(StringUtils.isBlank(oldBrandName) && StringUtils.isBlank(brandName)) {
    		return false;
    	}else if(StringUtils.isBlank(oldBrandName) && StringUtils.isNotBlank(brandName)) {
    		return true;
    	}else if(StringUtils.isNotBlank(oldBrandName) && StringUtils.isBlank(brandName)) {
    		return true;
    	}else if(!oldBrandName.equals(brandName)) {
    		return true;
    	}
		return false;
    }
}
