package cn.com.ctop.kuaishou.modules.ai.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.google.common.base.Objects;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 自动投放账户——素材
 *
 * @author jeecg-boot
 * @version V1.0
 * @date 2021-10-20
 */
@Data
@AllArgsConstructor
@TableName("ctop_ai_kuaishou_account_auto_video")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "ctop_ai_kuaishou_account_auto_video对象", description = "自动投放账户——素材")
public class AiKuaishouAccountAutoVideo {

    /**
     * id
     */
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "id")
    private Long id;
    /**
     * 账户ID
     */
    @Excel(name = "账户ID", width = 15)
    @ApiModelProperty(value = "账户ID")
    private Long accountId;
    /**
     * 自定义 0 无效，1 有效
     */
    @Excel(name = "0 无效，1 有效", width = 15)
    @ApiModelProperty(value = "0 无效，1 有效")
    private Integer customStatus;
    /**
     * 程序化  0 无效，1 有效
     */
    @Excel(name = "0 无效，1 有效", width = 15)
    @ApiModelProperty(value = "0 无效，1 有效")
    private Integer programStatus;
    /**
     * 视频id
     */
    @Excel(name = "视频id", width = 15)
    @ApiModelProperty(value = "视频id")
    private String photoId;
    /**
     * 1 竖版视频 2 横版视频
     */
    @Excel(name = "1 竖版视频 2 横版视频", width = 15)
    @ApiModelProperty(value = "1 竖版视频 2 横版视频")
    private Integer materialType;
    /**
     * 0：自产 1：素造
     */
    @Excel(name = "0：自产 1：素造", width = 15)
    @ApiModelProperty(value = "0：自产 1：素造")
    private Integer channelType;
    /**
     * 使用时间
     */
    @Excel(name = "素材创建时间", width = 15)
    @ApiModelProperty(value = "素材创建时间")
    private String statDate;
    /**
     * MD5值
     */
    @Excel(name = "MD5值", width = 15)
    @ApiModelProperty(value = "MD5值")
    private String signature;
    /**
     * 素材名称
     */
    @Excel(name = "素材名称", width = 15)
    @ApiModelProperty(value = "素材名称")
    private String photoName;
    /**
     * 创建时间
     */
    @Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
    /**
     * 修改时间
     */
    @Excel(name = "修改时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "修改时间")
    private Date updateTime;

    //本地定向ID
    @TableField(exist = false)
    private Long autoTargetId;

    //应用App
    @TableField(exist = false)
    private Long appId;

    //应用标记
    @TableField(exist = false)
    private String appVersion;

    //计划Id
    @TableField(exist = false)
    private Long campaignId;

    public AiKuaishouAccountAutoVideo() {

    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        AiKuaishouAccountAutoVideo video = (AiKuaishouAccountAutoVideo) o;
        return Objects.equal(id, video.id) && Objects.equal(accountId, video.accountId) && Objects.equal(programStatus, video.programStatus) && Objects.equal(customStatus, video.customStatus) && Objects.equal(photoId, video.photoId) && Objects.equal(materialType, video.materialType) && Objects.equal(channelType, video.channelType) && Objects.equal(statDate, video.statDate) && Objects.equal(signature, video.signature) && Objects.equal(photoName, video.photoName) && Objects.equal(createTime, video.createTime) && Objects.equal(updateTime, video.updateTime)
                && Objects.equal(appId, video.appId) && Objects.equal(appVersion, video.appVersion) && Objects.equal(campaignId, video.campaignId) && Objects.equal(autoTargetId, video.autoTargetId);
    }

}
