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

import cn.estsh.i3plus.pojo.aps.annotation.FieldAnnotation;
import cn.estsh.i3plus.pojo.aps.common.BaseAPS;
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-22
 * @Modify:
 **/
@Data
@EqualsAndHashCode(callSuper = true)
@Entity
@Table(name = "APS_DYNAMIC_SET_TIME")
@Api("动态设置时间")
public class DynamicSetTime extends BaseAPS {
    private static final long serialVersionUID = -1696499471488104793L;
    @Column(name="RES_CODE")
    @ApiParam(value ="资源代码")
    @FieldAnnotation(editType = ApsEnumUtil.EDIT_TYPE.MULTI_OBJECT, typeName = "Resource", notEmpty = true)
    private String resCode;

    @Column(name="TYPE")
    @ApiParam(value ="影响类型")
    @FieldAnnotation(defaultValue = "ALL")
    private ApsEnumUtil.DYNAMIC_SET_TYPE type;

    @Column(name="CONSIDER_ASS_RES")
    @ApiParam(value ="启用副资源设置时间")
    private Boolean considerAssRes;

    @Column(name="CONSIDER_MATERIAL")
    @ApiParam(value ="启用物料设置时间")
    private Boolean considerMaterial;

    @Column(name="ASS_RES_CALC")
    @ApiParam(value ="副资源设置计算方式")
    @FieldAnnotation(defaultValue = "MAX")
    private ApsEnumUtil.DYNAMIC_SET_CALC assResCalc;

    @Column(name="MATERIAL_CALC")
    @ApiParam(value ="物料设置时间计算方式")
    @FieldAnnotation(defaultValue = "MAX")
    private ApsEnumUtil.DYNAMIC_SET_CALC materialCalc;

    @Column(name="STATIC_CALC")
    @ApiParam(value ="与静态设置时间计算方式")
    @FieldAnnotation(defaultValue = "MAX")
    private ApsEnumUtil.DYNAMIC_SET_CALC staticCalc;

    @Column(name="PRIORITY")
    @ApiParam(value ="优先级")
    @FieldAnnotation(defaultValue = "10")
    private int priority;
}
