package com.storlead.sales.pojo.entity.systemrule;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.storlead.framework.annotate.Dict;
import com.storlead.framework.mybatis.entity.SysBaseField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import com.storlead.sales.pojo.vo.systemrule.CustomerTypeRulesVO;
import com.storlead.sales.pojo.vo.systemrule.FieldSimilarityConfigVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.models.auth.In;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.List;

/**
 * <p>
 * 规则配置模块表
 * </p>
 *
 * @author YPZ
 * @since 2024-04-03
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("system_rule_module_config")
@ApiModel(value="SystemRuleModuleConfigEntity对象", description="规则配置模块表")
public class SystemRuleModuleConfigEntity extends SysBaseField {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "规则模块id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

//    @ApiModelProperty(value = "业务类型编码")
//    @TableField("service_code")
//    @Dict(dictCode = "work_data_group",valueField = "serviceName")
//    private Integer serviceCode;

    @ApiModelProperty(value = "业务类型编码")
    @TableField("resource_type")
    @Dict(dictCode = "work_data_group",valueField = "resourceName")
    private String resourceType;

    @ApiModelProperty(value = "更新说明")
    @TableField("update_explain")
    private String updateExplain;

    @ApiModelProperty(value = "是否限制成员拥有线索/客户上限")
    @TableField("has_max_member")
    private Boolean hasMaxMember;

    @ApiModelProperty(value = "成员拥有线索/客户上限数量")
    @TableField("max_member_num")
    private Integer maxMemberNum;

    @ApiModelProperty(value = "是否开启线索/客户置公设置")
    @TableField("has_public_clues")
    private Boolean hasPublicClues;

    @ApiModelProperty(value = "是否区分重点客户与普通客户")
    @TableField("has_distinguish_key_regular")
    private Boolean hasDistinguishKeyRegular;

    @ApiModelProperty(value = "普通客户最大未跟进天数")
    @TableField("regular_follow_date")
    private Integer regularFollowDate;

    @ApiModelProperty(value = "重点客户最大未跟进天数")
    @TableField("key_follow_date")
    private Integer keyFollowDate;

    @ApiModelProperty(value = "普通客户最大未成交天数")
    @TableField("regular_transaction_date")
    private Integer regularTransactionDate;

    @ApiModelProperty(value = "重点客户最大未成交天数")
    @TableField("key_transaction_date")
    private Integer keyTransactionDate;

    @ApiModelProperty(value = "是否区分客户类型")
    @TableField("has_distinguish_customer_type")
    private Boolean hasDistinguishCustomerType;

    @ApiModelProperty(value = "客户类型规则（JSON对应CustomerTypeRulesVO）")
    @TableField("customer_type_rules")
    private String customerTypeRules;

    @ApiModelProperty(value = "线索/客户置公时间")
    @TableField("max_public_clues_num")
    private Integer maxPublicCluesNum;

    @ApiModelProperty(value = "是否开启线索/客户清空设置")
    @TableField("has_clear_clues")
    private Boolean hasClearClues;

    @ApiModelProperty(value = "线索/客户清空时间（天数）")
    @TableField("max_clear_clues_num")
    private Integer maxClearCluesNum;


    @ApiModelProperty(value = "是否开启查重规则配置")
    @TableField("has_plagiarism_rules")
    private Boolean hasPlagiarismRules;

    @ApiModelProperty(value = "查重规则配置详情（JSON）")
    @TableField("plagiarism_rules")
    private String plagiarismRules;

    @ApiModelProperty(value = "是否开启转垃圾客户设置")
    @TableField("has_garbage_clues")
    private Boolean hasGarbageClues;

    @ApiModelProperty(value = "转垃圾客户最大未跟进天数")
    @TableField("max_garbage_clues_num")
    private Integer maxGarbageCluesNum;

    @ApiModelProperty(value = "是否开启垃圾客户清空设置")
    @TableField("has_garbage_empty_clues")
    private Boolean hasGarbageEmptyClues;

    @ApiModelProperty(value = "垃圾客户清空时间（天数）")
    @TableField("max_garbage_empty_clues_num")
    private Integer maxGarbageEmptyCluesNum;

    @ApiModelProperty(value = "查重规则配置详情（JSON）")
    @TableField(exist = false)
    private List<FieldSimilarityConfigVO> fieldSimilarityls;
}
