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

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
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.datasource.domain.entity.BaseDO;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;

/**
 * @author shenyifei
 */
@Data
@TableName(value = "order_cost")
@EqualsAndHashCode(callSuper = true)
public class OrderCostDO extends BaseDO<OrderCostDO> {

	/**
	 * 记录ID
	 */
	@TableId(value = "order_cost_id", type = IdType.ASSIGN_ID)
	private Long orderCostId;

	/**
	 * 订单ID
	 */
	@TableField(value = "order_id")
	private Long orderId;

	/**
	 * 成本项目ID
	 */
	@TableField(value = "item_id")
	private Long itemId;

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

	/**
	 * 单价
	 */
	@TableField(value = "price")
	private BigDecimal price;

	/**
	 * 单位
	 */
	@TableField(value = "unit")
	private String unit;

	/**
	 * 数量
	 */
	@TableField(value = "count")
	private Integer count;

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

	/**
	 * 负责人
	 */
	@TableField(value = "principal")
	private String principal;

	/**
	 * 是否需要填写数量和单价
	 */
	@TableField(value = "require_quantity_and_price")
	private Boolean requireQuantityAndPrice;

	/**
	 * 费用类型：1_包装材料；2_人工费用；3_其他费用；4_固定费用；5_工头垫付；6_产地垫付
	 */
	@TableField(value = "cost_type")
	private CostItemCostTypeEnum costType;

}

