package com.storlead.sales.pojo.dto.customer;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.storlead.framework.mybatis.query.QueryBaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

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

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "CustomerFollowUpEmailsSearchDTO", description = "跟进邮件联查DTO")
public class CustomerFollowUpEmailsSearchDTO extends QueryBaseEntity {

    @ApiModelProperty(value = "id")
    private Long id;

    @ApiModelProperty(value = "关联客户id")
    private Long customerId;

    @TableField("mail_id")
    private Long mailId;

    @ApiModelProperty(value = "类型（跟进90，邮件110）")
    private String type;

    @ApiModelProperty(value = "联系人")
    private String liaisonIds;

    @ApiModelProperty(value = "跟进人idList")
    private List<Long> createdByList;

    @ApiModelProperty(value = "联系人idList")
    private List<Long> liaisonIdList;

    @ApiModelProperty(value = "主题")
    private String subject;

    @ApiModelProperty(value = "跟进详情")
    private String content;

    @ApiModelProperty(value = "跟进id")
    private Long followUpId;

    @ApiModelProperty(value = "跟进时间")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JSONField(format ="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime followUpTime;

    @ApiModelProperty(value = "跟进查询开始时间")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JSONField(format ="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime followUpBeginTime;

    @ApiModelProperty(value = "跟进查询结束时间")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JSONField(format ="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime followUpEndTime;

    @ApiModelProperty(value = "跟进目的")
    private String objectiveValue;

    @ApiModelProperty(value = "收件为进，发件为出，不可调整（出入类型）")
    private Integer inOutMark;

    @ApiModelProperty(value = "跟进方式（邮箱默认E-mail，不可调整）")
    private String followUpTypeValue;

    @ApiModelProperty(value = "关联类型")
    private String resourceType;

    @ApiModelProperty(value = "关联业务id")
    private Long resourceTypeId;

    @ApiModelProperty(value = "状态（0未跟进，1已跟进。根据邮件是否关联跟进判定）")
    private Integer followStatus;

    @ApiModelProperty(value = "是否被阅读（0未读，1已读）")
    private Long recipientRead;
}
