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.datasource.domain.entity.BaseDO;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;

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

	/**
	 * 项目ID
	 */
	@TableId(value = "item_id", type = IdType.ASSIGN_ID)
	private Long itemId;

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

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

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

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

	/**
	 * 是否在录入时显示
	 */
	@TableField(value = "show_in_entry")
	private Boolean showInEntry;

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

	/**
	 * 备注
	 */
	@TableField(value = "remark")
	private String remark;

	/**
	 * 状态：1_启用；0_禁用
	 */
	@TableField(value = "status")
	private Boolean status;

	/**
	 * 排序
	 */
	@TableField(value = "sort")
	private BigDecimal sort;

}
