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.annotate.Dict;
import com.storlead.sales.pojo.entity.customer.LiaisonEntity;
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.util.Date;
import java.util.List;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "LiaisonAddDTO", description = "客户联系人添加DTO")
public class LiaisonAddDTO {
    private static final long serialVersionUID = 1L;

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

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

    @ApiModelProperty(value = "是否是首要联系人（0不是，1是）")
    @TableField("has_primary_lialison")
    private Boolean hasPrimaryLialison;

    @ApiModelProperty(value = "联系人姓名")
    @TableField("name")
    private String name;

    @ApiModelProperty(value = "尊称（0为止，1先生，2女士）")
    @TableField("call")
    private Integer call;

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

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

    @ApiModelProperty(value = "部门职务")
    @TableField("department_position")
    private String departmentPosition;

    @ApiModelProperty(value = "手机号码")
    @TableField("telephone")
    private String telephone;


    @ApiModelProperty(value = "电子邮箱")
    @TableField("email")
    private String email;

    @ApiModelProperty(value = "备用邮箱1")
    private String email1;
    @ApiModelProperty(value = "备用邮箱2")
    private String email2;
    @ApiModelProperty(value = "备用邮箱3")
    private String email3;

//    @ApiModelProperty(value = "商机/订单（1商机，2订单）")
//    @TableField("niche_or_orders")
//    private Integer nicheOrOrders;

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

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

    @ApiModelProperty(value = "传真号码")
    @TableField("fax_number")
    private String faxNumber;

    @ApiModelProperty(value = "邮政编码")
    @TableField("postcode")
    private String postcode;

    @ApiModelProperty(value = "联系方式")
    @TableField("contact_information")
    private String contactInformation;

    @ApiModelProperty(value = "备注信息")
    @TableField("remark")
    private String remark;

    @ApiModelProperty(value = "qq")
    @TableField("qq")
    private String qq;

    @ApiModelProperty(value = "skype")
    @TableField("skype")
    private String skype;

    @ApiModelProperty(value = "旺旺")
    @TableField("wangwang")
    private String wangwang;

    @ApiModelProperty(value = "微信")
    @TableField("wechat")
    private String wechat;

    @ApiModelProperty(value = "Twitter")
    @TableField("twitter")
    private String twitter;

    @ApiModelProperty(value = "Linkedin")
    @TableField("linkedin")
    private String linkedin;

    @ApiModelProperty(value = "Facebook")
    @TableField("facebook")
    private String facebook;

    @ApiModelProperty(value = "Whatsapp")
    @TableField("whatsapp")
    private String whatsapp;

    @ApiModelProperty(value = "详细地址")
    @TableField("address")
    private String address;
    @ApiModelProperty(value = "区域")
    private String internationalArea;

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

    @ApiModelProperty(value = "固定电话")
    private String fixedLineTelephone;

    @ApiModelProperty(value = "宅电")
    private String homeElectricity;

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

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

    public void setName(String Name) {
        this.name = Name == null ? null : Name.trim();
    }
    public void setEmail(String email){
        this.email = email == null ? null : email.trim();
    }
    public void setEmail1(String email1){
        this.email1 = email1 == null ? null : email1.trim();
    }
    public void setEmail2(String email2){
        this.email2 = email2 == null ? null : email2.trim();
    }
    public void setEmail3(String email3){
        this.email3 = email3 == null ? null : email3.trim();
    }

}
