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

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.storlead.framework.annotate.AnnotateEnumType;
import com.storlead.framework.annotate.Dict;
import com.storlead.framework.annotate.OrgAutoMateAnnotate;
import com.storlead.framework.mybatis.entity.SysBaseField;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
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;

/**
 * <p>
 * VIEW
 * </p>
 *
 * @author YPZ
 * @since 2024-10-28
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("customer_follow_up_emails")
@ApiModel(value="CustomerFollowUpEmailsEntity对象", description="VIEW")
public class CustomerFollowUpEmailsEntity extends SysBaseField{

    private static final long serialVersionUID = 1L;

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

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

    @TableField("customer_id")
    @ApiModelProperty(value = "关联客户id,逗号隔开")
    private String customerId;

    @TableField("mail_id")
    @ApiModelProperty(value = "关联邮件主表id")
    private Long mailId;

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

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

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

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

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

    @TableField("follow_up_time")
    @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;

    @TableField("sent_date")
    @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 sentDate;

    @ApiModelProperty(value = "跟进目的value(对应字典跟进目的value)")
    @TableField("objective_value")
    @Dict(dictCode = "objective_value")
    private String objectiveValue;

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

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

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

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

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

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


}
