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

import com.xunhong.erp.turbo.api.biz.dto.enums.CostItemCostTypeEnum;
import com.xunhong.erp.turbo.api.biz.dto.enums.OrderCostPayerTypeEnum;
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;

/**
 * @author shenyifei
 */
@Data
@Schema(title = "采购订单成本项目信息创建")
@EqualsAndHashCode(callSuper = true)
public class OrderCost extends Command {

	/**
	 * 记录ID
	 */
	@Schema(title = "记录ID", type = "string", requiredMode = Schema.RequiredMode.REQUIRED)
	private Long orderCostId;

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

	/**
	 * 成本项目ID
	 */
	@Schema(title = "成本项目ID", type = "string", requiredMode = Schema.RequiredMode.REQUIRED)
	private Long itemId;

	/**
	 * 成本项目名称
	 */
	@Schema(title = "成本项目名称", requiredMode = Schema.RequiredMode.REQUIRED)
	private String name;

	/**
	 * 单价
	 */
	@Schema(title = "单价", requiredMode = Schema.RequiredMode.REQUIRED)
	private BigDecimal price;

	/**
	 * 单位
	 */
	@Schema(title = "单位", requiredMode = Schema.RequiredMode.REQUIRED)
	private String unit;

	/**
	 * 数量
	 */
	@Schema(title = "数量", requiredMode = Schema.RequiredMode.REQUIRED)
	private Integer count;

	/**
	 * 付款方类型:1-我方,2-对方
	 */
	@Schema(title = "付款方类型:1-我方,2-对方")
	private OrderCostPayerTypeEnum payerType;

	/**
	 * 负责人
	 */
	@Schema(title = "负责人")
	private String principal;

	/**
	 * 是否需要数量和价格
	 */
	@Schema(title = "是否需要数量和价格")
	private Boolean requireQuantityAndPrice;

	/**
	 * 费用类型：1_包装材料；2_人工费用；3_其他费用；4_固定费用；5_工头垫付；6_产地垫付
	 */
	@Schema(title = "费用类型：1_包装材料；2_人工费用；3_其他费用；4_固定费用；5_工头垫付；6_产地垫付", requiredMode = Schema.RequiredMode.REQUIRED)
	private CostItemCostTypeEnum costType;

}

