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

import cn.hutool.core.date.DateTime;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.storlead.framework.annotate.Dict;
import com.storlead.sales.pojo.entity.customer.SysResourceEntity;
import com.storlead.sales.enums.ResourceTypeEnum;
import com.storlead.sales.pojo.entity.task.TaskEntity;
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.List;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "CustomerFollowUpAddDTO", description = "客户跟进记录添加DTO")
public class CustomerFollowUpAddDTO {
    private static final long serialVersionUID = 1L;

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

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

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

    @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 content;

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

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

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

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

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

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

//    @ApiModelProperty(value = "提醒用户id，逗号隔开")
    private List<Long> remindUserIdsTemp;

    @ApiModelProperty(value = "业务类型10:客户、11线索、20:联系人、30:商机、40:订单")
    private String resourceType;

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

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

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

    @ApiModelProperty(value = "业务阶段/状态等对应字典value")
    private String resourceStageDictValue;

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

    @ApiModelProperty(value = "归属人员")
    private Long ownerBy;

    @ApiModelProperty(value = "关联任务")
    private TaskEntity task;

    @ApiModelProperty(value = "关联完成任务Id，只要任务完成添加跟进时使用")
    private Long taskId;

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

    @ApiModelProperty(value = "附件idList")
    private List<Long> resourceIdList;

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

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

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