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

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.storlead.framework.annotate.AnnotateEnumType;
import com.storlead.framework.annotate.Dict;
import com.storlead.framework.annotate.OrgAutoMateAnnotate;
import com.storlead.framework.mybatis.entity.SysBaseField;
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.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "SendRecordDetailVO", description = "客户寄样记录详情VO")
public class SendRecordDetailVO extends SysBaseField {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "寄样记录id")
    private Long id;

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

    @ApiModelProperty(value = "寄样产品")
    private String sendProduct;

    @ApiModelProperty(value = "样品描述")
    private String productDescription;

    @ApiModelProperty(value = "收样人员id（对应客户联系人表id）")
    private Long receiveLiaisonId;

    @ApiModelProperty(value = "收样人员姓名")
    private String receiveLiaisonName;

    @ApiModelProperty(value = "寄样人员id（对应系统用户表id）")
    @OrgAutoMateAnnotate(valueField = "sendMemberName",annotateType = AnnotateEnumType.USER)
    private Long sendMemberId;

    @ApiModelProperty(value = "寄样人员姓名")
    private String sendMemberName;

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

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

    @ApiModelProperty(value = "样品金额")
    private BigDecimal recordAmount;

    @ApiModelProperty(value = "关联业务10:客户、11线索、20:联系人、30:商机、40:订单、50:回款、60:退款、70:费用、80:任务、90:跟进、100:工单")
    @Dict(dictCode = "work_data_group",valueField = "resourceTypeName")
    private String resourceType;

    @ApiModelProperty(value = "类型")
    private String resourceTypeName;

    @ApiModelProperty(value = "关联业务数据")
    private String resourceTypeId;

    @ApiModelProperty(value = "关联业务数据名称")
    private String resourceName;

    @ApiModelProperty(value = "归属人员姓名")
    private String ownerByName;

    @ApiModelProperty(value = "创建人员姓名")
    private String createByName;

    @ApiModelProperty(value = "下一个id")
    private Long nextId;

    @ApiModelProperty(value = "上一个id")
    private Long previousId;
}
