package cn.com.ctop.kuaishou.modules.app.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.fasterxml.jackson.annotation.JsonProperty;
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.util.Date;
import java.util.List;

@Data
@TableName("ctop_kuaishou_app_video")
public class AppVideo {
    @TableId(value = "photo_id", type = IdType.INPUT)
    @JsonProperty("photo_id")
    @JsonSerialize(using= ToStringSerializer.class)
    private Long photoId;
    @JsonSerialize(using=ToStringSerializer.class)
    @JsonProperty("user_id")
    private Long userId;
    @JsonProperty("user_name")
    private String userName;
    @JsonProperty("share_info")
    private String shareInfo;
    @JsonProperty("like_count")
    private Integer likeCount;
    @JsonProperty("view_count")
    private Integer viewCount;
    @JsonProperty("comment_count")
    private Integer commentCount;
    @JsonProperty("unlike_count")
    private Integer unlikeCount;
    @JsonProperty("forward_count")
    private Integer forwardCount;
    @JsonProperty("hated")
    private Integer hated;
    @JsonProperty("caption")
    private String caption;
    @JsonProperty("photo_status")
    private Integer photoStatus;
    @JsonProperty("reco_reason")
    private String recoReason;
    private String coverUrl;
    private String mvUrl;
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    private Date time;
    @TableField(exist = false)
    @JsonProperty("cover_thumbnail_urls")
    private List<AppCoverUrl> coverThumbnailUrls;
    @TableField(exist = false)
    @JsonProperty("main_mv_urls")
    private List<AppMv> mainMvUrls;
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date createTime;
}
