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

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.storlead.framework.mybatis.query.QueryBaseEntity;
import com.storlead.framework.annotate.Dict;
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.Date;
import java.util.List;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "LiaisonSearchDTO", description = "客户联系人查询DTO")
public class LiaisonSearchDTO extends QueryBaseEntity {

    @ApiModelProperty(value = "联系人id")
    @TableId("id")
    private Long id;

    @ApiModelProperty(value = "不查的联系人id")
    private Long nonId;

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

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

    @ApiModelProperty(value = "是否是查询相关联系人（0否，1是）")
    private Integer correlation = 0;

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

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


    @ApiModelProperty(value = "生日")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @JSONField(format ="yyyy-MM-dd")
    private Date birthday;

    @ApiModelProperty(value = "联系人角色value（对应字典联系人角色value）")
    private String liaisonRoleDictValue;

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

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

    @ApiModelProperty(value = "资源类型")
    @TableField("resource_type")
    private String resourceType;

    @ApiModelProperty(value = "资源类型关联ID")
    @TableField("resource_type_id")
    private Long resourceTypeId;

    @ApiModelProperty(value = "归属人ids")
    private List<Long> ownerByIds;


}
