package com.qunzhixinxi.hnqz.admin.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.qunzhixinxi.hnqz.admin.entity.base.BaseEntity;
import com.qunzhixinxi.hnqz.admin.enums.TenantStatus;
import com.qunzhixinxi.hnqz.admin.enums.TenantType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;
import java.util.Map;

/**
 * 档案-客户管理
 *
 * @author lixuesong
 * @author hengchen.sun Modify on 2021/06/07 改变实体类结构
 * @date 2021年06月04日 15:30
 */
@Data
@TableName("wm_af_customer")
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "档案-客户管理")
public class WmDaCustomer extends BaseEntity {

	private static final long serialVersionUID = 7855207742674809635L;

	@TableId
	@NotNull(groups = Update.class, message = "更新时id不能为空")
	@ApiModelProperty(value="主键id")
	private Integer Id;

	@ApiModelProperty(value="部门id")
	private Integer deptId;

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

	@ApiModelProperty(value="客户名称")
	@NotBlank(groups = Create.class, message = "客户名称不能为空")
	private String customerName;

	@NotNull(groups = Create.class, message = "客户类别不能为空")
	@ApiModelProperty(value="客户类别(药企、CSO、CRO、其他)")
	private TenantType customerType;

	@NotBlank(groups = Create.class, message = "客户经理不能为空")
	@ApiModelProperty(value="客户经理")
	private String customerManager;

	@NotNull(groups = Create.class, message = "客户状态不能为空")
	@ApiModelProperty(value="客户状态:(客户备案、合同立项、签约 、上线、下线)")
	private TenantStatus customerStatus;

	@ApiModelProperty(value="渠道名称")
	private String channelName;

	@ApiModelProperty(value="说明")
	private String remark;

	@ApiModelProperty(value="合同列表")
	@TableField(exist = false)
	private List<Contract> contractList;

	/**
	 * 跟踪信息列表
	 */
	@ApiModelProperty(value="跟踪信息列表")
	@TableField(exist = false)
	private List<WmDaTrack> wmDaTrackList;

	/**
	 * key为年份，value为map（月份对应的业绩）
	 */
	@TableField(exist = false)
	@ApiModelProperty(value="key为年份，value为map（月份对应的业绩）")
	private Map<String, WmDaCustomerStatistics> multiGMVStatistics;

	/**
	 * 关联GMV数据统计主表
	 */
	@TableField(exist = false)
	private List<WmDeptGmv> deptGmvList;

}
