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.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.xunhong.erp.turbo.api.biz.dto.enums.DealerTypeEnum;
import com.xunhong.erp.turbo.datasource.domain.entity.BaseDO;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;

/**
 * @author shenyifei
 */
@Data
@TableName(value = "order_dealer", autoResultMap = true)
@EqualsAndHashCode(callSuper = true)
public class OrderDealerDO extends BaseDO<OrderDealerDO> {

	/**
	 * 记录ID
	 */
	@TableId(value = "order_dealer_id", type = IdType.ASSIGN_ID)
	private Long orderDealerId;

	/**
	 * 订单ID
	 */
	@TableField(value = "order_id")
	private Long orderId;

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

	/**
	 * 经销商简称
	 */
	@TableField(value = "short_name")
	private String shortName;

	/**
	 * 经销商类型：1_市场；2_超市；
	 */
	@TableField(value = "dealer_type")
	private DealerTypeEnum dealerType;

	/**
	 * 经销商设置
	 */
	@TableField(value = "setting", typeHandler = JacksonTypeHandler.class)
	private DealerSettingDO setting;

	/**
	 * 税费补贴
	 */
	@TableField(value = "tax_subsidy")
	private BigDecimal taxSubsidy;

	/**
	 * 计提税金
	 */
	@TableField(value = "tax_provision")
	private BigDecimal taxProvision;

	/**
	 * 成本差异
	 */
	@TableField(value = "cost_difference")
	private BigDecimal costDifference;

	/**
	 * 利润分成
	 */
	@TableField(value = "profit_sharing")
	private BigDecimal profitSharing;
}
