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

import com.alibaba.cola.dto.DTO;
import com.xunhong.erp.turbo.api.biz.dto.enums.CostItemRuleEnum;
import com.xunhong.erp.turbo.api.biz.dto.enums.CostItemTypeEnum;
import com.xunhong.erp.turbo.api.biz.dto.enums.OrderCostPayerTypeEnum;
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 OrderCostItem extends DTO {

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

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

    /**
     * 成本项目ID
     */
    @Schema(title = "成本项目ID", type = "string")
    private Long costItemId;

    /**
     * 成本项目名称
     */
    @Schema(title = "成本项目名称")
    private String name;

    /**
     * 单价
     */
    @Schema(title = "单价")
    private BigDecimal price;

    /**
     * 单位
     */
    @Schema(title = "单位")
    private String unit;

    /**
     * 数量
     */
    @Schema(title = "数量")
    private Integer count;

    /**
     * 费用承担方:1-我方,2-对方
     */
    @Schema(title = "费用承担方:1-我方,2-对方")
    private OrderCostPayerTypeEnum payerType;

    /**
     * 项目类型：1_辅料类型；2_人工类型
     */
    @Schema(title = "项目类型：1_辅料类型；2_人工类型")
    private CostItemTypeEnum type;

    /**
     * 录入规则：1_填数量；2_选纸箱；3_数量和金额
     */
    @Schema(title = "录入规则：1_填数量；2_选纸箱；3_数量和金额", requiredMode = Schema.RequiredMode.REQUIRED)
    private CostItemRuleEnum rule;


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

