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

import com.alibaba.cola.dto.DTO;
import com.xunhong.erp.turbo.api.biz.dto.common.OrderCompany;
import com.xunhong.erp.turbo.api.biz.dto.enums.OrderRebateCalcMethodEnum;
import com.xunhong.erp.turbo.api.biz.dto.enums.PurchaseOrderStateEnum;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@EqualsAndHashCode(callSuper = true)
public class OrderRebate extends DTO {

	/**
	 * 记录ID
	 */
	private Long orderRebateId;

	/**
	 * 订单ID
	 */
	private Long orderId;

	/**
	 * 客户ID
	 */
	private Long customerId;

	/**
	 * 经销商ID
	 */
	private Long dealerId;

	/**
	 * 客户名称
	 */
	private String name;

	/**
	 * 返点计算方式：1_按净重计算；2_固定金额；
	 */
	private OrderRebateCalcMethodEnum calcMethod;

	/**
	 * 返点净重
	 */
	private BigDecimal netWeight;

	/**
	 * 返点单价
	 */
	private BigDecimal unitPrice;

	/**
	 * 返点金额
	 */
	private BigDecimal amount;

	/**
	 * 是否付款
	 */
	private Boolean isPaid;

	/**
	 * 采购订单公司信息
	 */
	private OrderCompany orderCompany;

	/**
	 * 采购订单信息
	 */
	private PurchaseOrder purchaseOrder;

	/**
	 * 采购订单状态: 0_草稿；1_审核中；2_已完成；3_已驳回；4_已关闭；
	 */
	private PurchaseOrderStateEnum poState;


	private LocalDateTime createdAt;
}
