package cn.estsh.i3plus.pojo.aps.bean;

import cn.estsh.i3plus.pojo.aps.annotation.FieldAnnotation;
import cn.estsh.i3plus.pojo.base.enumutil.ApsEnumUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * @Description :物料运算规则
 * @Reference :
 * @Author : jason.niu
 * @CreateDate : 2019-09-17
 * @Modify:
 **/
@Data
@EqualsAndHashCode(callSuper = true)
@Entity
@Table(name = "APS_MAT_CALC_RULE")
@Api("物料运算规则")
public class MatCalcRule extends BaseRule {
    private static final long serialVersionUID = 2102986260688118982L;
    @Column(name="MATERIAL_FILTER")
    @ApiParam(value ="物料筛选")
    private String materialFilter;

    @Column(name="INPUT_FILTER")
    @ApiParam(value ="输入筛选")
    private String inputFilter;

    @Column(name="OUTPUT_FILTER")
    @ApiParam(value ="输出筛选")
    private String outputFilter;

    @Column(name="DEL_AUTO")
    @ApiParam(value ="自动删除补充订单")
    @FieldAnnotation(defaultValue = "1")
    private Boolean delAuto;

    @Column(name="DEL_LIMIT")
    @ApiParam(value ="删除补充订单限制条件")
    @FieldAnnotation(defaultValue = "NONE")
    private ApsEnumUtil.ORDER_DEL_LIMIT delLimit;

    @Column(name="KEEP_RELATION")
    @ApiParam(value ="保持关联")
    private Boolean keepRelation;

    @Column(name="AUTO_SUPPLY")
    @ApiParam(value ="自动补充")
    @FieldAnnotation(defaultValue = "1")
    private Boolean autoSupply;

    @Column(name="BATCH_SUPPLY")
    @ApiParam(value ="批量补充")
    private Boolean batchSupply;

    @Column(name="ASSIGN_LIMIT")
    @ApiParam(value ="物料分配制约")
    @FieldAnnotation(multiEnumClass = ApsEnumUtil.MATERIAL_ASSIGN_LIMIT.class)
    private Integer assignLimit;

}
