package com.fs.baidu.vo;

import lombok.Data;

import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

// 详情 @see https://dev2.baidu.com/content?sceneType=0&pageId=101424&nodeId=180&subhead=
@Data
public class CreativeResultVo {
    // 创意ID
    private Long creativeFeedId;
    // 推广单元ID
    private Long adgroupFeedId;
    // 创意样式ID
    private Integer materialstyle;
    // 创意名称
    private String creativeFeedName;
    // 	暂停/启用推广单元
    private Integer pause;
    // 推广单元状态
    private Integer status;
    // 物料内容
    private String material;
    // 审核未通过的原因（审核拒绝理由）
    private String refusereason;
    // 评论数
    private Integer commentnum;
    // 阅读量
    private Integer readnum;
    //视频创意的视频播放量
    private Integer playnum;
    //创意类型
    private Integer ideaType;
    //程序化创意展示样式
    private Integer showMt;
    //创意的创建时间
    private String addtime;
    //程序化创意工具标识
    private Long[] progFlag;
    private PaIdeaTemplate template;

    public Long getVideoId(){
        return template == null ? null : template.getVideoId();
    }
    public String getVideoUrl(){
        return template == null ? "" : template.getVideoUrl();
    }

    @Data
    public static class PaIdeaTemplate{
        //标题
        private String title;
        //副标题
        private String subtitle;
        //推广链接
        private String targetUrl;
        //监控链接
        private String monitorUrl;
        //用户头像
        private String userPortrait;
        //调起链接
        private String naUrl;
        //品牌名
        private String brand;
        private List<PaPicture> pictures;
        private String poster;
        private Long videoId;
        private String videoUrl;
        private String miniProgramSchema;
        private String exposureUrl;
        private String ulkScheme;
        private String ulkUrl;
        private List<String> styleList;
    }

    @Data
    static class PaPicture{
        private String url;
        private String targetUrl;
        private String naUrl;
        private String desc1;
        private String desc2;
    }
}
