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

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.xunhong.erp.turbo.api.biz.dto.enums.CostBelongEnum;
import com.xunhong.erp.turbo.api.biz.dto.enums.CostTypeEnum;
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.util.List;

/**
 * @author shenyifei
 */
@Data
@Schema(title = "采购订单成本项目信息创建")
@EqualsAndHashCode(callSuper = true)
@JsonIgnoreProperties(ignoreUnknown = 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 costId;

	/**
	 * 成本项目名称
	 */
	@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;

	/**
	 * 费用归属：0_无归属；1_工头；2_产地；3_司机；
	 */
	@Schema(title = "费用归属：0_无归属；1_工头；2_产地；3_司机；")
	private CostBelongEnum belong;

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

	/**
	 * 费用类型：1_辅料类型；2_人工类型；3_产地类型；4_其他类型；5_物流类型
	 */
	@Schema(title = "费用类型：1_辅料类型；2_人工类型；3_产地类型；4_其他类型；5_物流类型", requiredMode = Schema.RequiredMode.REQUIRED)
	private CostTypeEnum type;

	/**
	 * 关联项目id
	 */
	@Schema(title = "关联项目id")
	private List<Long> costItemIds;


	/**
	 * 是否选中
	 */
	@Schema(title = "是否选中", requiredMode = Schema.RequiredMode.REQUIRED)
	private Boolean selected;

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

