package com.xunhong.erp.turbo.api.biz.dto.vo;

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 com.xunhong.erp.turbo.base.dto.Command;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

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

@Data
@EqualsAndHashCode(callSuper = true)
public class OrderRebateVO extends Command {

	/**
	 * 记录ID
	 */
	@Schema(title = "记录ID", type = "string")
	private Long orderRebateId;

	/**
	 * 订单ID
	 */
	@Schema(title = "订单ID", type = "string")
	private Long orderId;

	/**
	 * 客户ID
	 */
	@Schema(title = "客户ID", type = "string")
	private Long customerId;

	/**
	 * 经销商ID
	 */
	@Schema(title = "经销商ID", type = "string")
	private Long dealerId;

	/**
	 * 客户名称
	 */
	@Schema(title = "客户名称")
	private String name;

	/**
	 * 返点计算方式：1_按净重计算；2_固定金额；
	 */
	@Schema(title = "返点计算方式：1_按净重计算；2_固定金额；")
	private OrderRebateCalcMethodEnum calcMethod;

	/**
	 * 返点净重
	 */
	@Schema(title = "返点净重")
	private BigDecimal netWeight;

	/**
	 * 返点单价
	 */
	@Schema(title = "返点单价")
	private BigDecimal unitPrice;

	/**
	 * 返点金额
	 */
	@Schema(title = "返点金额")
	private BigDecimal amount;
	/**
	 * 创建时间
	 */
	@Schema(title = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
	private LocalDateTime createdAt;

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

	/**
	 * 公司信息
	 */
	@Schema(title = "公司信息", requiredMode = Schema.RequiredMode.REQUIRED)
	private OrderCompany orderCompany;

	/**
	 * 采购订单信息
	 */
	@Schema(title = "采购订单信息", requiredMode = Schema.RequiredMode.REQUIRED)
	private PurchaseOrderVO purchaseOrderVO;


	/**
	 * 是否付款
	 */
	@Schema(title = "是否付款")
	private Boolean isPaid;
}
