package com.storlead.trade.vo;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.storlead.trade.entity.CustomerAnalysisResultEntity;
import com.storlead.trade.entity.CustomerBaseEntity;
import com.storlead.framework.mybatis.entity.SysBaseField;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDate;
import java.util.List;

@Data
public class MarketingCampaignVO extends SysBaseField {

    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "主键id")
    private Long id;

    @ApiModelProperty(value = "活动名称")
    private String name;

    @ApiModelProperty(value = "活动类型（1潜客开发、2客户培养、3客户唤醒、4产品推广、5节日营销、6展会跟进）")
    private Integer type;

    @ApiModelProperty(value = "优先级（1紧急、2高优先、3中等、4低优先）")
    private Integer priority;

    @ApiModelProperty(value = "开始日期")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @JSONField(format ="yyyy-MM-dd")
    private LocalDate beginData;

    @ApiModelProperty(value = "结束日期")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @JSONField(format ="yyyy-MM-dd")
    private LocalDate endDate;

    @ApiModelProperty(value = "负责人id")
    private Long supervisor;

    @ApiModelProperty(value = "关联商机")
    private Long linkToOpportunity;

    @ApiModelProperty(value = "活动描述")
    private String description;

    @ApiModelProperty(value = "发送量")
    private Integer sendVolume;

    @ApiModelProperty(value = "打开率")
    private Double openRate;

    @ApiModelProperty(value = "回复率")
    private Double replyRate;

    @ApiModelProperty(value = "商机数")
    private Integer opportunityCount;

    @ApiModelProperty(value = "渠道配置")
    private Integer channelConfiguration;

    @ApiModelProperty(value = "发送邮箱")
    private String emailAddress;

    @ApiModelProperty(value = "发送时间")
    private String emailSentTime;

    @ApiModelProperty(value = "邮件模板")
    private String emailTemplate;

    @ApiModelProperty(value = "每批发送量")
    private Integer emailBatchSize;

    @ApiModelProperty(value = "邮件主题")
    private String emailSubject;

    @ApiModelProperty(value = "是否追踪邮件打开（1是0否）")
    private Integer trackConfigOpen;

    @ApiModelProperty(value = "是否追踪链接点击（1是0否）")
    private Integer trackConfigClick;

    @ApiModelProperty(value = "是否追踪回复（1是0否）")
    private Integer trackConfigReply;

    @ApiModelProperty(value = "SOP序列id")
    private Integer sopId;

    @ApiModelProperty(value = "未打开邮件跟进规则（1是0否）")
    private Integer followUpRulesNotOpened;

    @ApiModelProperty(value = "未打开邮件跟进天数")
    private String followUpRulesNotOpenedDays;

    @ApiModelProperty(value = "未回复邮件跟进规则（1是0否）")
    private Integer followUpRulesNotReplied;

    @ApiModelProperty(value = "未回复邮件跟进天数")
    private String followUpRulesNotRepliedDays;

    @ApiModelProperty(value = "未点击链接跟进规则（1是0否）")
    private Integer followUpRulesLinkNotClicked;

    @ApiModelProperty(value = "未点击链接跟进天数")
    private String followUpRulesLinkNotClickedDays;

    @ApiModelProperty(value = "客户回复后自动停止（1是0否）")
    private Integer followUpRulesReplied;

    @ApiModelProperty(value = "客户预约后停止（1是0否）")
    private Integer followUpRulesAppointmentBooked;

    @ApiModelProperty(value = "A/B测试（1是0否）")
    private Integer aBTesting;

    @ApiModelProperty(value = "智能调度类型")
    private String smartSchedulingType;

    @ApiModelProperty(value = "智能调度开始日期")
    private LocalDate smartSchedulingStartDate;

    @ApiModelProperty(value = "智能调度开始时间")
    private String smartSchedulingStartTime;

    @ApiModelProperty(value = "是否已确认内容合规")
    private Integer hasContentCompliant;

    @ApiModelProperty(value = "是否已确认发送时间合理")
    private Integer hasScheduleApproved;

    @ApiModelProperty(value = "是否符合GDPR")
    private Integer hasGdprCompliant;

    @ApiModelProperty(value = "是否包含退订链接")
    private Integer hasUnsubscribeLink;

    @ApiModelProperty(value = "进度百分比")
    private Double progressPercent;

    @ApiModelProperty(value = "状态 0未开始 1运行中 2暂停 3完成")
    private Integer status;

    @ApiModelProperty(value = "关联客户id")
    private List<Long> customerIdList;

    @ApiModelProperty(value = "关联客户信息")
    private List<CustomerAnalysisResultEntity> customerList;
}
