package com.dayou.entity;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.dayou.common.BaseEntity;
import com.dayou.enums.MergeKeyInterface;
import com.github.liangbaika.validate.annations.AbcValidate;
import com.github.liangbaika.validate.enums.Check;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.dayou.annotation.ExcelSheet;
import com.dayou.annotation.ExportCell;
import com.dayou.annotation.ImportCell;
import org.hibernate.validator.constraints.Range;

import java.math.BigDecimal;

import static com.dayou.common.Constants.MERGE_SYMBOL;

/**
 * <p>
 * 项目提成比例（市场人员）
 * </p>
 *
 * @author wucl
 * @since 2023-03-03
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ExcelSheet(sheetName = "项目提成比例（市场人员）")
public class BrokerageMarketerRatio extends BaseEntity implements MergeKeyInterface {

    private static final long serialVersionUID=1L;

    /**
     * 项目类型字典id
     */
    private Long itemCate;

    /**
     * 项目来源字典id
     */
    private Long itemSource;

    /**
     * 提成比例
     */
    @ImportCell
    @ExportCell(columnName = "提成比例")
    @TableField(value = "ratio", fill = FieldFill.UPDATE)
    private BigDecimal ratio;

    /**
     * 备注
     */
    @ImportCell
    @ExportCell(columnName = "备注")
    private String remark;

    @Override
    public String mergeKey() {
        return itemCate + MERGE_SYMBOL+ itemSource;
    }
}
