package com.fs.crm.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fs.common.annotation.Excel;
import com.fs.common.core.domain.BaseEntity;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 客户对象 crm_customer
 *
 * @author fs
 * @date 2022-12-21
 */
@Data
public class CrmCustomer extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /**主键*/
    @TableId(type = IdType.AUTO)
    private Long customerId;

    /** 组织机构代码 */
    @Excel(name = "组织机构代码")
    private String customerCode;

    /** 客户名称 */
    @Excel(name = "客户名称")
    private String customerName;

    /**
     * 客户的企微名称
     */
    private String qwName;


    /** 手机 */
    @Excel(name = "手机")
    @NotBlank(message = "手机号不能为空")
//    @Pattern(regexp="^1[3456789]\\d{9}$",message="手机号格式不正确")
    private String mobile;

    /** 流量来源 */
    @Excel(name = "流量来源")
    private String trafficSource;

    /** 性别 */
    @Excel(name = "性别")
    private Integer sex;

    /** $column.columnComment */
    @Excel(name = "微信")
    private String weixin;

    /** 关联用户ID */
    @Excel(name = "关联用户ID")
    private Long userId;

    /** 创建人ID */
    @Excel(name = "创建人ID")
    private Long createUserId;

    /** 当前认领用户 */
    @Excel(name = "当前认领用户")
    private Long receiveUserId;

    /** 认领ID */
    @Excel(name = "认领ID")
    private Long customerUserId;

    /** 省市区 */
    @Excel(name = "省市区")
    private String address;

    private String cityIds;

    /** 定位信息 */
    @Excel(name = "定位信息")
    private String location;

    /** 详细地址 */
    @Excel(name = "详细地址")
    private String detailAddress;

    /** 地理位置经度 */
    @Excel(name = "地理位置经度")
    private String lng;

    /** 地理位置维度 */
    @Excel(name = "地理位置维度")
    private String lat;

    /** 客户状态  0锁定 1 正常 */
    @Excel(name = "客户状态  0锁定 1 正常")
    private Integer status;

    /** 1 已认领 0未认领 */
    @Excel(name = "1 已认领 0未认领")
    private Integer isReceive;

    /** 0 手动导入 1 自动导入 */
    @Excel(name = "导入类型")
    private Integer importType;



    /** 所属部门ID */
    @Excel(name = "所属部门ID")
    private Long deptId;

    /** 是否删除 */
    @Excel(name = "是否删除")
    private Integer isDel;

    /** 客户类型 */
    @Excel(name = "客户类型")
    private Integer customerType;

    /** 最后一次跟进时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "最后一次跟进时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date receiveTime;

    /** 入公海时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "入公海时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date poolTime;

    /** $column.columnComment */
    @Excel(name = "公司id")
    private Long companyId;

    /** 是否为线索客户 */
    @Excel(name = "是否为线索客户")
    private Integer isLine;

    /** 客户来源 */
    @Excel(name = "客户来源")
    private Integer source;

    /** 标签 */
    @Excel(name = "标签")
    private String tags;

    private String extJson;

    @Excel(name = "跟进阶段")
    private Integer visitStatus;

    @Excel(name = "进线日期")
    private String registerDate;
    private String registerLinkUrl;
    private String registerDesc;
    @Excel(name = "进线客户填写日期")
    private String registerSubmitTime;

    /** 流量平台线索归属账号 */
    private String thirdAccount;

    /** 流量平台线索Id */
    private String clueId;

    private Integer isPool;

    private String registerType;

    private BigDecimal payMoney;

    private Integer buyCount;

    private String sourceCode;

    private String pushTime;

    private String pushCode;
    private String intention;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date visitTime;



}
