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="AdTV对象", description="电视剧管理表")
public class AdTvForm implements Serializable {

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

    @ApiModelProperty(value = "电视剧名称")
    private String name;

    @ApiModelProperty(value = "海报LOGO")
    private String imgUrl;

    @ApiModelProperty(value = "体裁")
    private String firstTheme;

    @ApiModelProperty(value = "细分体裁")
    private String secondTheme;

	/**
	 * 判断体裁前后是否一致
	 */
	public boolean isCanSyscUpTheme(String oldFirstTheme,String oldSecondTheme) {
		// 体裁
		if (StringUtils.isNotBlank(oldFirstTheme) && StringUtils.isNotBlank(firstTheme)
				&& !oldFirstTheme.equals(firstTheme)){
			return true;
	    // 细分体裁
		}else if(StringUtils.isNotBlank(oldSecondTheme) && StringUtils.isNotBlank(secondTheme)
				&& !oldSecondTheme.equals(secondTheme)){
		    return true;
		} 
		return false;
	}
}
