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

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
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 com.storlead.sales.pojo.entity.customer.CustomerEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 客户归属人变更记录表
 * </p>
 *
 * @author YPZ
 * @since 2024-11-05
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("customer_owner_record")
@ApiModel(value="CustomerOwnerRecordListVO", description="客户归属人变更记录VO")
public class CustomerOwnerRecordListVO extends SysBaseField {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "客户归属记录id")
    private Long id;

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

    @ApiModelProperty(value = "原拥有者")
    @OrgAutoMateAnnotate(valueField = "oldOwnerByName",annotateType = AnnotateEnumType.USER)
    private Long oldOwnerBy;

    @ApiModelProperty(value = "原拥有者姓名")
    private String oldOwnerByName;

    @ApiModelProperty(value = "现拥有者")
    @OrgAutoMateAnnotate(valueField = "nowOwnerByName",annotateType = AnnotateEnumType.USER)
    private Long nowOwnerBy;

    @ApiModelProperty(value = "现拥有者姓名")
    private String nowOwnerByName;

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

    @ApiModelProperty(value = "操作方式value(对应字典操作方式value1领取、2分配、3创建、4置公)")
    @Dict(dictCode = "operating_type",valueField = "operatingTypeName")
    private Integer operatingType;

    @ApiModelProperty(value = "操作方式名称")
    private String operatingTypeName;

    @ApiModelProperty(value = "原客户详情（JSON）")
    private String customerDetail;

    @ApiModelProperty(value = "原客户详情（JSON）")
    private CustomerAllVO customer;

    @ApiModelProperty(value = "客户类型value（对应字典客户类型value）")
    @Dict(dictCode = "customer_type",valueField = "customerTypeName")
    private String customerTypeDictValue;

    @ApiModelProperty(value = "客户类型名称")
    private String customerTypeName;

    @ApiModelProperty(value = "客户状态value（对应字典客户状态value）")
    @Dict(dictCode = "customer_status",valueField = "customerStatusName")
    private String customerStatusDictValue;

    @ApiModelProperty(value = "客户状态名称")
    private String customerStatusName;

    @ApiModelProperty(value = "所属行业")
    @TableField("industry")
    private String industry;


}
