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

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.storlead.framework.annotate.Dict;
import com.storlead.framework.mybatis.entity.SysBaseField;
import com.storlead.sales.pojo.entity.customer.RecordCommentEntity;
import com.storlead.sales.pojo.entity.customer.SysResourceEntity;
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.LocalDateTime;
import java.util.List;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "CustomerFollowUpDetailVO", description = "客户跟进记录详情VO")
public class CustomerFollowUpDetailVO extends SysBaseField {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "客户跟进记录id")
    private Long id;

    @ApiModelProperty(value = "客户跟进种类value（对应字典客户跟进种类value）")
    @Dict(dictCode = "follow_up_type",valueField = "followUpTypeName")
    private String followUpTypeValue;

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

    @ApiModelProperty(value = "客户跟进种类名称（对应字典客户跟进种类名称）")
    private String followUpTypeName;

    @ApiModelProperty(value = "跟进人员id")
    private Long followUpMemberId;

    @ApiModelProperty(value = "跟进人员名字")
    private String followUpMemberName;

    @ApiModelProperty(value = "跟进人员头像")
    private String followUpMemberAvatar;

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

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

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

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

    @ApiModelProperty(value = "关联任务id")
    private Long taskId;

    @ApiModelProperty(value = "任务内容")
    private String taskContent;

    @ApiModelProperty(value = "关联客户名称")
    private String customerName;

    @ApiModelProperty(value = "客户状态名称")
    private String customerStatusName;

    @ApiModelProperty(value = "客户状态value（对应字典客户状态value）")
    @Dict(dictCode = "customer_status",valueField = "customerStatusName")
    private String customerStatusDictValue;

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

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

    @ApiModelProperty(value = "关联联系人姓名")
    private String liaisonName;

//    @ApiModelProperty(value = "提醒用户id，逗号隔开")
    private String remindUserIds;

//    @ApiModelProperty(value = "提醒用户名称，逗号隔开")
    private String remindUserNames;

//    @ApiModelProperty(value = "提醒用户idList")
    private List<Long> remindUserIdList;

    @ApiModelProperty(value = "业务类型")
    @Dict(dictCode = "work_data_group",valueField = "resourceTypeName")
    private String resourceType;

    @ApiModelProperty(value = "业务类型名称")
    private String resourceTypeName;

    @ApiModelProperty(value = "业务类型关联ID")
    private Long resourceTypeId;

    @ApiModelProperty(value = "业务名称")
    private String resourceName;

    @ApiModelProperty(value = "业务阶段")
    private String resourceStage;

    @ApiModelProperty(value = "业务阶段对应的字典value")
    private String dictCode;


    @ApiModelProperty(value = "业务阶段")
//    @Dict(dictCode = "resource_stage",valueField = "resourceStageName")
    private String resourceStageDictValue;

    @ApiModelProperty(value = "业务阶段名称")
    private String resourceStageName;

    @ApiModelProperty(value = "归属人员姓名")
    private String ownerByName;

    @ApiModelProperty(value = "创建人姓名")
    private String createByName;

    @ApiModelProperty(value = "相关附件")
    private List<SysResourceEntity> resourceList;

    @ApiModelProperty(value = "评论数量")
    private Integer commentCount;

    @ApiModelProperty(value = "下一个id")
    private Long nextId;

    @ApiModelProperty(value = "上一个id")
    private Long previousId;

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

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

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

    @ApiModelProperty(value = "跟进方向")
    private String inOutMarkName;
}
