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.LocalDateTime;
import java.util.Date;
import java.util.List;

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

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

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

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

    @ApiModelProperty(value = "国家区域")
    private String country;

    @ApiModelProperty(value = "线索状态value（对应字典线索状态value）")
    private String clueStatusDictValue;

    @ApiModelProperty(value = "客户状态value（对应字典客户状态value）")
    private String customerStatusDictValue;

    @ApiModelProperty(value = "客户来源value（对应字典客户来源value）")
    private String customerSourceDictValue;

    @ApiModelProperty(value = "客户类型value（对应字典客户类型value）")
    private String customerTypeDictValue;

    @ApiModelProperty(value = "客户等级value（对应字典客户等级value）")
    private String customerLevelDictValue;

    @ApiModelProperty(value = "客户信用等级value（对应字典客户信用等级value）")
    private String customerCreditLevelDictValue;

    @ApiModelProperty(value = "客户经济性质value（对应字典客户经济性质value）")
    private String customerEconomicNatureDictValue;

    @ApiModelProperty(value = "置公原因value（对应字典置公原因value）")
    @TableField("reason_public_customer_dict_value")
    private String reasonPublicCustomerDictValue;

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

    @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 = "归属人员")
    private Long ownerBy;

    @ApiModelProperty(value = "前归属人")
    private Long formerOwnerBy;

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

    @ApiModelProperty(value = "是否有订单（成交客户，0没有，1有）")
    private Integer hasOrderForm;

    @ApiModelProperty(value = "是否从线索过来（0否，1是）")
    private Boolean hasFromClue;

    @ApiModelProperty(value = "客户种类（1客户、2线索）")
    private Integer customerForm;

    @ApiModelProperty(value = "是否是公共线索/公海客户（0不是，1是）")
    private Boolean hasPublicCustomer;

    @ApiModelProperty(value = "是否是垃圾客户（0不是，1是）")
    private Boolean hasGarbageCustomer;

    @ApiModelProperty(value = "客户归属分类（0全部客户、10：我的客户、20:我发起的、30：下属客户、40我协作的、50：下属协作的，70：重点）")
    private Integer customerBelongType = 0;

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

    @ApiModelProperty(value = "是否是跟进模式")
    private Boolean hasFollowMode = false;

    private String preNextScopeMenuId;

}
