package com.xunhong.erp.turbo.biz.infrastructure.entity;

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.xunhong.erp.turbo.api.biz.dto.enums.RebateCalcMethodEnum;
import com.xunhong.erp.turbo.datasource.domain.entity.BaseDO;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;

/**
 * @author shenyifei
 */
@Data
@TableName(value = "dealer_rebate_customer")
@EqualsAndHashCode(callSuper = true)
public class DealerRebateCustomerDO extends BaseDO<DealerRebateCustomerDO> {

	/**
	 * 客户ID
	 */
	@TableId(value = "customer_id", type = IdType.ASSIGN_ID)
	private Long customerId;

	/**
	 * 经销商ID
	 */
	@TableField(value = "dealer_id")
	private Long dealerId;

	/**
	 * 客户名称
	 */
	@TableField(value = "name")
	private String name;

	/**
	 * 状态：1_启用；0_禁用；
	 */
	@TableField(value = "status")
	private Boolean status;

	/**
	 * 备注
	 */
	@TableField(value = "remark")
	private String remark;

	/**
	 * 返点计算方式：1_按净重计算；2_固定金额；3_不固定
	 */
	@TableField(value = "calc_method")
	private RebateCalcMethodEnum calcMethod;

	/**
	 * 返点单价
	 */
	@TableField(value = "unit_price")
	private BigDecimal unitPrice;

	/**
	 * 返点金额
	 */
	@TableField(value = "amount")
	private BigDecimal amount;

	@TableField(exist = false)
	private DealerDO dealerDO;
}

