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

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.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

@Data
@TableName("ctop_kuaishou_app_ad")
public class AppAd {
    @JsonSerialize(using= ToStringSerializer.class)
    private Long creativeId;
    @JsonSerialize(using=ToStringSerializer.class)
    private Long userId;
    @JsonSerialize(using=ToStringSerializer.class)
    private Long photoId;
    @TableId
    @JsonSerialize(using=ToStringSerializer.class)
    private Long coverId;
    private String userName;
    private Integer width;
    private Integer height;
    private String shareInfo;
    private Integer likeCount;
    private Integer viewCount;
    private Integer commentCount;
    private Integer unlikeCount;
    private Integer forwardCount;
    private String caption;
    private Integer photoStatus;
    private String recoReason;
    private String coverUrl;
    private String mvUrl;
    private Integer type;
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    private Date time;
    private Integer sourceType;
    private Integer displayType;
    private String title;
    private Integer adType;
    @TableField(exist = false)
    private AppCover adCover;
    private String packageName;
    private String appName;
    private Boolean commentOn;
    private BigDecimal score;
    private Integer templateType;
    @JsonSerialize(using=ToStringSerializer.class)
    private Long pageId;
    @JsonSerialize(using=ToStringSerializer.class)
    private Long subPageId;
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date createTime;
}
